Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions build_scripts/build-rust.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ cp -r "${RUSTUP_HOME}" /manylinux-rootfs"${PREFIX}"/
mkdir -p /manylinux-rootfs"${PREFIX}"/cargo/{registry,git}
chmod -R g+w /manylinux-rootfs"${PREFIX}"/cargo/{registry,git}/

# A crate can pin a different toolchain via rust-toolchain.toml, which makes
# rustup install it at build time. That writes to tmp, downloads, toolchains and
# update-hashes, and updates settings.toml. Not recursive: toolchains/ only needs
# to be writable so a new toolchain directory can be created, and -R here would
# make already-installed toolchain binaries writable too.
mkdir -p /manylinux-rootfs"${PREFIX}"/rustup/{tmp,downloads,toolchains,update-hashes}
chmod g+w /manylinux-rootfs"${PREFIX}"/rustup \
/manylinux-rootfs"${PREFIX}"/rustup/{tmp,downloads,toolchains,update-hashes}
chmod g+w /manylinux-rootfs"${PREFIX}"/rustup/settings.toml

# Create wrapper scripts that set environment variables
mkdir -p /manylinux-rootfs/usr/local/bin
cat > /manylinux-rootfs/usr/local/bin/rustc <<EOF
Expand Down