File tree 2 files changed +17
-6
lines changed
host-x86_64/x86_64-gnu-llvm-15
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/
35
35
COPY scripts/sccache.sh /scripts/
36
36
RUN sh /scripts/sccache.sh
37
37
38
- # Make `libgccjit.so` accessible.
38
+ # Make `libgccjit.so` accessible to the linker .
39
39
RUN 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/"
42
40
43
41
# We are disabling CI LLVM since this builder is intentionally using a host
44
42
# LLVM, rather than the typical src/llvm-project LLVM.
@@ -53,8 +51,8 @@ ENV RUST_CONFIGURE_ARGS \
53
51
--build=x86_64-unknown-linux-gnu \
54
52
--llvm-root=/usr/lib/llvm-15 \
55
53
--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
58
56
59
57
COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
60
58
Original file line number Diff line number Diff line change 267
267
SUMMARY_FILE=github-summary.md
268
268
touch $objdir /${SUMMARY_FILE}
269
269
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
+
270
283
docker \
271
284
run \
272
285
--workdir /checkout/obj \
273
286
--env SRC=/checkout \
274
- --env " ENABLE_GCC_CODEGEN= $ENABLE_GCC_CODEGEN " \
287
+ $extra_env \
275
288
$args \
276
289
--env CARGO_HOME=/cargo \
277
290
--env DEPLOY \
You can’t perform that action at this time.
0 commit comments