-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
compiler: Classify various compiler-rt and libunwind names accurately and satisfy them #22167
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a library that ships with GCC and provides fallback implementations of atomic intrinsics where necessary. Since we do the same in our compiler-rt implementation, and since some build systems insist on passing -latomic even for Clang (which zig cc masquerades as), just satisfy this dependency by way of compiler-rt. Closes ziglang#22165.
The real libgcc_s is a compiler-provided library; it works just fine with both glibc and musl. There's no reason that I can see for this check to be limited to glibc-based targets.
This is GCC's take on libunwind. We can satisfy it by way of our bundled LLVM libunwind implementation. Closes ziglang#17268.
This is GCC's equivalent to compiler-rt. The two libraries have a huge overlap in exported symbols, so we may as well satisfy it this way to increase compatibility with build systems in the wild.
* This warning's wording is actually inaccurate when using the -fno-compiler-rt or -rtlib=none options. * It's not all that helpful; it's already understood that these libraries are part of the compiler, so printing a warning is just noise. In practice, this warning would always happen when building upstream musl, for example. * We don't warn when we satisfy -lunwind using our bundled libunwind either, or various libc libraries using our bundled libc, or when providing libc++, etc. So I really don't think we should be warning here either.
alexrp
force-pushed
the
compiler-rt-names
branch
from
December 6, 2024 13:57
22a1f5f
to
da794ec
Compare
This is, roughly, GCC's equivalent of libc++abi.
This is a GCC library providing symbols with stack smashing protection. We provide (most of) these symbols in our compiler-rt.
andrewrk
reviewed
Dec 6, 2024
Comment on lines
-3842
to
-3843
warn("ignoring superfluous library '{s}': this dependency is fulfilled instead by compiler-rt which zig unconditionally provides", .{lib_name}); | ||
continue; |
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.
why is this gone now?
edit: nvm I see you addressed it in the commit message.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #17268.
Closes #22165.