[PATCH] D26107: [asan] Set the darwin deployment target for the dead-strip test

Anna Zaks via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 17:17:03 PDT 2016


zaks.anna created this revision.
zaks.anna added a reviewer: kubabrecka.
zaks.anna added subscribers: llvm-commits, rgov.

ASan dead-strip support relies on a linker option that only exists in 10.11 and later, so the LLVM instrumentation checks for the deployment target. This test does not pass when clang is built to choose lower deployment target by default but runs on newer host.

(Note, the REQUIRES: osx-ld64-live_support clause only checks the host and not the target OS.)


https://reviews.llvm.org/D26107

Files:
  test/asan/TestCases/Darwin/dead-strip.c


Index: test/asan/TestCases/Darwin/dead-strip.c
===================================================================
--- test/asan/TestCases/Darwin/dead-strip.c
+++ test/asan/TestCases/Darwin/dead-strip.c
@@ -6,7 +6,7 @@
 // runtime is able to register globals in the __DATA,__asan_globals section.
 
 // REQUIRES: osx-ld64-live_support
-// RUN: %clang_asan -mllvm -asan-globals-live-support -Xlinker -dead_strip -o %t %s
+// RUN: %clang_asan -mmacosx-version-min=10.11 -mllvm -asan-globals-live-support -Xlinker -dead_strip -o %t %s
 // RUN: llvm-nm -format=posix %t | FileCheck --check-prefix NM-CHECK %s
 // RUN: not %run %t 2>&1 | FileCheck --check-prefix ASAN-CHECK %s
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26107.76278.patch
Type: text/x-patch
Size: 674 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161029/9324c079/attachment.bin>


More information about the llvm-commits mailing list