]> git.lizzy.rs Git - rust.git/commitdiff
run test only if LLVM version is >= 6.0.0
authorJorge Aparicio <jorge@japaric.io>
Sat, 15 Sep 2018 21:19:07 +0000 (23:19 +0200)
committerJorge Aparicio <jorge@japaric.io>
Wed, 26 Sep 2018 13:21:26 +0000 (15:21 +0200)
src/test/run-make-fulldeps/emit-stack-sizes/Makefile

index b6b8113633d6ec22c06a3b12598d64046a72a747..efe15f89c816b52ec44d28b0bcf190bc2176a42c 100644 (file)
@@ -6,7 +6,20 @@ all:
        exit 0
 else
 # check that the .stack_sizes section is generated
+# this test requires LLVM >= 6.0.0
+vers = $(shell llvm-ar -version)
+ifneq (,$(findstring version 3,$(vers)))
+all:
+       exit 0
+else ifneq (,$(findstring version 4,$(vers)))
+all:
+       exit 0
+else ifneq (,$(findstring version 5,$(vers)))
+all:
+       exit 0
+else
 all:
        $(RUSTC) -C opt-level=3 -Z emit-stack-sizes --emit=obj foo.rs
        size -A $(TMPDIR)/foo.o | $(CGREP) .stack_sizes
 endif
+endif