Skip to content

Commit d836553

Browse files
committed
Remove feature rustc-build-sysroot
1 parent 6a69d24 commit d836553

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,13 @@ jobs:
187187
#
188188
# `RUSTC_BOOTSTRAP` is needed to use `rustc-build-sysroot` on stable Rust.
189189
- name: Test (sysroot built on demand)
190-
env:
191-
RUSTC_BOOTSTRAP: 1
192190
run: |
193-
cargo hack test --feature-powerset \
191+
RUSTC_BOOTSTRAP=1 cargo hack test --feature-powerset \
194192
--exclude-features ${{ matrix.exclude-features }} \
195-
--features ${{ env.LLVM_FEATURES }},rustc-build-sysroot
193+
--features ${{ env.LLVM_FEATURES }}
196194
197195
# To make things easier for package maintainers, the step of building a
198-
# custom sysroot can be skipped by setting the `BPF_SYSROOT_SKIP`
196+
# custom sysroot can be skipped by setting the `BPFEL_SYSROOT_DIR`
199197
# environment variable to the path of the prebuilt BPF sysroot.
200198
#
201199
# Test this configuration by prebuilding the BPF standard library
@@ -214,10 +212,8 @@ jobs:
214212
--sysroot-dir "$BPFEL_SYSROOT_DIR" \
215213
--target bpfel-unknown-none
216214
217-
# Omit `rustc-build-sysroot` feature to test the prebuilt sysroot.
218-
# Omit `default` because it includes `rustc-build-sysroot`.
219215
BPFEL_SYSROOT_DIR="$BPFEL_SYSROOT_DIR" cargo hack test --feature-powerset \
220-
--exclude-features ${{ matrix.exclude-features }},default,rustc-build-sysroot \
216+
--exclude-features ${{ matrix.exclude-features }} \
221217
--features ${{ env.LLVM_FEATURES }}
222218
223219
- uses: actions/checkout@v5

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@ rust-llvm-21 = [
6969
default = [
7070
"llvm-21",
7171
"rust-llvm-21",
72-
"rustc-build-sysroot",
7372
]
74-
rustc-build-sysroot = []
7573

7674
[workspace]
7775
members = ["xtask"]

tests/tests.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,9 @@ fn compile_test() {
128128
let root_dir = env::var_os("CARGO_MANIFEST_DIR")
129129
.expect("could not determine the root directory of the project");
130130
let root_dir = Path::new(&root_dir);
131-
let bpf_sysroot = env::var_os("BPFEL_SYSROOT_DIR");
132-
let bpf_sysroot = if !cfg!(feature = "rustc-build-sysroot") {
133-
PathBuf::from(bpf_sysroot.expect("BPFEL_SYSROOT_DIR is not set"))
131+
let bpf_sysroot = if let Some(bpf_sysroot) = env::var_os("BPFEL_SYSROOT_DIR") {
132+
PathBuf::from(bpf_sysroot)
134133
} else {
135-
assert_eq!(bpf_sysroot, None);
136134
let rustc = Command::new(env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc")));
137135
let rustc_src = rustc_build_sysroot::rustc_sysroot_src(rustc)
138136
.expect("could not determine sysroot source directory");

0 commit comments

Comments
 (0)