about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/run-make/sanitizer-dylib/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/run-make/sanitizer-dylib/Makefile b/src/test/run-make/sanitizer-dylib/Makefile
index 34fdf3b9709..835d5b0d9d8 100644
--- a/src/test/run-make/sanitizer-dylib/Makefile
+++ b/src/test/run-make/sanitizer-dylib/Makefile
@@ -1,4 +1,8 @@
 -include ../tools.mk
 
+ifeq ($(TARGET),x86_64-unknown-linux-gnu)
 all:
-	$(RUSTC) -Z sanitizer=leak --crate-type dylib --target x86_64-unknown-linux-gnu hello.rs 2>&1 | grep -q 'Only executables and rlibs can be compiled with `-Z sanitizer`'
+	$(RUSTC) -Z sanitizer=leak --crate-type dylib --target $(TARGET) hello.rs 2>&1 | grep -q 'Only executables and rlibs can be compiled with `-Z sanitizer`'
+else
+all:
+endif