aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-03-01 17:08:54 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:48:33 +0000
commitdd6693743b4da1048d2a5571edc01936f82709c3 (patch)
tree63a4e0d8e5ecbbcfe458c466e8205d6233156d75 /SConstruct
parentcf581f56cf7e33d6d856b3f361af2f050ba28a6c (diff)
downloadComputeLibrary-dd6693743b4da1048d2a5571edc01936f82709c3.tar.gz
COMPMID-959: Fix compiler checks
Change-Id: I865fed55a0b7f90789159507717e4f385462d9b5 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/122900 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct10
1 files changed, 5 insertions, 5 deletions
diff --git a/SConstruct b/SConstruct
index b74a6b9a2a..e778e28a8a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -99,10 +99,10 @@ default_c_compiler = 'gcc' if env['os'] != 'android' else 'clang'
cpp_compiler = os.environ.get('CXX', default_cpp_compiler)
c_compiler = os.environ.get('CC', default_c_compiler)
-if env['os'] == 'android' and ( cpp_compiler != 'clang++' or c_compiler != 'clang'):
+if env['os'] == 'android' and ( 'clang++' not in cpp_compiler or 'clang' not in c_compiler ):
print "WARNING: Only clang is officially supported to build the Compute Library for Android"
-if cpp_compiler == 'clang++':
+if 'clang++' in cpp_compiler:
env.Append(CXXFLAGS = ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags'])
else:
env.Append(CXXFLAGS = ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel'])
@@ -111,7 +111,7 @@ if env['cppthreads']:
env.Append(CPPDEFINES = [('ARM_COMPUTE_CPP_SCHEDULER', 1)])
if env['openmp']:
- if cpp_compiler == 'clang++':
+ if 'clang++' in cpp_compiler:
print "Clang does not support OpenMP. Use scheduler=cpp."
Exit(1)
@@ -144,7 +144,7 @@ elif env['arch'] == 'arm64-v8a':
elif env['arch'] == 'arm64-v8.2-a':
env.Append(CXXFLAGS = ['-march=armv8.2-a+fp16']) # explicitly enable fp16 extension otherwise __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is undefined
env.Append(CPPDEFINES = ['ARM_COMPUTE_AARCH64_V8_2'])
- if cpp_compiler == 'clang++':
+ if 'clang++' in cpp_compiler:
env.Append(CXXFLAGS = ['-fno-integrated-as'])
if env['os'] == 'linux':
@@ -177,7 +177,7 @@ if not GetOption("help"):
print("ERROR: Compiler '%s' not found" % env['CXX'])
Exit(1)
- if cpp_compiler == 'g++':
+ if 'clang++' not in cpp_compiler:
if env['arch'] == 'arm64-v8.2-a' and not version_at_least(compiler_ver, '6.2.1'):
print "GCC 6.2.1 or newer is required to compile armv8.2-a code"
Exit(1)