-
Notifications
You must be signed in to change notification settings - Fork 13.5k
-Xarch_device fails to propagate -O1 #110325
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
Labels
clang:driver
'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Comments
@llvm/issue-subscribers-clang-driver Author: Artem Belevich (Artem-B)
Clang reports an error if one attempts to pass `-O1` to a CUDA/HIP sib-compilation via `-Xarch_device`:
It appears to be a bug. The code that handles llvm-project/clang/lib/Driver/ToolChain.cpp Line 1606 in 1fb3fe0
This is the option here:
The option has NoXarchOption flag set, which triggers the error.
The correct option should've been this one:
|
jhuber6
added a commit
to jhuber6/llvm-project
that referenced
this issue
Feb 6, 2025
Summary: Currently the `-Xarch` argument needs to re-parse the option, which goes through every single registered argument. This causes errors when trying to pass `-O1` through it because it thinks it's a DXC option. This patch changes the behavior to only allow `clang` options. Concievably we could detect the driver mode to make this more robust, but I don't know if there are other users for this. Fixes: llvm#110325
github-actions bot
pushed a commit
to arm/arm-toolchain
that referenced
this issue
Feb 6, 2025
Summary: Currently the `-Xarch` argument needs to re-parse the option, which goes through every single registered argument. This causes errors when trying to pass `-O1` through it because it thinks it's a DXC option. This patch changes the behavior to only allow `clang` options. Concievably we could detect the driver mode to make this more robust, but I don't know if there are other users for this. Fixes: llvm/llvm-project#110325
Icohedron
pushed a commit
to Icohedron/llvm-project
that referenced
this issue
Feb 11, 2025
Summary: Currently the `-Xarch` argument needs to re-parse the option, which goes through every single registered argument. This causes errors when trying to pass `-O1` through it because it thinks it's a DXC option. This patch changes the behavior to only allow `clang` options. Concievably we could detect the driver mode to make this more robust, but I don't know if there are other users for this. Fixes: llvm#110325
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Clang reports an error if one attempts to pass
-O1
to a CUDA/HIP sib-compilation via-Xarch_device
:It appears to be a bug. The code that handles
-Xarch..
options appears to misinterpret-O1
as a clang-cl option "/O":llvm-project/clang/lib/Driver/ToolChain.cpp
Line 1606 in 1fb3fe0
This is the option here:
llvm-project/clang/include/clang/Driver/Options.td
Line 8465 in 6389974
The option has
NoXarchOption
flag set, which triggers the error.The correct option should've been this one:
llvm-project/clang/include/clang/Driver/Options.td
Line 929 in 6389974
The text was updated successfully, but these errors were encountered: