This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
host-x86_64/x86_64-gnu-llvm-15 Expand file tree Collapse file tree 2 files changed +17
-6
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,8 @@ 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+ $USE_NEW_MANGLING \
55+ --set rust.thin-lto-import-instr-limit=10
5856
5957COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
6058
Original file line number Diff line number Diff line change 267267SUMMARY_FILE=github-summary.md
268268touch $objdir /${SUMMARY_FILE}
269269
270+ extra_env=" "
271+ if [ " $ENABLE_GCC_CODEGEN " = " 1" ]; then
272+ extra_env=" $EXTRA_ENV --env ENABLE_GCC_CODEGEN=1"
273+ # If `ENABLE_GCC_CODEGEN` is set and not empty, we add the `--enable-new-symbol-mangling`
274+ # argument to `RUST_CONFIGURE_ARGS` and set the `GCC_EXEC_PREFIX` environment variable.
275+ # `cg_gcc` doesn't support the legacy mangling so we need to enforce the new one
276+ # if we run `cg_gcc` tests.
277+ extra_env=" $EXTRA_ENV --env USE_NEW_MANGLING=--enable-new-symbol-mangling"
278+ # Fix rustc_codegen_gcc lto issues.
279+ extra_env=" $EXTRA_ENV --env GCC_EXEC_PREFIX=/usr/lib/gcc/"
280+ echo " Setting extra environment values for docker: $extra_env "
281+ fi
282+
270283docker \
271284 run \
272285 --workdir /checkout/obj \
273286 --env SRC=/checkout \
274- --env " ENABLE_GCC_CODEGEN= $ENABLE_GCC_CODEGEN " \
287+ $extra_env \
275288 $args \
276289 --env CARGO_HOME=/cargo \
277290 --env DEPLOY \
You can’t perform that action at this time.
0 commit comments