rust/tests/run-make/no-builtins-attribute/Makefile
DianQK cc08749df2
Add the no-builtins attribute to functions when no_builtins is applied at the crate level.
When `no_builtins` is applied at the crate level, we should add the
`no-builtins` attribute to each function to ensure it takes effect in LTO.
2023-07-18 22:15:47 +08:00

10 lines
262 B
Makefile

include ../tools.mk
# We want to check if `no-builtins` is also added to the function declarations in the used crate.
all:
$(RUSTC) no_builtins.rs --emit=link
$(RUSTC) main.rs --emit=llvm-ir
cat "$(TMPDIR)"/main.ll | "$(LLVM_FILECHECK)" filecheck.main.txt