summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL.md2
-rwxr-xr-xbin/bootstrap.py6
-rw-r--r--test/bootstrap/TARGETS21
3 files changed, 26 insertions, 3 deletions
diff --git a/INSTALL.md b/INSTALL.md
index cbf65b46..53b2e99c 100644
--- a/INSTALL.md
+++ b/INSTALL.md
@@ -69,6 +69,8 @@ before to be present as well).
this directory and has the expected blob id (computed the same
way as `git` does). Only if this is not the case, fetching from
the network is attempted.
+Additionally, if the environment variable `DEBUG` is set, the second
+bootstrap phase is carried out sequentially rather than in parallel.
In any case, the resulting binary is selfcontained and can be moved
to an appropriate location in `PATH`.
diff --git a/bin/bootstrap.py b/bin/bootstrap.py
index b6f3fac7..4b83e033 100755
--- a/bin/bootstrap.py
+++ b/bin/bootstrap.py
@@ -254,8 +254,12 @@ def bootstrap():
"--dump-artifacts-to-build", TO_BUILD, MAIN_MODULE, MAIN_TARGET
],
cwd=src_wrkdir)
+ if "DEBUG" in os.environ:
+ traverser = "./bin/bootstrap-traverser.py"
+ else:
+ traverser = "./bin/parallel-bootstrap-traverser.py"
run([
- "./bin/bootstrap-traverser.py", "-C", CONF_FILE, "--default-workspace",
+ traverser, "-C", CONF_FILE, "--default-workspace",
src_wrkdir, GRAPH, TO_BUILD
],
cwd=src_wrkdir)
diff --git a/test/bootstrap/TARGETS b/test/bootstrap/TARGETS
index 258b006c..62ac3e5d 100644
--- a/test/bootstrap/TARGETS
+++ b/test/bootstrap/TARGETS
@@ -1,9 +1,26 @@
{ "bundled-test":
{ "type": ["@", "rules", "shell/test", "script"]
- , "name": ["bootstrap-test-bundled"]
+ , "arguments_config": ["SUFFIX"]
+ , "name":
+ [ "bootstrap-test-bundled"
+ , {"type": "var", "name": "SUFFIX", "default": ""}
+ ]
, "test": ["test-bootstrap.sh"]
, "deps": [["", "bootstrap-src"], ["@", "just-distfiles", "", "distdir"]]
}
+, "bundled-test-debug":
+ { "type": "configure"
+ , "tainted": ["test"]
+ , "target": "bundled-test"
+ , "config":
+ { "type": "let*"
+ , "bindings":
+ [ ["SUFFIX", "-debug"]
+ , ["TEST_ENV", {"type": "singleton_map", "key": "DEBUG", "value": "YES"}]
+ ]
+ , "body": {"type": "env", "vars": ["TEST_ENV", "SUFFIX"]}
+ }
+ }
, "well_known_protos":
{ "type": ["@", "rules", "data", "staged"]
, "srcs": [["@", "protoc", "", "well_known_protos"]]
@@ -45,6 +62,6 @@
, "TESTS":
{ "type": "install"
, "tainted": ["test"]
- , "deps": ["bundled-test", "prebuilt-test"]
+ , "deps": ["bundled-test", "bundled-test-debug", "prebuilt-test"]
}
}