summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2022-09-19 11:27:23 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2022-10-05 14:35:36 +0200
commit07e75490b519b9d9829fc5ee86ae4b715a32773f (patch)
tree084871ea74bc03864546ff548f98cf6996a082ba /bin
parent9ddac3e83c03b3e8ad1192ce41ab21a27644e9db (diff)
downloadjustbuild-07e75490b519b9d9829fc5ee86ae4b715a32773f.tar.gz
Bootstrap: Support ARM architectures
Diffstat (limited to 'bin')
-rwxr-xr-xbin/bootstrap.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/bin/bootstrap.py b/bin/bootstrap.py
index 61597abb..926da9e9 100755
--- a/bin/bootstrap.py
+++ b/bin/bootstrap.py
@@ -7,6 +7,7 @@ import shutil
import subprocess
import sys
import tempfile
+import platform
from pathlib import Path
@@ -21,6 +22,16 @@ MAIN_STAGE = "bin/just"
LOCAL_LINK_DIRS_MODULE = "src/buildtool/main"
LOCAL_LINK_DIRS_TARGET = "just"
+# architecture related configuration (global variables)
+ARCHS = {
+ 'i686':'x86',
+ 'x86_64':'x86_64',
+ 'arm':'arm',
+ 'aarch64':'arm64'
+}
+MACH = platform.machine()
+CONF = ('{"ARCH":"%s"}' % (ARCHS[MACH],)) if MACH in ARCHS else '{}'
+
# relevant directories (global variables)
SRCDIR = os.getcwd()
@@ -225,7 +236,7 @@ def bootstrap():
GRAPH = os.path.join(WRKDIR, "graph.json")
TO_BUILD = os.path.join(WRKDIR, "to_build.json")
run([
- bootstrap_just, "analyse", "-C", CONF_FILE, "--dump-graph", GRAPH,
+ bootstrap_just, "analyse", "-C", CONF_FILE, "-D", CONF, "--dump-graph", GRAPH,
"--dump-artifacts-to-build", TO_BUILD, MAIN_MODULE, MAIN_TARGET
],
cwd=src_wrkdir)
@@ -236,7 +247,7 @@ def bootstrap():
cwd=src_wrkdir)
OUT = os.path.join(WRKDIR, "out")
run([
- "./out-boot/%s" % (MAIN_STAGE, ), "install", "-C", CONF_FILE, "-o", OUT,
+ "./out-boot/%s" % (MAIN_STAGE, ), "install", "-C", CONF_FILE, "-D", CONF, "-o", OUT,
"--local-build-root", LOCAL_ROOT, MAIN_MODULE, MAIN_TARGET
],
cwd=src_wrkdir)