2022-08-22 19:00:00 -05:00
|
|
|
include ../tools.mk
|
2016-08-14 21:56:48 -05:00
|
|
|
|
|
|
|
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.
|
2021-12-06 16:09:24 -06:00
|
|
|
$(RUSTC) main.rs -C lto --print link-args | $(CGREP) 'libno_builtins.rlib'
|