]> git.lizzy.rs Git - rust.git/blob - src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile
pin docs: add some forward references
[rust.git] / src / test / run-make-fulldeps / sanitizer-cdylib-link / Makefile
1 # needs-sanitizer-support
2 # needs-sanitizer-address
3 # only-linux
4
5 -include ../tools.mk
6
7 LOG := $(TMPDIR)/log.txt
8
9 # This test builds a shared object, then an executable that links it as a native
10 # rust library (contrast to an rlib). The shared library and executable both
11 # are compiled with address sanitizer, and we assert that a fault in the cdylib
12 # is correctly detected.
13
14 all:
15         $(RUSTC) -g -Z sanitizer=address --crate-type cdylib --target $(TARGET) library.rs
16         $(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) -llibrary program.rs
17         LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow