Skip to content

Commit

Permalink
tests: Remove unnecessary -C relocation-model=dynamic-no-pics
Browse files Browse the repository at this point in the history
The referenced `sanitizer-address/Makefile` no longer exists, so perhaps these options are no longer necessary as well.
Even if they are still necessary, they should use `-C relocation-model=static` instead.
  • Loading branch information
petrochenkov committed Apr 26, 2020
1 parent a4199b4 commit 45fbe8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ LOG := $(TMPDIR)/log.txt
# are compiled with address sanitizer, and we assert that a fault in the cdylib
# is correctly detected.

# See comment in sanitizer-address/Makefile for why this is here
EXTRA_RUSTFLAG=-C relocation-model=dynamic-no-pic

all:
$(RUSTC) -g -Z sanitizer=address --crate-type cdylib --target $(TARGET) $(EXTRA_RUSTFLAG) library.rs
$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) $(EXTRA_RUSTFLAG) -llibrary program.rs
$(RUSTC) -g -Z sanitizer=address --crate-type cdylib --target $(TARGET) library.rs
$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) -llibrary program.rs
LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow
7 changes: 2 additions & 5 deletions src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ LOG := $(TMPDIR)/log.txt
# are compiled with address sanitizer, and we assert that a fault in the dylib
# is correctly detected.

# See comment in sanitizer-address/Makefile for why this is here
EXTRA_RUSTFLAG=-C relocation-model=dynamic-no-pic

all:
$(RUSTC) -g -Z sanitizer=address --crate-type dylib --target $(TARGET) $(EXTRA_RUSTFLAG) library.rs
$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) $(EXTRA_RUSTFLAG) -llibrary program.rs
$(RUSTC) -g -Z sanitizer=address --crate-type dylib --target $(TARGET) library.rs
$(RUSTC) -g -Z sanitizer=address --crate-type bin --target $(TARGET) -llibrary program.rs
LD_LIBRARY_PATH=$(TMPDIR) $(TMPDIR)/program 2>&1 | $(CGREP) stack-buffer-overflow

0 comments on commit 45fbe8f

Please sign in to comment.