File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
src/ci/docker/host-x86_64 Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -35,10 +35,8 @@ RUN curl -sL "https://github.com/PowerShell/PowerShell/releases/download/v7.3.1/
3535COPY scripts/sccache.sh /scripts/
3636RUN sh /scripts/sccache.sh
3737
38- # Make `libgccjit.so` accessible.
38+ # Make `libgccjit.so` accessible to the linker .
3939RUN ln -s /usr/lib/gcc/x86_64-linux-gnu/12/libgccjit.so /usr/lib/x86_64-linux-gnu/libgccjit.so
40- # Fix rustc_codegen_gcc lto issues.
41- ENV GCC_EXEC_PREFIX="/usr/lib/gcc/"
4240
4341# We are disabling CI LLVM since this builder is intentionally using a host
4442# LLVM, rather than the typical src/llvm-project LLVM.
@@ -53,8 +51,7 @@ ENV RUST_CONFIGURE_ARGS \
5351 --build=x86_64-unknown-linux-gnu \
5452 --llvm-root=/usr/lib/llvm-15 \
5553 --enable-llvm-link-shared \
56- --set rust.thin-lto-import-instr-limit=10 \
57- --enable-new-symbol-mangling
54+ --set rust.thin-lto-import-instr-limit=10
5855
5956COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
6057
Original file line number Diff line number Diff line change @@ -42,11 +42,20 @@ ENV NO_DOWNLOAD_CI_LLVM 1
4242# be missing.
4343ENV IS_NOT_LATEST_LLVM 1
4444
45+ # If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling`
46+ # argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable.
47+ # `cg_gcc` doesn't support the legacy mangling so we need to enforce the new one
48+ # if we run `cg_gcc` tests.
49+ ENV USE_NEW_MANGLING=${ENABLE_GCC_CODEGEN:+ --enable-new-symbol-mangling}
50+ # Fix rustc_codegen_gcc lto issues.
51+ ENV GCC_EXEC_PREFIX=${ENABLE_GCC_CODEGEN:+/usr/lib/gcc/}
52+
4553# Using llvm-link-shared due to libffi issues -- see #34486
4654ENV RUST_CONFIGURE_ARGS \
4755 --build=x86_64-unknown-linux-gnu \
4856 --llvm-root=/usr/lib/llvm-16 \
4957 --enable-llvm-link-shared \
58+ $USE_NEW_MANGLING
5059 --set rust.thin-lto-import-instr-limit=10
5160
5261COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
You can’t perform that action at this time.
0 commit comments