File tree 2 files changed +11
-5
lines changed
src/ci/docker/host-x86_64
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/
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,7 @@ 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
+ --set rust.thin-lto-import-instr-limit=10
58
55
59
56
COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
60
57
Original file line number Diff line number Diff line change @@ -42,11 +42,20 @@ ENV NO_DOWNLOAD_CI_LLVM 1
42
42
# be missing.
43
43
ENV IS_NOT_LATEST_LLVM 1
44
44
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
+
45
53
# Using llvm-link-shared due to libffi issues -- see #34486
46
54
ENV RUST_CONFIGURE_ARGS \
47
55
--build=x86_64-unknown-linux-gnu \
48
56
--llvm-root=/usr/lib/llvm-16 \
49
57
--enable-llvm-link-shared \
58
+ $USE_NEW_MANGLING \
50
59
--set rust.thin-lto-import-instr-limit=10
51
60
52
61
COPY host-x86_64/x86_64-gnu-llvm-15/script.sh /tmp/
You can’t perform that action at this time.
0 commit comments