-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Link object files that use #[used]
#137426
base: master
Are you sure you want to change the base?
Conversation
The job Click to see the possible cause of the failure (guessed by this bot)
|
Weird. The tests failed on macOS after I fixed various test cases. I'll look into it tomorrow. |
I think we should link all rlibs with |
By directly linking the object files that use
#[used]
, we ensure the linker can see them.This approach allows
#[used]
to avoid modifying symbol visibility, preserving local symbols. A similar example in C would be:If
foo.c
is placed in a static library, it will never be loaded unless the entire static library is fully loaded by--whole-archive
.This pull request removes some of the symbols in
symbols.o
. We can remove more symbols in a follow-up PR.try-job: x86_64-msvc-1
try-job: aarch64-apple
r? bjorn3