]>
git.proxmox.com Git - rustc.git/blob - src/test/run-make/sanitizer-staticlib-link/Makefile
3 # This test builds a staticlib, then an executable that links to it.
4 # The staticlib and executable both are compiled with address sanitizer,
5 # and we assert that a fault in the staticlib is correctly detected.
7 ifeq ($(TARGET
),x86_64-unknown-linux-gnu
)
8 ASAN_SUPPORT
=$(SANITIZER_SUPPORT
)
13 ifeq ($(ASAN_SUPPORT
),1)
14 $(RUSTC
) -g
-Z sanitizer
=address
--crate-type staticlib
--target
$(TARGET
) library.rs
15 $(CC
) program.c
$(call STATICLIB
,library
) $(call OUT_EXE
,program
) $(EXTRACFLAGS
) $(EXTRACXXFLAGS
)
16 LD_LIBRARY_PATH
=$(TMPDIR
) $(TMPDIR
)/program
2>&1 | grep
-q stack-buffer-overflow