-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove redundant -Wl,-syslibroot
#121426
Remove redundant -Wl,-syslibroot
#121426
Conversation
Clang already passes this when invoking the linker: https://github.com/llvm/llvm-project/blob/llvmorg-17.0.6/clang/lib/Driver/ToolChains/Darwin.cpp#L439-L442
Does this work with every linker or just Apple/clang's default one? Curious if linkers such as |
This only changes the behaviour used when a compiler driver like Clang or GCC is used to link, when we invoke the linker directly the I know that it works for GCC, where this behaviour is explicitly documented, I'm not really familiar with other compiler drivers with iOS support? |
oh I see. Missed that it was just compiler drivers (guessing that is the |
Same as in #121430, unsure who has macOS/Xcode experience that I could assign this to. r? compiler |
r? compiler |
same 😅 |
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.
This looks right and is worth landing.
r=me if someone from t-compiler looks over and decides it's fine for me to r=me on this (despite it not being a libs thing). |
@thomcc Out of curiosity, what is the benefit of removing the redundancy here? Just that it simplifies our generated command line? |
I don't object to this; it sounds like the most obvious risks are implicitly addressed (e.g. "does it work if one changes to link with mold", as discussed in comments above). So I'm going to approve it, though its also not yet clear to me why its important to make this change... |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (22a2425): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 677.195s -> 676.361s (-0.12%) |
There was no other motivation than me being confused about it, exactly because it's redundant. |
Since
-isysroot
is set, Clang already passes this when invoking the linker.See #56833 for when the
-isysroot
was originally added, but didn't remove the unnecessary linker flag.CC @BlackHoleFox
r? shepmaster