blob: fa2249f5f0412af7d41b656e6414fc96cbde4950 [file]
name: Remove rustc-dev
description: >
Removes the rustc-dev component, whose copies of the compiler dependencies (like libc) sit next
to the standard library in the rustup sysroot and make `extern crate libc` ambiguous (E0464).
Use it once nothing needs to compile rustc_codegen_gcc anymore.
runs:
using: composite
steps:
- shell: bash
run: |
# Otherwise, rustup reinstalls it on the next `cargo` or `rustc` call.
sed -i -E 's/"rustc-dev",? *//' rust-toolchain.toml
if grep -q rustc-dev rust-toolchain.toml; then
echo "::error::failed to remove rustc-dev from rust-toolchain.toml"
exit 1
fi
rustup component remove rustc-dev
ls "$(rustc --print sysroot)"/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-*