-
Notifications
You must be signed in to change notification settings - Fork 6
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
Enable compiler subprojects on Windows. #95
Conversation
9528b43
to
0543ebd
Compare
+ # Enable standards-conforming preprocessor. | ||
+ # https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor | ||
+ "/Zc:preprocessor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clues that helped settle on this fix:
- https://github.com/llvm/llvm-project/blob/60af83506a3aa379c59e0f9793ce7815d726aee1/llvm/cmake/modules/HandleLLVMOptions.cmake#L594-L598
- [Issue]: comgr.cpp compilation error ROCm/llvm-project#38 (this had the same error messages that I saw when building locally)
Should upstream the patch somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, ping the LLVM team next week. Thanks for the sleuthing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - you'll be racing me because I have two LLVM patches. You go first now and I'll adapt.
compiler/CMakeLists.txt
Outdated
therock_cmake_subproject_declare(amd-comgr | ||
EXTERNAL_SOURCE_DIR "amd-llvm/amd/comgr" | ||
BINARY_DIR "amd-comgr" | ||
BACKGROUND_BUILD | ||
CMAKE_ARGS | ||
# TODO: Currently unstable. Enable in >6.4. | ||
-DCOMGR_DISABLE_SPIRV=ON | ||
-DLLVM_LINK_LLVM_DYLIB=ON | ||
-DLLVM_LINK_LLVM_DYLIB=${_link_dylib} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just take this out and put it all properly conditioned in the pre_hook.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I think this was just leftover from before I moved all of the logic there)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How's this? Want
CMAKE_ARGS
# TODO: Currently unstable. Enable in >6.4.
-DCOMGR_DISABLE_SPIRV=ON
moved too?
+ # Enable standards-conforming preprocessor. | ||
+ # https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor | ||
+ "/Zc:preprocessor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, ping the LLVM team next week. Thanks for the sleuthing.
Progress on #36.
We'll want to switch to self-hosted runners and tune the cache to make the build faster soon. This is still under 20 minutes on standard runners though: https://github.com/nod-ai/TheRock/actions/runs/13339298280/job/37260996314.