Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick stablehlo build fix for MSVC. #18683

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

ScottTodd
Copy link
Member

Upstream PR: openxla/stablehlo#2576. Cherry-picked onto our fork at https://github.com/iree-org/stablehlo/tree/integrates/2024-10-03 for now.

This fixes the build failures caught by our nightly Windows CI: https://github.com/iree-org/iree/actions/runs/11159458848/job/31017884277#step:7:6257

[5387/8614] Building CXX object llvm-external-projects\stablehlo\stablehlo\transforms\CMakeFiles\obj.StablehloPasses.dir\ChloLegalizeToStablehlo.cpp.obj
FAILED: llvm-external-projects/stablehlo/stablehlo/transforms/CMakeFiles/obj.StablehloPasses.dir/ChloLegalizeToStablehlo.cpp.obj 
C:\ProgramData\Chocolatey\bin\ccache C:\PROGRA~1\MICROS~2\2022\ENTERP~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -ID:\a\iree\iree\third_party\llvm-project\llvm\include -ID:\a\iree\iree\build-windows\llvm-project\include -ID:\a\iree\iree\third_party\llvm-project\mlir\include -ID:\a\iree\iree\third_party\stablehlo -ID:\a\iree\iree\build-windows\llvm-external-projects\stablehlo -ID:\a\iree\iree\third_party\llvm-project\lld\include -ID:\a\iree\iree\build-windows\llvm-project\tools\lld\include -external:I\..\mlir\include -external:ID:\a\iree\iree\build-windows\llvm-project\tools\mlir\include -external:W0 /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /Z7 /O2 /Ob1  -std:c++17 -MD  /EHs-c- /GR- /showIncludes /Follvm-external-projects\stablehlo\stablehlo\transforms\CMakeFiles\obj.StablehloPasses.dir\ChloLegalizeToStablehlo.cpp.obj /Fdllvm-external-projects\stablehlo\stablehlo\transforms\CMakeFiles\obj.StablehloPasses.dir\ /FS -c D:\a\iree\iree\third_party\stablehlo\stablehlo\transforms\ChloLegalizeToStablehlo.cpp
D:\a\iree\iree\third_party\stablehlo\stablehlo\transforms\ChloLegalizeToStablehlo.cpp(1324): error C2065: 'M_PI': undeclared identifier
D:\a\iree\iree\third_party\stablehlo\stablehlo\transforms\ChloLegalizeToStablehlo.cpp(1324): error C2660: 'mlir::stablehlo::getConstantLike': function does not take 3 arguments
D:\a\iree\iree\third_party\stablehlo\stablehlo/transforms/PassUtils.h(51): note: see declaration of 'mlir::stablehlo::getConstantLike'

@ScottTodd ScottTodd added infrastructure Relating to build systems, CI, or testing platform/windows 🚪 Windows-specific build, execution, benchmarking, and deployment labels Oct 3, 2024
@ScottTodd ScottTodd requested a review from bjacob October 3, 2024 18:28
@ScottTodd ScottTodd enabled auto-merge (squash) October 3, 2024 18:40
@ScottTodd ScottTodd merged commit f39884d into iree-org:main Oct 3, 2024
35 checks passed
@ScottTodd ScottTodd deleted the stablehlo-msvc-fix branch October 3, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Relating to build systems, CI, or testing platform/windows 🚪 Windows-specific build, execution, benchmarking, and deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants