summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-10-26 17:54:31 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2022-10-26 18:09:06 +0200
commit3e561b7cbd4731164f61c951b9b714eb6aa0bf04 (patch)
treed9c9002cbf60ee90a399f833c677785de2ba39f3 /bin
parent4943d4268acc357364a45a1367bc641ed639dccd (diff)
downloadjustbuild-3e561b7cbd4731164f61c951b9b714eb6aa0bf04.tar.gz
bootstrap: honor CC and CXX from build configuration
... also in the first phases of the bootstrap procedure. Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bootstrap.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/bootstrap.py b/bin/bootstrap.py
index 41b91e49..49dd5c88 100755
--- a/bin/bootstrap.py
+++ b/bin/bootstrap.py
@@ -59,6 +59,14 @@ if 'SOURCE_DATE_EPOCH' in os.environ:
CONF_STRING = json.dumps(CONF)
+CC="clang"
+CXX="clang++"
+
+if "CC" in CONF:
+ CC=CONF["CC"]
+if "CXX" in CONF:
+ CXX=CONF["CXX"]
+
# relevant directories (global variables)
SRCDIR = os.getcwd()
@@ -149,7 +157,8 @@ def setup_deps(src_wrkdir):
os.symlink(os.path.normpath(include_dir),
os.path.join(include_location, include_name))
if "build" in hints:
- run(["sh", "-c", hints["build"]], cwd=subdir)
+ run(["sh", "-c", hints["build"].format(cc=CC, cxx=CXX)],
+ cwd=subdir)
if "link" in hints:
link_flags.extend(["-L", subdir])
if "link" in hints: