]> git.proxmox.com Git - rustc.git/blame - tests/run-make-fulldeps/sanitizer-cdylib-link/Makefile
New upstream version 1.69.0+dfsg1
[rustc.git] / tests / run-make-fulldeps / sanitizer-cdylib-link / Makefile
CommitLineData
48663c56 1# needs-sanitizer-support
f035d41b 2# needs-sanitizer-address
48663c56 3
f2b60f7d 4include ../tools.mk
041b39d2 5
ea8adc8c
XL
6LOG := $(TMPDIR)/log.txt
7
041b39d2 8# This test builds a shared object, then an executable that links it as a native
b7449926 9# rust library (contrast to an rlib). The shared library and executable both
041b39d2
XL
10# are compiled with address sanitizer, and we assert that a fault in the cdylib
11# is correctly detected.
12
041b39d2 13all:
f9f354fc
XL
14 $(RUSTC) -g -Z sanitizer=address --crate-type cdylib --target $(TARGET) library.rs
15 $(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) -llibrary program.rs
ff7c6d11 16 LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow