From 3e561b7cbd4731164f61c951b9b714eb6aa0bf04 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 26 Oct 2022 17:54:31 +0200 Subject: bootstrap: honor CC and CXX from build configuration ... also in the first phases of the bootstrap procedure. Co-authored-by: Oliver Reiche --- bin/bootstrap.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bin/bootstrap.py') 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: -- cgit v1.2.3