[compiler-rt] r287581 - [asan] Specialize the initialization-bug.cc testcase for Darwin (it needs a deployment target of 10.11+)

Kuba Mracek via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 13:48:25 PST 2016


Author: kuba.brecka
Date: Mon Nov 21 15:48:25 2016
New Revision: 287581

URL: http://llvm.org/viewvc/llvm-project?rev=287581&view=rev
Log:
[asan] Specialize the initialization-bug.cc testcase for Darwin (it needs a deployment target of 10.11+)

The ODR detection in initialization-bug.cc now works on Darwin (due to the recently enabled "live globals" on-by-default), but only if the deployment target is 10.11 or higher. Let's adjust the testcases.

Differential Revision: https://reviews.llvm.org/D26927


Modified:
    compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc
    compiler-rt/trunk/test/lit.common.cfg

Modified: compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc?rev=287581&r1=287580&r2=287581&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/initialization-bug.cc Mon Nov 21 15:48:25 2016
@@ -1,6 +1,6 @@
 // Test to make sure basic initialization order errors are caught.
 
-// RUN: %clangxx_asan -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t-INIT-ORDER-EXE
+// RUN: %clangxx_asan %macos_min_target_10_11 -O0 %s %p/Helpers/initialization-bug-extra2.cc -o %t-INIT-ORDER-EXE
 // RUN: %env_asan_opts=check_initialization_order=true not %run %t-INIT-ORDER-EXE 2>&1 | FileCheck %s
 
 // Do not test with optimization -- the error may be optimized away.

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=287581&r1=287580&r2=287581&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Mon Nov 21 15:48:25 2016
@@ -141,6 +141,10 @@ if config.host_os == 'Darwin':
   except:
     pass
 
+  config.substitutions.append( ("%macos_min_target_10_11", "-mmacosx-version-min=10.11") )
+else:
+  config.substitutions.append( ("%macos_min_target_10_11", "") )
+
 sancovcc_path = os.path.join(llvm_tools_dir, "sancov") 
 if os.path.exists(sancovcc_path):
   config.available_features.add("has_sancovcc")




More information about the llvm-commits mailing list