Skip to content

Commit f1762db

Browse files
committed
attempt to override the linker in the run.sh script
1 parent 9616a73 commit f1762db

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ci/run-docker.sh

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ if [ $# -lt 1 ]; then
1111
fi
1212

1313
run() {
14+
# Set the linker that is used for the host (e.g. when compiling a build.rs)
15+
# This overrides any configuration in e.g. `.cargo/config.toml`, which will
16+
# probably not work within the docker container.
17+
HOST_LINKER="CARGO_TARGET_$(rustc --print host-tuple | tr a-z A-Z | tr '-' '_')_LINKER"
18+
1419
# Prevent `Read-only file system (os error 30)`.
1520
cargo generate-lockfile
1621

@@ -25,6 +30,7 @@ run() {
2530
--env CARGO_HOME=/cargo \
2631
--env CARGO_TARGET_DIR=/checkout/target \
2732
--env TARGET="${1}" \
33+
--env "${HOST_LINKER}"="cc" \
2834
--env STDARCH_TEST_EVERYTHING \
2935
--env STDARCH_DISABLE_ASSERT_INSTR \
3036
--env NOSTD \

0 commit comments

Comments
 (0)