-
Notifications
You must be signed in to change notification settings - Fork 35
Wrap linker flags on Windows for IntelLLVM #772
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
Wrap linker flags on Windows for IntelLLVM #772
Conversation
The Intel C++ compiler requires linker flags to be wrapped, because CMake passes them through the compiler driver. Prefix Linker options with `LINKER:`. CMake will transform it to the appropriate flag for the compiler driver: (Nothing for MSVC, clang-cl and /Qoption,link for ICX), so this will work for the other compilers too, and for earlier versions of CMake. Fixes: oneapi-src#757 Signed-off-by: Gergely Meszaros <[email protected]>
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 we need reproduce this issue on CI - without it, we will break it again, as no one will remember that we have to do this workaround. Do we have build with icx on Windows in our CI? I see only a linux one. @lukaszstolarczuk can you check this? |
Yeah, of course we don't have such job. I tried to add it, but failed with the task 😞 Workflow: lukaszstolarczuk@e3dd2fe Example CI run: https://github.com/lukaszstolarczuk/unified-memory-framework/actions/runs/11181888055/job/31086892308#step:9:37 |
I don't see anything obviously wrong. I couldn't reproduce the error locally either, it probably has something to do with what's installed in github's windows image. I wonder what version of cmake is on the path by default for example. https://github.com/mxschmitt/action-tmate might come handy for debugging, though I never used it myself. |
@lukaszstolarczuk I suppose that the environment variables should be set (the because the environment variables set in one step are NOT passed to the next step. |
haha, of course, thanks, I'll check it! |
The Intel C++ compiler requires linker flags to be wrapped, because CMake passes them through the compiler driver.
Prefix Linker options with
LINKER:
.CMake will transform it to the appropriate flag for the compiler driver: (Nothing for MSVC, clang-cl and /Qoption,link for ICX), so this will work for the other compilers too, and for earlier versions of CMake.
Fixes: #757
Checklist