aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-12-06 10:27:37 +0000
committerAnthony Barbier <Anthony.barbier@arm.com>2018-12-06 13:14:27 +0000
commit149de5b98c81e41ecb41797c3f1b11b661d2987e (patch)
treef537aeda392c7414850a0343a6a9f585ccca5648 /SConstruct
parent05e5644715c678773abaf180222a33959ee0dadb (diff)
downloadComputeLibrary-149de5b98c81e41ecb41797c3f1b11b661d2987e.tar.gz
COMPMID-1828: Allow the user to override the toolchain prefix
Change-Id: Ib04d3761a3a5211d5fbcdc7040223825bef82351 Reviewed-on: https://review.mlplatform.org/354 Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct4
1 files changed, 4 insertions, 0 deletions
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"