diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-10-26 17:54:31 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2022-10-26 18:09:06 +0200 |
commit | 3e561b7cbd4731164f61c951b9b714eb6aa0bf04 (patch) | |
tree | d9c9002cbf60ee90a399f833c677785de2ba39f3 /bin | |
parent | 4943d4268acc357364a45a1367bc641ed639dccd (diff) | |
download | justbuild-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-x | bin/bootstrap.py | 11 |
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: |