Skip to content

Commit 4269be3

Browse files
Prefix PROFILER_SUPPORT and SANITIZER_SUPPORT test env vars with RUSTC_ to make things clearer.
1 parent 553ec5d commit 4269be3

File tree

12 files changed

+16
-16
lines changed

12 files changed

+16
-16
lines changed

src/bootstrap/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,11 +1268,11 @@ impl Step for Compiletest {
12681268
builder.add_rust_test_threads(&mut cmd);
12691269

12701270
if builder.config.sanitizers {
1271-
cmd.env("SANITIZER_SUPPORT", "1");
1271+
cmd.env("RUSTC_SANITIZER_SUPPORT", "1");
12721272
}
12731273

12741274
if builder.config.profiler {
1275-
cmd.env("PROFILER_SUPPORT", "1");
1275+
cmd.env("RUSTC_PROFILER_SUPPORT", "1");
12761276
}
12771277

12781278
cmd.env("RUST_TEST_TMPDIR", builder.out.join("tmp"));

src/test/run-make-fulldeps/pgo-gen-lto/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-include ../tools.mk
22

33
all:
4-
ifeq ($(PROFILER_SUPPORT),1)
4+
ifeq ($(RUSTC_PROFILER_SUPPORT),1)
55
$(RUSTC) -Copt-level=3 -Clto=fat -Z pgo-gen="$(TMPDIR)" test.rs
66
$(call RUN,test) || exit 1
77
[ -e "$(TMPDIR)"/default_*.profraw ] || (echo "No .profraw file"; exit 1)

src/test/run-make-fulldeps/pgo-gen-no-imp-symbols/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-include ../tools.mk
22

33
all:
4-
ifeq ($(PROFILER_SUPPORT),1)
4+
ifeq ($(RUSTC_PROFILER_SUPPORT),1)
55
$(RUSTC) -O -Ccodegen-units=1 -Z pgo-gen="$(TMPDIR)" --emit=llvm-ir test.rs
66
# We expect symbols starting with "__llvm_profile_".
77
$(CGREP) "__llvm_profile_" < $(TMPDIR)/test.ll

src/test/run-make-fulldeps/pgo-gen/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-include ../tools.mk
22

33
all:
4-
ifeq ($(PROFILER_SUPPORT),1)
4+
ifeq ($(RUSTC_PROFILER_SUPPORT),1)
55
$(RUSTC) -g -Z pgo-gen="$(TMPDIR)" test.rs
66
$(call RUN,test) || exit 1
77
[ -e "$(TMPDIR)"/default_*.profraw ] || (echo "No .profraw file"; exit 1)

src/test/run-make-fulldeps/profile/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-include ../tools.mk
22

33
all:
4-
ifeq ($(PROFILER_SUPPORT),1)
4+
ifeq ($(RUSTC_PROFILER_SUPPORT),1)
55
$(RUSTC) -g -Z profile test.rs
66
$(call RUN,test) || exit 1
77
[ -e "$(TMPDIR)/test.gcno" ] || (echo "No .gcno file"; exit 1)

src/test/run-make-fulldeps/sanitizer-address/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ LOG := $(TMPDIR)/log.txt
55
# NOTE the address sanitizer only supports x86_64 linux and macOS
66

77
ifeq ($(TARGET),x86_64-apple-darwin)
8-
ASAN_SUPPORT=$(SANITIZER_SUPPORT)
8+
ASAN_SUPPORT=$(RUSTC_SANITIZER_SUPPORT)
99
EXTRA_RUSTFLAG=-C rpath
1010
else
1111
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
12-
ASAN_SUPPORT=$(SANITIZER_SUPPORT)
12+
ASAN_SUPPORT=$(RUSTC_SANITIZER_SUPPORT)
1313

1414
# Apparently there are very specific Linux kernels, notably the one that's
1515
# currently on Travis CI, which contain a buggy commit that triggers failures in

src/test/run-make-fulldeps/sanitizer-cdylib-link/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LOG := $(TMPDIR)/log.txt
88
# is correctly detected.
99

1010
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
11-
ASAN_SUPPORT=$(SANITIZER_SUPPORT)
11+
ASAN_SUPPORT=$(RUSTC_SANITIZER_SUPPORT)
1212

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

src/test/run-make-fulldeps/sanitizer-dylib-link/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LOG := $(TMPDIR)/log.txt
88
# is correctly detected.
99

1010
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
11-
ASAN_SUPPORT=$(SANITIZER_SUPPORT)
11+
ASAN_SUPPORT=$(RUSTC_SANITIZER_SUPPORT)
1212

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

src/test/run-make-fulldeps/sanitizer-invalid-cratetype/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
# NOTE the address sanitizer only supports x86_64 linux and macOS
44

55
ifeq ($(TARGET),x86_64-apple-darwin)
6-
ASAN_SUPPORT=$(SANITIZER_SUPPORT)
6+
ASAN_SUPPORT=$(RUSTC_SANITIZER_SUPPORT)
77
EXTRA_RUSTFLAG=-C rpath
88
else
99
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
10-
ASAN_SUPPORT=$(SANITIZER_SUPPORT)
10+
ASAN_SUPPORT=$(RUSTC_SANITIZER_SUPPORT)
1111
EXTRA_RUSTFLAG=
1212
endif
1313
endif

src/test/run-make-fulldeps/sanitizer-leak/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# FIXME(#46126) ThinLTO for libstd broke this test
77

88
all:
9-
ifdef SANITIZER_SUPPORT
9+
ifdef RUSTC_SANITIZER_SUPPORT
1010
$(RUSTC) -C opt-level=1 -g -Z sanitizer=leak -Z print-link-args leak.rs | $(CGREP) librustc_lsan
1111
$(TMPDIR)/leak 2>&1 | $(CGREP) 'detected memory leaks'
1212
endif

src/test/run-make-fulldeps/sanitizer-memory/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# only-x86_64
55

66
all:
7-
ifdef SANITIZER_SUPPORT
7+
ifdef RUSTC_SANITIZER_SUPPORT
88
$(RUSTC) -g -Z sanitizer=memory -Z print-link-args uninit.rs | $(CGREP) librustc_msan
99
$(TMPDIR)/uninit 2>&1 | $(CGREP) use-of-uninitialized-value
1010
endif

src/test/run-make-fulldeps/sanitizer-staticlib-link/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
-include ../tools.mk
22

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

77
ifeq ($(TARGET),x86_64-unknown-linux-gnu)
8-
ASAN_SUPPORT=$(SANITIZER_SUPPORT)
8+
ASAN_SUPPORT=$(RUSTC_SANITIZER_SUPPORT)
99
EXTRA_RUSTFLAG=
1010
endif
1111

0 commit comments

Comments
 (0)