forked from OSchip/llvm-project
check-clang-tools: Introduce the feature "target-headers".
For now, it just detects that host is non-Windows and target is msvc. FIXME: It should be probable for cross compilations. Detect whether target's headers would be available. llvm-svn: 261814
This commit is contained in:
parent
08154bf3d2
commit
8ef4887b15
|
@ -1,4 +1,5 @@
|
|||
// RUN: %check_clang_tidy %s modernize-deprecated-headers %t -- -- -std=c++03 -isystem %S/Inputs/Headers
|
||||
// REQUIRES: target-headers
|
||||
|
||||
#include <assert.h>
|
||||
#include <complex.h>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// RUN: %check_clang_tidy %s modernize-deprecated-headers %t -- -- -std=c++11 -isystem %S/Inputs/Headers
|
||||
// REQUIRES: target-headers
|
||||
|
||||
#include <assert.h>
|
||||
#include <complex.h>
|
||||
|
|
|
@ -189,6 +189,12 @@ if not platform.system() in ['Windows'] or not execute_external:
|
|||
if platform.system() not in ['Windows']:
|
||||
config.available_features.add('ansi-escape-sequences')
|
||||
|
||||
# Set if default-target's system headers available.
|
||||
# For example in general, MS headers are supposed unavailable on non-Windows hosts.
|
||||
# FIXME: It should be probable for cross compilations.
|
||||
if not (platform.system() not in ['Windows'] and re.match(r'.*-win32$', config.target_triple)):
|
||||
config.available_features.add('target-headers')
|
||||
|
||||
check_clang_tidy = os.path.join(
|
||||
config.test_source_root, "clang-tidy", "check_clang_tidy.py")
|
||||
config.substitutions.append(
|
||||
|
|
Loading…
Reference in New Issue