diff --git a/src/tools/tidy/src/allowed_run_make_makefiles.txt b/src/tools/tidy/src/allowed_run_make_makefiles.txt index eb2e8c2542e..4a47083ff0d 100644 --- a/src/tools/tidy/src/allowed_run_make_makefiles.txt +++ b/src/tools/tidy/src/allowed_run_make_makefiles.txt @@ -61,7 +61,6 @@ run-make/glibc-staticlib-args/Makefile run-make/include_bytes_deps/Makefile run-make/incr-add-rust-src-component/Makefile run-make/incr-foreign-head-span/Makefile -run-make/inline-always-many-cgu/Makefile run-make/interdependent-c-libraries/Makefile run-make/intrinsic-unreachable/Makefile run-make/invalid-library/Makefile diff --git a/tests/run-make/inline-always-many-cgu/Makefile b/tests/run-make/inline-always-many-cgu/Makefile deleted file mode 100644 index 9945821db28..00000000000 --- a/tests/run-make/inline-always-many-cgu/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -include ../tools.mk - -all: - $(RUSTC) foo.rs --emit llvm-ir -C codegen-units=2 - if cat $(TMPDIR)/*.ll | $(CGREP) -e '\bcall\b'; then \ - echo "found call instruction when one wasn't expected"; \ - exit 1; \ - fi diff --git a/tests/run-make/inline-always-many-cgu/rmake.rs b/tests/run-make/inline-always-many-cgu/rmake.rs new file mode 100644 index 00000000000..c55ea69f3b9 --- /dev/null +++ b/tests/run-make/inline-always-many-cgu/rmake.rs @@ -0,0 +1,18 @@ +use run_make_support::fs_wrapper::read_to_string; +use run_make_support::regex::Regex; +use run_make_support::{read_dir, rustc}; + +use std::ffi::OsStr; + +fn main() { + rustc().input("foo.rs").emit("llvm-ir").codegen_units(2).run(); + let re = Regex::new(r"\bcall\b").unwrap(); + let mut nb_ll = 0; + read_dir(".", |path| { + if path.is_file() && path.extension().is_some_and(|ext| ext == OsStr::new("ll")) { + assert!(!re.is_match(&read_to_string(path))); + nb_ll += 1; + } + }); + assert!(nb_ll > 0); +}