summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-10-31 12:18:51 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-10-31 13:18:57 +0100
commit5afb9345f74a41dbdd96953602c1b2f6941dee83 (patch)
treecdadce600f2af900334f8e38ecdfa514376b59aa
parent550284a659ce8d08d02fe8f836f7b96bbf7b2c71 (diff)
downloadjustbuild-5afb9345f74a41dbdd96953602c1b2f6941dee83.tar.gz
bootstrap: allow overwriting of ar
... in the same way, as we support different names for cc and c++.
-rwxr-xr-xbin/bootstrap.py5
-rw-r--r--etc/repos.json4
2 files changed, 6 insertions, 3 deletions
diff --git a/bin/bootstrap.py b/bin/bootstrap.py
index 5fbf6a23..dcbd8586 100755
--- a/bin/bootstrap.py
+++ b/bin/bootstrap.py
@@ -58,9 +58,12 @@ if 'SOURCE_DATE_EPOCH' in os.environ:
CONF_STRING = json.dumps(CONF)
+AR="ar"
CC="clang"
CXX="clang++"
+if "AR" in CONF:
+ AR=CONF["AR"]
if "CC" in CONF:
CC=CONF["CC"]
if "CXX" in CONF:
@@ -158,7 +161,7 @@ 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"].format(cc=CC, cxx=CXX)],
+ run(["sh", "-c", hints["build"].format(cc=CC, cxx=CXX, ar=AR)],
cwd=subdir)
if "link" in hints:
link_flags.extend(["-L", subdir])
diff --git a/etc/repos.json b/etc/repos.json
index 80365e6f..56793e0a 100644
--- a/etc/repos.json
+++ b/etc/repos.json
@@ -174,7 +174,7 @@
, "bindings": {"rules": "rules"}
, "bootstrap":
{ "include_dir": "include/fmt"
- , "build": "cd src && {cxx} -I ../include -c *.cc && ar cqs ../libfmt.a *.o"
+ , "build": "cd src && {cxx} -I ../include -c *.cc && {ar} cqs ../libfmt.a *.o"
, "link": ["-lfmt"]
}
, "local_bootstrap":
@@ -193,7 +193,7 @@
, "target_file_name": "TARGETS.boringssl"
, "bindings": {"rules": "rules-boringssl"}
, "bootstrap":
- { "build": "SYS=`uname -s | tr 'A-Z' 'a-z'` && ARCH=`uname -m` && {cc} -I . -I src/include -c *.c src/crypto/*.c src/crypto/*/*.c $SYS-$ARCH/crypto/fipsmodule/*.S && ar cqs libcrypto.a *.o"
+ { "build": "SYS=`uname -s | tr 'A-Z' 'a-z'` && ARCH=`uname -m` && {cc} -I . -I src/include -c *.c src/crypto/*.c src/crypto/*/*.c $SYS-$ARCH/crypto/fipsmodule/*.S && {ar} cqs libcrypto.a *.o"
, "link": ["-lcrypto", "-lpthread"]
, "include_dir": "src/include/openssl"
, "include_name": "openssl"