From d8872c1bb5d43abc2a0c8cda64cd6ca8751f7f05 Mon Sep 17 00:00:00 2001 From: alered01 Date: Mon, 10 Feb 2020 11:29:45 +0000 Subject: 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 Change-Id: I7b9e271b34531b42af1ff8204effb8725669b558 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2707 Reviewed-by: Michalis Spyrou Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- SConstruct | 9 +++++++-- 1 file 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" -- cgit v1.2.1