-
Notifications
You must be signed in to change notification settings - Fork 161
Fix syntax of arguments passed on to Clang #1625
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
Conversation
66c587d to
ba80406
Compare
|
seems like in upstream clang it was removed in llvm/llvm-project@0628bea and never added back 🤔 |
|
Pretty sure that this option is not unsupported by clang, but it is not part of llvm.org clang and requires the swift.org clang |
|
checking that now |
|
ok yea added back in apple only swiftlang/llvm-project@3948c4c |
|
One thing to consider: it is generally no longer needed on Windows if you have a relatively newer toolchain. Do we want to drop this now simply because we can assume that anyone using the bazel rules_swift will be on a new enough toolchain (i.e. Swift 6+)? |
So does that mean I need to point Bazel to the Clang toolchain that comes bundled with Swift? |
Yes, the Swift clang toolchain is not a stock clang, it has extensions whihc are required for Swift to function. You should be pointing bazel to the bundled clang. |
Could |
|
that is the intent behind the forced |
|
Trying with and I get the error |
|
i believe this failure is compiler params files not being properly formatted. you can try with |
With I'm trying to build https://github.com/apple/swift-argument-parser by the way. |
ba80406 to
c41eea8
Compare
-fno-split-cold-code clang option|
FYI: I draftet a PR for LLVM with llvm/llvm-project#171214 to make the argument parsing process less sensitive to such subtleties. @keith: Thanks for merging! Next would be I wonder if this needs fixing in LLVM as well, though. |
|
i think that's probably a bug somewhere on the bazel side. looks to me like https://github.com/bazelbuild/rules_cc/blob/a2994c414fafa1acdc2f461edda85d67841f88ec/cc/private/toolchain/windows_cc_toolchain_config.bzl needs to define the |
This option appears to be unsupported in clang (now). Builds fail with
clang-cl.FYI: @compnerd
Edit: The option doesn't need to be removed, but the syntax needs to be different. It works with a single argument instead of two separate ones.