Migrate run-make/inline-always-many-cgu to rmake.rs · rust-lang/rust@e7dfd4a (original) (raw)
File tree
3 files changed
lines changed
- tests/run-make/inline-always-many-cgu
3 files changed
lines changed
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -61,7 +61,6 @@ run-make/glibc-staticlib-args/Makefile | ||
| 61 | 61 | run-make/include_bytes_deps/Makefile |
| 62 | 62 | run-make/incr-add-rust-src-component/Makefile |
| 63 | 63 | run-make/incr-foreign-head-span/Makefile |
| 64 | -run-make/inline-always-many-cgu/Makefile | |
| 65 | 64 | run-make/interdependent-c-libraries/Makefile |
| 66 | 65 | run-make/intrinsic-unreachable/Makefile |
| 67 | 66 | run-make/invalid-library/Makefile |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| 1 | +use run_make_support::fs_wrapper::read_to_string; | |
| 2 | +use run_make_support::regex::Regex; | |
| 3 | +use run_make_support::{read_dir, rustc}; | |
| 4 | + | |
| 5 | +use std::ffi::OsStr; | |
| 6 | + | |
| 7 | +fn main() { | |
| 8 | +rustc().input("foo.rs").emit("llvm-ir").codegen_units(2).run(); | |
| 9 | +let re = Regex::new(r"\bcall\b").unwrap(); | |
| 10 | +let mut nb_ll = 0; | |
| 11 | +read_dir(".", |path | |
| 12 | +if path.is_file() && path.extension().is_some_and(|ext | |
| 13 | +assert!(!re.is_match(&read_to_string(path))); | |
| 14 | + nb_ll += 1; | |
| 15 | +} | |
| 16 | +}); | |
| 17 | +assert!(nb_ll > 0); | |
| 18 | +} |