-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
llvm: Support all -macosx
target triples
#197278
Comments
Instead of using config files, perhaps it'd be possible to create a symlink to the SDK somewhere inside Also, remember that macOS SDKs are "backwards compatible", so |
As a workaround, do: mkdir -p ~/.config/clang
echo "--sysroot=\"$(xcrun -sdk macosx --show-sdk-path)\"" >~/.config/arm64-apple-macosx.cfg If you only want to set this temporarily: export HOME="$(mktemp -d)"
mkdir -p "$HOME/.config/clang"
echo "--sysroot=\"$(xcrun -sdk macosx --show-sdk-path)\"" >"$HOME/.config/arm64-apple-macosx.cfg"
That's not a good solution as-is for three reasons:
Why is providing a configuration file for |
I assume you meant: mkdir -p ~/.config/clang
echo "--sysroot \"$(xcrun -sdk macosx --show-sdk-path)\"" > ~/.config/clang/arm64-apple-macosx.cfg But yeah, that works.
Perhaps
My understanding was that the issue is that the SDK root from the currently installed Command Line Tools is embedded into the binary, which is indeed problematic - then a symlink that Homebrew kept up to date would be nicer? In any case, why are you not just using
Don't know anything about that, so probably true.
I was confused, because I hadn't seen that llvm/llvm-project#111387 was patched in, and thought that you'd need a bunch of different So yeah, providing |
Yes, thanks. I'll update my comment to avoid misleading anyone else reading.
Perhaps -- this would need to be upstreamed though.
Yes, this was discussed as a possibility in #196094. We could probably try it.
We used to briefly, but @Bo98 maintains that this is wrong and causes problems. It certainly causes problems for
Well, we could maybe also do versioned config files in case we need to retain versions pending above discussion about using |
Fixes #197278. Also, remove the CLT requirement for pouring bottles. Many users use this for the libraries, which don't need the CLT. We can add it back if users report getting tripped up by this.
Fixes #197278. Also, remove the CLT requirement for pouring bottles. Many users use this for the libraries, which don't need the CLT. We can add it back if users report getting tripped up by this. Co-authored-by: Bo Anderson <[email protected]>
Fixes #197278. Also, remove the CLT requirement for pouring bottles. Many users use this for the libraries, which don't need the CLT. We can add it back if users report getting tripped up by this. Co-authored-by: Bo Anderson <[email protected]>
Fixes #197278. Also, remove the CLT requirement for pouring bottles. Many users use this for the libraries, which don't need the CLT. We can add it back if users report getting tripped up by this. Co-authored-by: Bo Anderson <[email protected]>
Fixes #197278. Also, remove the CLT requirement for pouring bottles. Many users use this for the libraries, which don't need the CLT. We can add it back if users report getting tripped up by this. Co-authored-by: Bo Anderson <[email protected]>
Fixes #197278. Also, remove the CLT requirement for pouring bottles. Many users use this for the libraries, which don't need the CLT. We can add it back if users report getting tripped up by this. Co-authored-by: Bo Anderson <[email protected]>
This should be fixed now. You may need to do
to pick up the fix. |
Thanks! Wish I had seen the PR before it merged though, then I'd have commented then, there is still an issue with the solution. I've opened #197532 instead to track that. |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputNote that the system is a clean virtual machine with a newly installed homebrew.
Verification
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
#196094 introduced new logic for finding the SDK root.
There are a few problems with it, however, including:
macosx
" target triples (such asarm64-apple-macosx
).Discovered originally in rust-lang/cc-rs#1278.
What happened (include all command output)?
Using Clang from the
llvm
package with the-target arm64-apple-macosx10.7
flag fails to link (or compile), because the logic for using a different SDK is not correct.What did you expect to happen?
Using any macOS target triple supported by Clang compiles, as long as there's at least one installed macOS SDK.
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: