aboutsummaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
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"