From 149de5b98c81e41ecb41797c3f1b11b661d2987e Mon Sep 17 00:00:00 2001 From: Anthony Barbier Date: Thu, 6 Dec 2018 10:27:37 +0000 Subject: COMPMID-1828: Allow the user to override the toolchain prefix Change-Id: Ib04d3761a3a5211d5fbcdc7040223825bef82351 Reviewed-on: https://review.mlplatform.org/354 Reviewed-by: Pablo Marquez Reviewed-by: Georgios Pinitas Tested-by: Arm Jenkins --- SConstruct | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index 49b1d1765c..e6c89bc24b 100644 --- a/SConstruct +++ b/SConstruct @@ -58,6 +58,7 @@ vars.AddVariables( BoolVariable("exceptions", "Enable/disable C++ exception support", True), #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", ""), ("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)", "") @@ -211,6 +212,9 @@ elif env['arch'] == 'x86_64': if env['build'] == 'native': prefix = "" +if env["toolchain_prefix"] != "": + prefix = env["toolchain_prefix"] + env['CC'] = env['compiler_cache']+" "+prefix + c_compiler env['CXX'] = env['compiler_cache']+" "+prefix + cpp_compiler env['LD'] = prefix + "ld" -- cgit v1.2.1