summaryrefslogtreecommitdiffstats
path: root/src/test/run-make-fulldeps/no-builtins-lto/Makefile
blob: 2e41be39d5d00851348915f5ebfa2e2a200f5ed3 (plain)
1
2
3
4
5
6
7
8
9
-include ../tools.mk

all:
	# Compile a `#![no_builtins]` rlib crate
	$(RUSTC) no_builtins.rs
	# Build an executable that depends on that crate using LTO. The no_builtins crate doesn't
	# participate in LTO, so its rlib must be explicitly linked into the final binary. Verify this by
	# grepping the linker arguments.
	$(RUSTC) main.rs -C lto --print link-args | $(CGREP) 'libno_builtins.rlib'