-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesA-linkersArea: linkers... you gotta love linkersArea: linkers... you gotta love linkersC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCL-linker_messagesLint: linker_messagesLint: linker_messagesT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
#119286 unsilences linker warnings by default, and then promptly silences them again for rust-lang/rust itself. We should investigate and fix them.
So far I have seen the following kinds of warnings:
-
ignoring duplicate libraries: -lm
on MacOS when running any tests/ui-fulldeps test, and also when building rustc itself for stage 2. -
ld: cannot export hidden symbol compiler_builtins::int::leading_zeros::__clzdi2::ha6dd05e8d8124fab
when building compiler-builtins -
ld: cannot export hidden symbol ___llvm_profile_filename
when building tests/ui/issues/issue-85461.rs -
ld: build/x86_64-unknown-linux-gnu/stage1-tools/cg_gcc/mini_core.mini_core.2ab949a2a8595fff-cgu.0.rcgu.o: relocation in read-only section `.rodata.global.c'
andld: creating DT_TEXTREL in a shared object
when building rustc_codegen_gcc
and they are silenced in these places:
rust/src/bootstrap/src/core/build_steps/test.rs
Lines 1869 to 1872 in 4b4007a
// FIXME: on macOS, we get linker warnings about duplicate `-lm` flags. We should investigate why this happens. if suite == "ui-fulldeps" && target.ends_with("darwin") { hostflags.push("-Alinker_messages".into()); targetflags.push("-Alinker_messages".into()); rust/src/bootstrap/src/core/build_steps/test.rs
Lines 3587 to 3588 in 4b4007a
// cg_gcc's build system ignores RUSTFLAGS. pass some flags through CG_RUSTFLAGS instead. .env("CG_RUSTFLAGS", "-Alinker-messages") rust/src/bootstrap/src/core/builder/cargo.rs
Line 276 in 4b4007a
self.rustflags.arg("-Alinker-messages");
@rustbot label S-tracking-issue
jieyouxu
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesA-linkersArea: linkers... you gotta love linkersArea: linkers... you gotta love linkersC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCL-linker_messagesLint: linker_messagesLint: linker_messagesT-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.