diff options
author | alered01 <Alex.Redshaw@arm.com> | 2020-02-10 11:29:45 +0000 |
---|---|---|
committer | Michalis Spyrou <michalis.spyrou@arm.com> | 2020-02-13 15:36:10 +0000 |
commit | d8872c1bb5d43abc2a0c8cda64cd6ca8751f7f05 (patch) | |
tree | 436776bd129bc725f1fa80028892da5cf42279d8 | |
parent | 695ad6913563b5d910f9fca0f5e2822f083456b6 (diff) | |
download | ComputeLibrary-d8872c1bb5d43abc2a0c8cda64cd6ca8751f7f05.tar.gz |
Adding compiler_prefix env variable
NDK r20 is not consistent with how linkers/archivers are prefixed when compared to the compilers for 32-bit
e.g.
armv7a-linux-androideabi29-clang++
vs
arm-linux-androideabi-ld
Signed-off-by: alered01 <Alex.Redshaw@arm.com>
Change-Id: I7b9e271b34531b42af1ff8204effb8725669b558
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2707
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r-- | SConstruct | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index 0b491847df..e8870e26ce 100644 --- a/SConstruct +++ b/SConstruct @@ -64,6 +64,7 @@ vars.AddVariables( #FIXME Remove before release (And remove all references to INTERNAL_ONLY) BoolVariable("internal_only", "Enable ARM internal only tests", False), ("toolchain_prefix", "Override the toolchain prefix", ""), + ("compiler_prefix", "Override the compiler prefix", ""), ("extra_cxx_flags", "Extra CXX flags to be appended to the build command", ""), ("extra_link_flags", "Extra LD flags to be appended to the build command", ""), ("compiler_cache", "Command to prefix to the C and C++ compiler (e.g ccache)", "") @@ -239,8 +240,12 @@ if env['build'] == 'native': if env["toolchain_prefix"] != "": prefix = env["toolchain_prefix"] -env['CC'] = env['compiler_cache']+" "+prefix + c_compiler -env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler +compiler_prefix = prefix +if env["compiler_prefix"] != "": + compiler_prefix = env["compiler_prefix"] + +env['CC'] = env['compiler_cache']+ " " + compiler_prefix + c_compiler +env['CXX'] = env['compiler_cache']+ " " + compiler_prefix + cpp_compiler env['LD'] = prefix + "ld" env['AS'] = prefix + "as" env['AR'] = prefix + "ar" |