summaryrefslogtreecommitdiffstats
path: root/tests/run-make-fulldeps/no-builtins-lto/Makefile
blob: c8f05d9918b9123452d8f7b8d19f1985027cf85a (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'