about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xlibrary/stdarch/ci/run-docker.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/stdarch/ci/run-docker.sh b/library/stdarch/ci/run-docker.sh
index 0958bc8e67b..af83a32ecae 100755
--- a/library/stdarch/ci/run-docker.sh
+++ b/library/stdarch/ci/run-docker.sh
@@ -11,6 +11,11 @@ if [ $# -lt 1 ]; then
 fi
 
 run() {
+    # Set the linker that is used for the host (e.g. when compiling a build.rs)
+    # This overrides any configuration in e.g. `.cargo/config.toml`, which will
+    # probably not work within the docker container.
+    HOST_LINKER="CARGO_TARGET_$(rustc --print host-tuple | tr '[:lower:]-' '[:upper:]_')_LINKER"
+
     # Prevent `Read-only file system (os error 30)`.
     cargo generate-lockfile
 
@@ -25,6 +30,7 @@ run() {
       --env CARGO_HOME=/cargo \
       --env CARGO_TARGET_DIR=/checkout/target \
       --env TARGET="${1}" \
+      --env "${HOST_LINKER}"="cc" \
       --env STDARCH_TEST_EVERYTHING \
       --env STDARCH_DISABLE_ASSERT_INSTR \
       --env NOSTD \