reset the host linker
The host's linker is used to compile build.rs files (e.g. for libc). When the user configures a custom liker (e.g. mold) in their own .cargo/config.toml or ~/.cargo/config.toml, that linker will likely not work when running run-docker.sh. So, we now reset it to `cc`, which should always be installed in the docker container.
This commit is contained in:
parent
a4ddd6c5ff
commit
e0b634ecae
1 changed files with 6 additions and 0 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue