Link object files that use #[used] by dianqk · Pull Request #137426 · rust-lang/rust (original) (raw)

file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
file:.git/config submodule.library/backtrace.active=true
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
---
[RUSTC-TIMING] rustc_borrowck test:false 114.850
   Compiling rustc_driver v0.0.0 (/checkout/compiler/rustc_driver)
error: linking with `clang` failed: exit status: 1
  |
  = note:  "clang" "-Wl,--version-script=/tmp/rustc17As2h/list" "-Wl,--no-undefined-version" "-m64" "/tmp/rustc17As2h/symbols.o" "<253 object files omitted>" "<sysroot>-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_driver-774f694bdb7deb15.0c7313dw7euea77omqyi4yki5.rcgu.rmeta" "-Wl,--as-needed" "-Wl,-Bstatic" "/tmp/rustc17As2h/{librustc_codegen_llvm-6a81856ba97f4eba.rlib,librustc_llvm-8ed1c7633feca432.rlib,libblake3-c6c459bef0d0f74f.rlib,libpsm-e146f4bd642e37ac.rlib,libprofiler_builtins-c72ca7fe3dac98c5.rlib}.rlib" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib/{libcompiler_builtins-*}.rlib" "-Wl,-Bdynamic" "-lLLVM-20-rust-1.87.0-nightly" "-ldl" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "-fuse-ld=lld" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "<sysroot>-rustc/x86_64-unknown-linux-gnu/release/build/psm-bee8a26e2991f023/out" "-L" "<sysroot>-rustc/x86_64-unknown-linux-gnu/release/build/blake3-73e53664fd4755c1/out" "-L" "<sysroot>-rustc/x86_64-unknown-linux-gnu/release/build/blake3-73e53664fd4755c1/out" "-L" "<sysroot>-rustc/x86_64-unknown-linux-gnu/release/build/rustc_llvm-2f758f0fe20936e5/out" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/lib" "-L" "/rustroot/bin/../lib/gcc/x86_64-pc-linux-gnu/9.5.0/../../../../lib64" "-L" "<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "<sysroot>-rustc/x86_64-unknown-linux-gnu/release/deps/librustc_driver-774f694bdb7deb15.so" "-shared" "-Wl,-soname=librustc_driver-774f694bdb7deb15.so" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-u" "__llvm_profile_runtime" "-Wl,-z,origin" "-Wl,-rpath,$ORIGIN/../lib" "-Wl,--icf=all"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: rust-lld: error: version script assignment of 'global' to symbol '__addtf3' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__ashlti3' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__ashrti3' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__bswapdi2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__bswapsi2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__clzdi2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__clzti2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__ctzdi2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__ctzti2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__divmodti4' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__divtf3' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__eqtf2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__extenddftf2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__extendsftf2' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__fixsfti' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__fixtfdi' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__fixtfsi' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__fixtfti' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__fixunsdfdi' failed: symbol not defined
          rust-lld: error: version script assignment of 'global' to symbol '__fixunssfdi' failed: symbol not defined
          rust-lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

[RUSTC-TIMING] rustc_driver test:false 103.696
error: could not compile `rustc_driver` (lib) due to 1 previous error
Build completed unsuccessfully in 0:13:49
---
Caused by:
    Command RUST_BACKTRACE=full python3 /checkout/x.py build --target x86_64-unknown-linux-gnu --host x86_64-unknown-linux-gnu --stage 2 library/std --rust-profile-generate /tmp/tmp-multistage/opt-artifacts/rustc-pgo --set llvm.thin-lto=false --set llvm.link-shared=true [at /checkout/obj] has failed with exit code Some(1)

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc:🧵:String>
             at /rust/deps/anyhow-1.0.95/src/backtrace.rs:27:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/exec.rs:80:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/exec.rs:181:9
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/main.rs:222:13
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/main.rs:222:13
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/main.rs:211:9
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/main.rs:211:9
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, opt_dist::training::RustcPGOProfile>
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/timer.rs:111:22
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/main.rs:208:29
   8: opt_dist::main
             at /rustc/46536f154414de0c4e28d0e9297a5ac10ef00174/src/tools/opt-dist/src/main.rs:399:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/core/src/ops/function.rs:250:5
  10: std::sys::backtrace::__rust_begin_short_backtrace::<fn() -> core::result::Result<(), anyhow::Error>, core::result::Result<(), anyhow::Error>>
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/sys/backtrace.rs:152:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/rt.rs:199:18
  12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
  13: std::panicking::try::do_call
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/panicking.rs:587:40
  14: std::panicking::try
             at /rustc/f0cb41030579cd1a6f72bd23f38e677052d5d485/library/std/src/panicking.rs:550:19