Skip to content

Commit 1ca959e

Browse files
committed
Migrate print-target-list to rmake
1 parent 3a41a11 commit 1ca959e

File tree

3 files changed

+21
-9
lines changed

3 files changed

+21
-9
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ run-make/no-alloc-shim/Makefile
2323
run-make/pdb-buildinfo-cl-cmd/Makefile
2424
run-make/pgo-gen-lto/Makefile
2525
run-make/pgo-indirect-call-promotion/Makefile
26-
run-make/print-target-list/Makefile
2726
run-make/raw-dylib-alt-calling-convention/Makefile
2827
run-make/raw-dylib-c/Makefile
2928
run-make/redundant-libs/Makefile

tests/run-make/print-target-list/Makefile

-8
This file was deleted.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Checks that all the targets returned by `rustc --print target-list` are valid
2+
// target specifications
3+
4+
use run_make_support::bare_rustc;
5+
6+
// FIXME(127877): certain experimental targets fail with creating a 'LLVM TargetMachine'
7+
// in CI, so we skip them
8+
const EXPERIMENTAL_TARGETS: &[&str] = &["avr", "m68k", "csky", "xtensa"];
9+
10+
fn main() {
11+
let targets = bare_rustc().print("target-list").run().stdout_utf8();
12+
13+
for target in targets.lines() {
14+
// skip experimental targets that would otherwise fail
15+
if EXPERIMENTAL_TARGETS.iter().any(|experimental| target.contains(experimental)) {
16+
continue;
17+
}
18+
19+
bare_rustc().target(target).print("sysroot").run();
20+
}
21+
}

0 commit comments

Comments
 (0)