Migrate print-target-list
to rmake
This commit is contained in:
parent
3a41a11a8f
commit
1ca959e3f0
@ -23,7 +23,6 @@ run-make/no-alloc-shim/Makefile
|
||||
run-make/pdb-buildinfo-cl-cmd/Makefile
|
||||
run-make/pgo-gen-lto/Makefile
|
||||
run-make/pgo-indirect-call-promotion/Makefile
|
||||
run-make/print-target-list/Makefile
|
||||
run-make/raw-dylib-alt-calling-convention/Makefile
|
||||
run-make/raw-dylib-c/Makefile
|
||||
run-make/redundant-libs/Makefile
|
||||
|
@ -1,8 +0,0 @@
|
||||
include ../tools.mk
|
||||
|
||||
# Checks that all the targets returned by `rustc --print target-list` are valid
|
||||
# target specifications
|
||||
all:
|
||||
for target in $(shell $(BARE_RUSTC) --print target-list); do \
|
||||
$(BARE_RUSTC) --target $$target --print sysroot; \
|
||||
done
|
21
tests/run-make/print-target-list/rmake.rs
Normal file
21
tests/run-make/print-target-list/rmake.rs
Normal file
@ -0,0 +1,21 @@
|
||||
// Checks that all the targets returned by `rustc --print target-list` are valid
|
||||
// target specifications
|
||||
|
||||
use run_make_support::bare_rustc;
|
||||
|
||||
// FIXME(127877): certain experimental targets fail with creating a 'LLVM TargetMachine'
|
||||
// in CI, so we skip them
|
||||
const EXPERIMENTAL_TARGETS: &[&str] = &["avr", "m68k", "csky", "xtensa"];
|
||||
|
||||
fn main() {
|
||||
let targets = bare_rustc().print("target-list").run().stdout_utf8();
|
||||
|
||||
for target in targets.lines() {
|
||||
// skip experimental targets that would otherwise fail
|
||||
if EXPERIMENTAL_TARGETS.iter().any(|experimental| target.contains(experimental)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
bare_rustc().target(target).print("sysroot").run();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user