Skip to content

Commit

Permalink
Unrolled build for rust-lang#125988
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#125988 - GuillaumeGomez:migrate-run-make-used, r=jieyouxu

Migrate `run-make/used` to `rmake.rs`

Part of rust-lang#121876.

r? `@jieyouxu`
  • Loading branch information
rust-timer authored Jun 18, 2024
2 parents af3d100 + 5b49b68 commit f4626d8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ run-make/unknown-mod-stdin/Makefile
run-make/unstable-flag-required/Makefile
run-make/use-suggestions-rust-2018/Makefile
run-make/used-cdylib-macos/Makefile
run-make/used/Makefile
run-make/volatile-intrinsics/Makefile
run-make/wasm-exceptions-nostd/Makefile
run-make/wasm-override-linker/Makefile
Expand Down
7 changes: 0 additions & 7 deletions tests/run-make/used/Makefile

This file was deleted.

15 changes: 15 additions & 0 deletions tests/run-make/used/rmake.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This test ensures that the compiler is keeping static variables, even if not referenced
// by another part of the program, in the output object file.
//
// It comes from #39987 which implements this RFC for the #[used] attribute:
// https://rust-lang.github.io/rfcs/2386-used.html

//@ ignore-msvc

use run_make_support::{cmd, rustc};

fn main() {
rustc().opt_level("3").emit("obj").input("used.rs").run();

cmd("nm").arg("used.o").run().assert_stdout_contains("FOO");
}

0 comments on commit f4626d8

Please sign in to comment.