Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 247380b

Browse files
committedJul 22, 2024·
rewrite no-builtins-attribute to rmake
1 parent af9cd8d commit 247380b

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed
 

‎src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ run-make/macos-deployment-target/Makefile
5252
run-make/min-global-align/Makefile
5353
run-make/native-link-modifier-bundle/Makefile
5454
run-make/no-alloc-shim/Makefile
55-
run-make/no-builtins-attribute/Makefile
5655
run-make/no-duplicate-libs/Makefile
5756
run-make/panic-abort-eh_frame/Makefile
5857
run-make/pdb-buildinfo-cl-cmd/Makefile

‎tests/run-make/no-builtins-attribute/Makefile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// `no_builtins` is an attribute related to LLVM's optimizations. In order to ensure that it has an
2+
// effect on link-time optimizations (LTO), it should be added to function declarations in a crate.
3+
// This test uses the `llvm-filecheck` tool to determine that this attribute is successfully
4+
// being added to these function declarations.
5+
// See https://github.com/rust-lang/rust/pull/113716
6+
7+
use run_make_support::{llvm_filecheck, rfs, rustc};
8+
9+
fn main() {
10+
rustc().input("no_builtins.rs").emit("link").run();
11+
rustc().input("main.rs").emit("llvm-ir").run();
12+
llvm_filecheck().patterns("filecheck.main.txt").stdin(rfs::read("main.ll")).run();
13+
}

0 commit comments

Comments
 (0)
Please sign in to comment.