Skip to content

try to make rustc-dev work with and without LTO - #161535

Draft
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:aarch64-lto-compat
Draft

try to make rustc-dev work with and without LTO#161535
RalfJung wants to merge 1 commit into
rust-lang:mainfrom
RalfJung:aarch64-lto-compat

Conversation

@RalfJung

@RalfJung RalfJung commented Aug 22, 2026

Copy link
Copy Markdown
Member

View all comments

This might fix the issues introduced by #161260.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Aug 22, 2026
@RalfJung

Copy link
Copy Markdown
Member Author

@bors try jobs=dist*linux

rust-bors Bot pushed a commit that referenced this pull request Aug 22, 2026
try to make rustc-dev work with and without LTO


try-job: dist*linux
@rust-bors

This comment has been minimized.

@weihanglo

Copy link
Copy Markdown
Member

try jobs=dist*linux

TIL glob is supported.

// Compiling C deps, like jemalloc and llvm-wrapper, should be with
// the same LTO mode as the Rust code they are linked into.
// Compiling C deps, like jemalloc and llvm-wrapper, should be with the same LTO mode as
// the Rust code they are linked into. We don't pass the checks cc-rs uses to

@Zoxc Zoxc Aug 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be with the same LTO mode as the Rust code they are linked into
Just a note that this doesn't seem very true.

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, the discussion happens in #t-compiler > Analysing broken jemalloc rlib

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note that this doesn't seem very true.

I just reformatted that comment, I don't know if it is correct.
What would be more correct?

@weihanglo

weihanglo commented Aug 22, 2026

Copy link
Copy Markdown
Member

Should we do something like this after the let lto_flags = ...?

            if lto_cflag.is_some()
                && builder.config.bootstrap_override_lld.is_used()
                && !target.is_msvc()
            {
                self.rustflags.arg("-Clink-args=-Wl,--fat-lto-objects");
            }

I am testing dist build on my machine still though.

@rust-bors

rust-bors Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: a4edfb9 (a4edfb99457ab3be0979b69702c5a12bb7d12269)
Base parent: b0ca9c7 (b0ca9c712455d865c3bf0bf5325a3e79677a2d97)

@weihanglo

Copy link
Copy Markdown
Member

I guess we want a perf build

@rust-timer build a4edfb9

@rust-timer

This comment has been minimized.

@RalfJung

Copy link
Copy Markdown
Member Author

Should we do something like this after the let lto_flags = ...?

I have no idea.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (a4edfb9): comparison URL.

Overall result: ❌ regressions - please read:

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

Next, please: If you can, justify the regressions found in this try perf run in writing along with @rustbot label: +perf-regression-triaged. If not, fix the regressions and do another perf run. Neutral or positive results will clear the label automatically.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf +perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.7% [0.3%, 3.3%] 286
Regressions ❌
(secondary)
0.9% [0.0%, 3.3%] 363
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.7% [0.3%, 3.3%] 286

Max RSS (memory usage)

Results (primary -2.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.8% [-2.8%, -2.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.8% [-2.8%, -2.8%] 1

Cycles

Results (secondary 3.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.4% [3.0%, 3.8%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 469.195s -> 470.485s (0.27%)
Artifact size: 400.17 MiB -> 399.74 MiB (-0.11%)

@rustbot rustbot added the perf-regression Performance regression. label Aug 22, 2026
@RalfJung

Copy link
Copy Markdown
Member Author

This did fix Miri but I guess it also broke LTO. I'll try the magic linker incantation you mentioned above then.

@RalfJung
RalfJung force-pushed the aarch64-lto-compat branch from 8975695 to d2077da Compare August 22, 2026 21:32
@RalfJung

Copy link
Copy Markdown
Member Author

@bors try jobs=dist*linux
@rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 22, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 22, 2026
try to make rustc-dev work with and without LTO


try-job: dist*linux
Comment thread src/bootstrap/src/core/builder/cargo.rs Outdated
// Make sure the linker actually uses the fat LTO part.
if lto_cflag.is_some()
&& builder.config.bootstrap_override_lld.is_used()
&& !target.is_msvc()

@RalfJung RalfJung Aug 22, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW I don't understand why we need to check for MSVC here, given that above we already check for clang.

Also, when does it ever make sense to set -ffat-lto-objects without setting the link-args as well?

View changes since the review

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC clang-cl.exe still produces COFF object, right? So even it is clang-like we should not pass that link arg, as it is not supported yet.

https://llvm.org/docs/FatLTO.html#supported-file-formats

Or alternativelu we should just apply to x86_64 Linux as we previously discussed.

@weihanglo weihanglo Aug 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://releases.llvm.org/22.1.0/tools/lld/docs/ReleaseNotes.html#coff-improvements

Oh! In LLVM 22 COFF gains the support of fat LTO.
Though according to bjorn3 we are still on 21 right now.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, when does it ever make sense to set -ffat-lto-objects without setting the link-args as well?

And yeah it probably makes little sense. We may be able to just figure out the minimal condition and coerce them in one of block

@weihanglo weihanglo Aug 22, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the entire code can be simplified to this?

let lto_cflag = if matches!(self.mode, Mode::Rustc | Mode::ToolRustcPrivate)
    && is_lto_stage(&self.compiler)
    && builder.cc_tool(target).is_like_clang()
    && builder.config.bootstrap_override_lld.is_used() // unsure if we should take care of non-dist config for downstream packagers
{

    let lto_cflag = match builder.config.rust_lto {
        RustcLto::Thin => Some("-flto=thin -ffat-lto-objects"),
        RustcLto::Fat => Some("-flto=full -ffat-lto-objects"),
        RustcLto::ThinLocal | RustcLto::Off => None,
    };

    if lto_cflag.is_some() {
        self.rustflags.arg("-Clink-args=-Wl,--fat-lto-objects");
    }
    lto_cflag
} else {
    None
};

@weihanglo

Copy link
Copy Markdown
Member

So I got a result of libtikv_jemalloc_sys.rlib size on aarch64

  • native (pre PR 161260, c656540): 4.81 MB
  • bitcode only (PR 161260, 124c16e): 4.84 MB
  • fat LTO object (this PR, d2077da): 9.54 MB

All above are uncompressed size.

@rust-bors

rust-bors Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 5db500f (5db500f538a1f4727c942992cbc3d05b437d5930)
Base parent: 78c04b6 (78c04b6a348438fb9396b8864cd34f92fb99cd53)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (5db500f): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.3% [0.3%, 0.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

This perf run didn't have relevant results for this metric.

Cycles

Results (secondary -8.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.3% [1.3%, 1.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-12.7% [-13.0%, -12.4%] 2
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.0%, secondary -0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 5
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 1
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 5

Bootstrap: 468.574s -> 466.803s (-0.38%)
Artifact size: 400.20 MiB -> 400.15 MiB (-0.01%)

@rustbot rustbot removed S-waiting-on-perf Status: Waiting on a perf run to be completed. perf-regression Performance regression. labels Aug 23, 2026
@weihanglo

Copy link
Copy Markdown
Member

And for x86_64 uncompressed libtikv_jemalloc_sys.rlib:

  • no native state
  • bitcode only (PR 161260, 124c16e): 4.82 MB
  • fat LTO (this PR trybuild, 5db500f): 9.41 MB

@RalfJung

RalfJung commented Aug 23, 2026

Copy link
Copy Markdown
Member Author

On aarch64-linux, the rustc-dev component went from 125 MiB to 128 MiB.
On x86-64-linux, it went from 142 MiB to 143 MiB.

That seems fine? That's compressed size obviously though, so this may consume a lot more disk space if it compresses very well. If I check locally the whole folder lib/rustlib/x86_64-unknown-linux-gnu/lib it went from 773 MiB to 777 MiB... looks like that tikv file is the only file that got bigger.^^

@RalfJung
RalfJung force-pushed the aarch64-lto-compat branch from d2077da to 7fe93be Compare August 23, 2026 06:40
@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Aug 23, 2026
@RalfJung

Copy link
Copy Markdown
Member Author

@bors try jobs=distlinux,distmsvc,dist*apple

@rust-bors

rust-bors Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

⌛ Trying commit 7fe93be with merge 956a99e

To cancel the try build, run the command @bors try cancel.

Workflow: https://github.com/rust-lang/rust/actions/runs/32623605480

rust-bors Bot pushed a commit that referenced this pull request Aug 23, 2026
try to make rustc-dev work with and without LTO


try-job: dist*linux
try-job: dist*msvc
try-job: dist*apple
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job dist-aarch64-linux failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  process didn't exit successfully: `/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/release/build/tikv-jemalloc-sys/aa37c962234aae78/out/build_script_build` (exit status: 101)
  --- stdout
  TARGET=aarch64-unknown-linux-gnu
  HOST=aarch64-unknown-linux-gnu
  NUM_JOBS=8
  OUT_DIR="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out"
  BUILD_DIR="/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build"
  SRC_DIR="/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tikv-jemalloc-sys-0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7"
  cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_JEMALLOC_OVERRIDE
  cargo:rerun-if-env-changed=JEMALLOC_OVERRIDE
  cargo:rerun-if-env-changed=CC_aarch64-unknown-linux-gnu
  CC_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_aarch64_unknown_linux_gnu
  CC_aarch64_unknown_linux_gnu = Some(sccache clang)
  cargo:rerun-if-env-changed=CC_KNOWN_WRAPPER_CUSTOM
  CC_KNOWN_WRAPPER_CUSTOM = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
  CFLAGS_aarch64_unknown_linux_gnu = Some(-fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects)
  cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS
  CC_SHELL_ESCAPED_FLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
  CFLAGS_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
  CFLAGS_aarch64_unknown_linux_gnu = Some(-fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects)
  cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS
  CC_SHELL_ESCAPED_FLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
  CFLAGS_aarch64-unknown-linux-gnu = None
  cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  cargo:rerun-if-env-changed=HOST_CFLAGS
  HOST_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_unknown_linux_gnu
  CFLAGS_aarch64_unknown_linux_gnu = Some(-fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects)
  cargo:rerun-if-env-changed=CC_SHELL_ESCAPED_FLAGS
  CC_SHELL_ESCAPED_FLAGS = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64-unknown-linux-gnu
  CFLAGS_aarch64-unknown-linux-gnu = None
  cargo:warning=Inherited flag "-fembed-bitcode=all" is not supported by the currently used CC
  CC="clang"
  CFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects"
  JEMALLOC_REPO_DIR="jemalloc"
  cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_MALLOC_CONF
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_MALLOC_CONF
  cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_PAGE
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_PAGE
  --with-lg-page=16
  cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_HUGEPAGE
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_HUGEPAGE
  cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_QUANTUM
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_QUANTUM
  cargo:rerun-if-env-changed=AARCH64_UNKNOWN_LINUX_GNU_JEMALLOC_SYS_WITH_LG_VADDR
  cargo:rerun-if-env-changed=JEMALLOC_SYS_WITH_LG_VADDR
  CARGO_FEATURE_STATS not set
  running: cd "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build" && CC="clang" CFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects" CPPFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects" LDFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects" "sh" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build/configure" "--with-version=5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-lg-page=16" "--with-private-namespace=_rjem_" "--disable-stats" "--host=aarch64-unknown-linux-gnu" "--build=aarch64-unknown-linux-gnu" "--prefix=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out"
  checking for xsltproc... false
  checking for aarch64-unknown-linux-gnu-gcc... clang
  checking whether the C compiler works... no
  running: "cat" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build/config.log"
  This file contains any messages produced by compilers while
  running configure, to aid debugging if configure makes a mistake.

  It was created by configure, which was
  generated by GNU Autoconf 2.69.  Invocation command line was

    $ /checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build/configure --with-version=5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 --disable-cxx --enable-doc=no --enable-shared=no --with-lg-page=16 --with-private-namespace=_rjem_ --disable-stats --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --prefix=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out

  ## --------- ##
  ## Platform. ##
  ## --------- ##

  hostname = 08fab0a5637f
  uname -m = aarch64
  uname -r = 6.17.0-1022-azure
  uname -s = Linux
  uname -v = #22-Ubuntu SMP Mon Jul 27 17:12:01 UTC 2026

  /usr/bin/uname -p = aarch64
  /bin/uname -X     = unknown

  /bin/arch              = aarch64
---
  configure:3049: checking for C compiler version
  configure:3058: clang --version >&5
  clang version 23.1.0git
  Target: aarch64-unknown-linux-gnu
  Thread model: posix
  InstalledDir: /rustroot/bin
  configure:3069: $? = 0
  configure:3058: clang -v >&5
  clang version 23.1.0git
  Target: aarch64-unknown-linux-gnu
  Thread model: posix
  InstalledDir: /rustroot/bin
  Found candidate GCC installation: /rustroot/bin/../lib/gcc/aarch64-unknown-linux-gnu/9.5.0
  Selected GCC installation: /rustroot/bin/../lib/gcc/aarch64-unknown-linux-gnu/9.5.0
  Candidate multilib: .;@m64
  Selected multilib: .;@m64
  configure:3069: $? = 0
  configure:3058: clang -V >&5
  clang: error: argument to '-V' is missing (expected 1 value)
  clang: error: no input files
  configure:3069: $? = 1
  configure:3058: clang -qversion >&5
  clang: error: unknown argument '-qversion'; did you mean '--version'?
  clang: error: no input files
  configure:3069: $? = 1
  configure:3089: checking whether the C compiler works
  configure:3111: clang -O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects -O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects -O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects conftest.c  >&5
  /usr/bin/ld: /rustroot/bin/../lib/LLVMgold.so: error loading plugin: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /rustroot/bin/../lib/LLVMgold.so)
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  configure:3115: $? = 1
  configure:3153: result: no
  configure: failed program was:
  | /* confdefs.h */
  | #define PACKAGE_NAME ""
  | #define PACKAGE_TARNAME ""
  | #define PACKAGE_VERSION ""
  | #define PACKAGE_STRING ""
  | #define PACKAGE_BUGREPORT ""
  | #define PACKAGE_URL ""
  | /* end confdefs.h.  */
  | 
  | int
  | main ()
  | {
  | 
---
  ## ---------------- ##
  ## Cache variables. ##
  ## ---------------- ##

  ac_cv_env_CCC_set=
  ac_cv_env_CCC_value=
  ac_cv_env_CC_set=set
  ac_cv_env_CC_value=clang
  ac_cv_env_CFLAGS_set=set
  ac_cv_env_CFLAGS_value='-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'
  ac_cv_env_CPPFLAGS_set=set
  ac_cv_env_CPPFLAGS_value='-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'
  ac_cv_env_CPP_set=
  ac_cv_env_CPP_value=
  ac_cv_env_CXXFLAGS_set=
  ac_cv_env_CXXFLAGS_value=
  ac_cv_env_CXX_set=set
  ac_cv_env_CXX_value=clang++
  ac_cv_env_LDFLAGS_set=set
  ac_cv_env_LDFLAGS_value='-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'
  ac_cv_env_LIBS_set=
  ac_cv_env_LIBS_value=
  ac_cv_env_build_alias_set=set
  ac_cv_env_build_alias_value=aarch64-unknown-linux-gnu
  ac_cv_env_host_alias_set=set
  ac_cv_env_host_alias_value=aarch64-unknown-linux-gnu
  ac_cv_env_target_alias_set=
  ac_cv_env_target_alias_value=
  ac_cv_path_XSLTPROC=false
  ac_cv_prog_CC=clang

  ## ----------------- ##
  ## Output variables. ##
  ## ----------------- ##

  AR=''
  ARFLAGS=''
  AROUT=''
  AUTOCONF=''
  AWK=''
  BINDIR='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/bin'
  CC='clang'
  CC_MM=''
  CFLAGS='-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'
  CONFIG='--with-version=5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7 --disable-cxx --enable-doc=no --enable-shared=no --with-lg-page=16 --with-private-namespace=_rjem_ --disable-stats --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --prefix=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out build_alias=aarch64-unknown-linux-gnu host_alias=aarch64-unknown-linux-gnu CC=clang '\''CFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'\'' '\''LDFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'\'' '\''CPPFLAGS=-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'\'' CXX=clang++'
  CONFIGURE_CFLAGS=''
  CONFIGURE_CXXFLAGS=''
  CPP=''
  CPPFLAGS='-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'
  CTARGET=''
  CXX='clang++'
  CXXFLAGS=''
  DATADIR='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/share'
  DEFS=''
  DSO_LDFLAGS=''
  DUMP_SYMS=''
  ECHO_C=''
  ECHO_N='-n'
  ECHO_T=''
  EGREP=''
  EXEEXT=''
  EXTRA_CFLAGS=''
  EXTRA_CXXFLAGS=''
  EXTRA_LDFLAGS=''
  GREP=''
  HAVE_CXX14=''
  HAVE_CXX17=''
  INCLUDEDIR='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/include'
  INSTALL_DATA=''
  INSTALL_PROGRAM=''
  INSTALL_SCRIPT=''
  JEMALLOC_CPREFIX=''
  JEMALLOC_PREFIX=''
  LD=''
  LDFLAGS='-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'
  LDTARGET=''
  LD_PRELOAD_VAR=''
  LIBDIR='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/lib'
  LIBOBJS=''
  LIBS=''
  LM=''
  LTLIBOBJS=''
  MANDIR='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/share/man'
  MKLIB=''
  NM=''
  OBJEXT=''
  PACKAGE_BUGREPORT=''
  PACKAGE_NAME=''
  PACKAGE_STRING=''
  PACKAGE_TARNAME=''
  PACKAGE_URL=''
  PACKAGE_VERSION=''
  PATH_SEPARATOR=':'
  PIC_CFLAGS=''
  PREFIX='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out'
  RANLIB=''
  RPATH=''
  RPATH_EXTRA=''
  SHELL='/bin/sh'
  SOREV=''
  SPECIFIED_CFLAGS='-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects'
  SPECIFIED_CXXFLAGS=''
  TEST_LD_MODE=''
  XSLROOT=''
  XSLTPROC='false'
  a=''
  abi=''
  abs_objroot='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build/'
  abs_srcroot='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build/'
  ac_ct_CC=''
  ac_ct_CXX=''
  bindir='${exec_prefix}/bin'
  build='aarch64-unknown-linux-gnu'
  build_alias='aarch64-unknown-linux-gnu'
  build_cpu=''
  build_os=''
  build_vendor=''
  cfghdrs_in=''
  cfghdrs_out=''
  cfgoutputs_in=''
  cfgoutputs_out=''
  datadir='${datarootdir}'
  datarootdir='${prefix}/share'
  docdir='${datarootdir}/doc/${PACKAGE}'
  dvidir='${docdir}'
  enable_autogen=''
  enable_cache_oblivious=''
  enable_cxx='no'
  enable_debug=''
  enable_doc='no'
  enable_experimental_smallocx=''
  enable_fill=''
  enable_initial_exec_tls=''
  enable_lazy_lock=''
  enable_log=''
  enable_opt_safety_checks=''
  enable_opt_size_checks=''
  enable_prof=''
  enable_readlinkat=''
  enable_shared='no'
  enable_static=''
  enable_stats='no'
  enable_tls=''
  enable_uaf_detection=''
  enable_utrace=''
  enable_xmalloc=''
  enable_zone_allocator=''
  exe=''
  exec_prefix='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out'
  host='aarch64-unknown-linux-gnu'
  host_alias='aarch64-unknown-linux-gnu'
  host_cpu=''
  host_os=''
  host_vendor=''
  htmldir='${docdir}'
  importlib=''
  includedir='${prefix}/include'
  infodir='${datarootdir}/info'
  install_suffix=''
  je_=''
  jemalloc_version=''
  jemalloc_version_bugfix=''
  jemalloc_version_gid=''
  jemalloc_version_major=''
  jemalloc_version_minor=''
  jemalloc_version_nrev=''
  libdir='${exec_prefix}/lib'
  libdl=''
  libexecdir='${exec_prefix}/libexec'
  libprefix=''
  link_whole_archive=''
  localedir='${datarootdir}/locale'
  localstatedir='${prefix}/var'
  mandir='${datarootdir}/man'
  o=''
  objroot=''
  oldincludedir='/usr/include'
  pdfdir='${docdir}'
  prefix='/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out'
  private_namespace=''
  program_transform_name='s,x,x,'
  psdir='${docdir}'
  rev='2'
  sbindir='${exec_prefix}/sbin'
  sharedstatedir='${prefix}/com'
  so=''
  srcroot=''
  sysconfdir='${prefix}/etc'
  target_alias=''

  ## ----------- ##
  ## confdefs.h. ##
  ## ----------- ##

  /* confdefs.h */
  #define PACKAGE_NAME ""
  #define PACKAGE_TARNAME ""
  #define PACKAGE_VERSION ""
---
  configure: error: C compiler cannot create executables
  See `config.log' for more details

  thread 'main' (82466) panicked at /rust/deps/tikv-jemalloc-sys-0.6.1+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7/build.rs:411:9:
  command did not execute successfully: cd "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build" && CC="clang" CFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects" CPPFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects" LDFLAGS="-O3 -ffunction-sections -fdata-sections -fPIC --target=aarch64-unknown-linux-gnu -fprofile-generate=/tmp/tmp-multistage/opt-artifacts/rustc-pgo -fdebug-prefix-map=/checkout=/rustc/956a99e52c84ca2079daf9b62f725c96376a04bb -flto=thin -ffat-lto-objects" "sh" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out/build/configure" "--with-version=5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" "--disable-cxx" "--enable-doc=no" "--enable-shared=no" "--with-lg-page=16" "--with-private-namespace=_rjem_" "--disable-stats" "--host=aarch64-unknown-linux-gnu" "--build=aarch64-unknown-linux-gnu" "--prefix=/checkout/obj/build/aarch64-unknown-linux-gnu/stage2-rustc/aarch64-unknown-linux-gnu/release/build/tikv-jemalloc-sys/e6bd34c09c95e6e7/out"
  expected success, got: exit status: 77
  stack backtrace:
     0:     0xaaf0460f85e0 - std[536abd44142cb84c]::backtrace_rs::backtrace::libunwind::trace
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/../../backtrace/src/backtrace/libunwind.rs:117:9
     1:     0xaaf0460f85e0 - std[536abd44142cb84c]::backtrace_rs::backtrace::trace_unsynchronized::<std[536abd44142cb84c]::sys::backtrace::_print_fmt::{closure#1}>
---
    11:     0xaaf0460f2bc0 - std[536abd44142cb84c]::panicking::panic_with_hook
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panicking.rs:812:13
    12:     0xaaf0460db220 - std[536abd44142cb84c]::panicking::panic_handler::{closure#0}
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panicking.rs:686:13
    13:     0xaaf0460d5860 - std[536abd44142cb84c]::sys::backtrace::__rust_end_short_backtrace::<std[536abd44142cb84c]::panicking::panic_handler::{closure#0}, !>
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/sys/backtrace.rs:182:18
    14:     0xaaf0460dbaf4 - __rustc[fb1c4b4f6f89677b]::rust_begin_unwind
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panicking.rs:677:5
    15:     0xaaf04610d850 - core[c82988231e2510af]::panicking::panic_fmt
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/core/src/panicking.rs:80:14
    16:     0xaaf04606c050 - build_script_build[9bca80fd9a5de255]::execute::<build_script_build[9bca80fd9a5de255]::run_and_log::{closure#0}>
    17:     0xaaf04606e98c - build_script_build[9bca80fd9a5de255]::run_and_log
    18:     0xaaf046071aa4 - build_script_build[9bca80fd9a5de255]::main
    19:     0xaaf046073f0c - <fn() as core[c82988231e2510af]::ops::function::FnOnce<()>>::call_once
    20:     0xaaf04606db94 - std[536abd44142cb84c]::sys::backtrace::__rust_begin_short_backtrace::<fn(), ()>
    21:     0xaaf04606e208 - std[536abd44142cb84c]::rt::lang_start::<()>::{closure#0}
    22:     0xaaf0460f1c54 - <&dyn core[c82988231e2510af]::ops::function::Fn<(), Output = i32> + core[c82988231e2510af]::marker::Sync + core[c82988231e2510af]::panic::unwind_safe::RefUnwindSafe as core[c82988231e2510af]::ops::function::FnOnce<()>>::call_once
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/core/src/ops/function.rs:287:21
    23:     0xaaf0460f1c54 - std[536abd44142cb84c]::panicking::catch_unwind::do_call::<&dyn core[c82988231e2510af]::ops::function::Fn<(), Output = i32> + core[c82988231e2510af]::marker::Sync + core[c82988231e2510af]::panic::unwind_safe::RefUnwindSafe, i32>
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panicking.rs:574:43
    24:     0xaaf0460f1c54 - std[536abd44142cb84c]::panicking::catch_unwind::<i32, &dyn core[c82988231e2510af]::ops::function::Fn<(), Output = i32> + core[c82988231e2510af]::marker::Sync + core[c82988231e2510af]::panic::unwind_safe::RefUnwindSafe>
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panicking.rs:542:19
    25:     0xaaf0460f1c54 - std[536abd44142cb84c]::panic::catch_unwind::<&dyn core[c82988231e2510af]::ops::function::Fn<(), Output = i32> + core[c82988231e2510af]::marker::Sync + core[c82988231e2510af]::panic::unwind_safe::RefUnwindSafe, i32>
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panic.rs:359:14
    26:     0xaaf0460f1c54 - std[536abd44142cb84c]::rt::lang_start_internal::{closure#0}
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/rt.rs:175:24
    27:     0xaaf0460f1c54 - std[536abd44142cb84c]::panicking::catch_unwind::do_call::<std[536abd44142cb84c]::rt::lang_start_internal::{closure#0}, isize>
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panicking.rs:574:43
    28:     0xaaf0460f1c54 - std[536abd44142cb84c]::panicking::catch_unwind::<isize, std[536abd44142cb84c]::rt::lang_start_internal::{closure#0}>
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panicking.rs:542:19
    29:     0xaaf0460f1c54 - std[536abd44142cb84c]::panic::catch_unwind::<std[536abd44142cb84c]::rt::lang_start_internal::{closure#0}, isize>
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/panic.rs:359:14
    30:     0xaaf0460f1c54 - std[536abd44142cb84c]::rt::lang_start_internal
                                 at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/library/std/src/rt.rs:171:5
    31:     0xaaf04606cee0 - std[536abd44142cb84c]::rt::lang_start::<()>
    32:     0xaaf046073f9c - main
---

Stack backtrace:
   0: <anyhow::Error>::msg::<alloc::string::String>
             at /rust/deps/anyhow-1.0.102/src/backtrace.rs:10:14
   1: <opt_dist::exec::CmdBuilder>::run
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/exec.rs:83:17
   2: <opt_dist::exec::Bootstrap>::run
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/exec.rs:274:18
   3: opt_dist::execute_pipeline::{closure#1}::{closure#0}
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/main.rs:270:25
   4: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}::{closure#0}, ()>
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/timer.rs:111:22
   5: opt_dist::execute_pipeline::{closure#1}
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/main.rs:248:19
   6: <opt_dist::timer::TimerSection>::section::<opt_dist::execute_pipeline::{closure#1}, (opt_dist::training::RustcPGOProfile, opt_dist::training::RustdocPGOProfile, core::option::Option<opt_dist::training::ClippyPGOProfile>)>
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/timer.rs:111:22
   7: opt_dist::execute_pipeline
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/main.rs:245:15
   8: opt_dist::main
             at /rustc/956a99e52c84ca2079daf9b62f725c96376a04bb/src/tools/opt-dist/src/main.rs:534:18
   9: <fn() -> core::result::Result<(), anyhow::Error> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/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/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/std/src/sys/backtrace.rs:166:18
  11: std::rt::lang_start::<core::result::Result<(), anyhow::Error>>::{closure#0}
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/std/src/rt.rs:206:18
  12: <&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe as core::ops::function::FnOnce<()>>::call_once
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/core/src/ops/function.rs:287:21
  13: std::panicking::catch_unwind::do_call::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/std/src/panicking.rs:576:43
  14: std::panicking::catch_unwind::<i32, &dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe>
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/std/src/panicking.rs:544:19
  15: std::panic::catch_unwind::<&dyn core::ops::function::Fn<(), Output = i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe, i32>
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/std/src/panic.rs:359:14
  16: std::rt::lang_start_internal::{closure#0}
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/std/src/rt.rs:175:24
  17: std::panicking::catch_unwind::do_call::<std::rt::lang_start_internal::{closure#0}, isize>
             at /rustc/f47d5bb13648d5c859f5b438eb7dc834b9729961/library/std/src/panicking.rs:576:43


# FIXME: Without this, LLVMgold.so incorrectly resolves to the system
# libstdc++, instead of the one we build.
ENV LD_PRELOAD=/rustroot/lib64/libstdc++.so.6

@RalfJung RalfJung Aug 23, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also removed this because maybe we don't need it any more?

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though reading this now I guess what this is trying to say (but mostly leaving implicit) is that we need this LD_PRELOAD so that the LTO linker plugin works, i.e. without this the build succeeds but we don't get LTO?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants