From e874ef9b845424dceeac4211ca9dfec24949f03c Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 9 Sep 2019 17:40:33 +0100 Subject: COMPMID-2646: Wrap thread-related structure to ease bare-metal support Wraps "lock_guard" and "unique_lock" to ease bare-metal support. Adds basic armclang compilation flow. Change-Id: I44ccd042652acd6a9b442c57c879db3891abb0e2 Signed-off-by: Georgios Pinitas Reviewed-on: https://review.mlplatform.org/c/1923 Tested-by: Arm Jenkins Reviewed-by: Pablo Marquez Comments-Addressed: Arm Jenkins --- SConstruct | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 6fea51bbf4..9a12c5d19c 100644 --- a/SConstruct +++ b/SConstruct @@ -146,6 +146,8 @@ if env['os'] == 'android' and ( 'clang++' not in cpp_compiler or 'clang' not in if 'clang++' in cpp_compiler: env.Append(CXXFLAGS = ['-Wno-format-nonliteral','-Wno-deprecated-increment-bool','-Wno-vla-extension','-Wno-mismatched-tags']) +elif 'armclang' in cpp_compiler: + pass else: env.Append(CXXFLAGS = ['-Wlogical-op','-Wnoexcept','-Wstrict-null-sentinel', '-Wno-redundant-move']) @@ -161,6 +163,7 @@ if env['openmp']: env.Append(CXXFLAGS = ['-fopenmp']) env.Append(LINKFLAGS = ['-fopenmp']) +# Add architecture specific flags prefix = "" if env['arch'] == 'armv7a': env.Append(CXXFLAGS = ['-march=armv7-a', '-mthumb', '-mfpu=neon']) @@ -207,6 +210,10 @@ elif env['arch'] == 'x86_64': env.Append(CCFLAGS = ['-m64']) env.Append(LINKFLAGS = ['-m64']) +# Rework flags depending on compiler version +if 'armclang' in cpp_compiler: + if 'NO_DOT_IN_TOOLCHAIN' in env['CPPDEFINES']: env['CPPDEFINES'].remove('NO_DOT_IN_TOOLCHAIN') + if env['build'] == 'native': prefix = "" @@ -227,7 +234,9 @@ if not GetOption("help"): print("ERROR: Compiler '%s' not found" % env['CXX']) Exit(1) - if 'clang++' not in cpp_compiler: + if 'armclang' in cpp_compiler: + pass + elif '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) -- cgit v1.2.1