summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCeleste <20312-Celeste@users.gitlab.alpinelinux.org>2024-08-13 00:41:28 +0000
committerCeleste <20312-Celeste@users.gitlab.alpinelinux.org>2024-09-06 06:13:07 +0000
commit157db54c2b021afa15ea139ce5061721fca8cc85 (patch)
tree383dee88f33836b6dd772f90ea53f233b20b3fdb
parent60a6fd82a383a3a187054666b32910185dc643ab (diff)
downloadaports-157db54c2b021afa15ea139ce5061721fca8cc85.zip
main/rust: allow re-running build()
This comes in handy when debugging why a build fails, use `--incremental` so we do not have to rebuild all stages each time build() is run. Also, `./configure` will exit with the following message if a "config.toml" (even an empty one) is found: "configure: ERROR: Existing 'config.toml' detected. Exiting" So, if "config.toml" exists, assume we want to restart the build by skipping `./configure` and proceeding on to `./x.py`.
-rw-r--r--main/rust/APKBUILD6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/rust/APKBUILD b/main/rust/APKBUILD
index fe64330ddeb..01aacd53d17 100644
--- a/main/rust/APKBUILD
+++ b/main/rust/APKBUILD
@@ -242,7 +242,9 @@ build() {
'
fi
- ./configure \
+ # ./configure will not run when config.toml exists,
+ # so assume we are restarting the build with ./x.py
+ [ -f "config.toml" ] || ./configure \
--build="$_build" \
--host="$_target" \
--target="$targets" \
@@ -290,7 +292,7 @@ build() {
else
python3 ./x.py build --jobs ${JOBS:-2} \
--host $_target --target $targets \
- --stage=2 src/tools/cargo
+ --stage=2 --incremental src/tools/cargo
fi
}