[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

llvm-svn: 287581
This commit is contained in:
Kuba Mracek 2016-11-21 21:48:25 +00:00
parent 694c28495a
commit d692ea1e87
2 changed files with 5 additions and 1 deletions

View File

@ -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.

View File

@ -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")