Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codegen test for PGO instrumentation. #60038

Merged
merged 6 commits into from
Apr 25, 2019
Prev Previous commit
Fix ignore-logic for sanitizer run-make tests.
  • Loading branch information
michaelwoerister committed Apr 24, 2019
commit ff976fe0f13491f0e6d3f7cbd52ab409fd93165a
5 changes: 2 additions & 3 deletions src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# needs-sanitizer-support
# only-x86_64
# only-linux

-include ../tools.mk

Expand All @@ -9,11 +11,8 @@ LOG := $(TMPDIR)/log.txt
# are compiled with address sanitizer, and we assert that a fault in the cdylib
# is correctly detected.

ifeq ($(TARGET),x86_64-unknown-linux-gnu)

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

all:
$(RUSTC) -g -Z sanitizer=address --crate-type cdylib --target $(TARGET) $(EXTRA_RUSTFLAG) library.rs
Expand Down
4 changes: 2 additions & 2 deletions src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# needs-sanitizer-support
# only-x86_64
# only-linux

-include ../tools.mk

Expand All @@ -9,10 +11,8 @@ LOG := $(TMPDIR)/log.txt
# are compiled with address sanitizer, and we assert that a fault in the dylib
# is correctly detected.

ifeq ($(TARGET),x86_64-unknown-linux-gnu)
# See comment in sanitizer-address/Makefile for why this is here
EXTRA_RUSTFLAG=-C relocation-model=dynamic-no-pic
endif

all:
$(RUSTC) -g -Z sanitizer=address --crate-type dylib --target $(TARGET) $(EXTRA_RUSTFLAG) library.rs
Expand Down
6 changes: 2 additions & 4 deletions src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
# needs-sanitizer-support
# only-x86_64
# only-linux

-include ../tools.mk

# This test builds a staticlib, then an executable that links to it.
# The staticlib and executable both are compiled with address sanitizer,
# and we assert that a fault in the staticlib is correctly detected.

ifeq ($(TARGET),x86_64-unknown-linux-gnu)
EXTRA_RUSTFLAG=
endif

all:
$(RUSTC) -g -Z sanitizer=address --crate-type staticlib --target $(TARGET) library.rs
$(CC) program.c $(call STATICLIB,library) $(call OUT_EXE,program) $(EXTRACFLAGS) $(EXTRACXXFLAGS)
Expand Down