diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2023-09-23 20:24:37 +0800 |
|---|---|---|
| committer | Jeffery To <jeffery.to@gmail.com> | 2023-10-11 15:50:24 +0800 |
| commit | 0dfc1b508d5e5b361978ef9783cb63775176c305 (patch) | |
| tree | 87d123b9d63916b84de9d88e81502e38a6bf4a0b /utils | |
| parent | 9db7284d589dc8490f8c7dbe56af731fce953eda (diff) | |
rust: Use make's jobserver when building packages
This allows cargo to use make's jobserver when building packages, by
marking the cargo command as recursive (with the + prefix[1]) and
setting MAKEFLAGS.
This also:
* Give cargo/x.py the build directory instead of having to change the
current directory (and opening subshells)
* Set PKG_BUILD_PARALLEL/HOST_BUILD_PARALLEL for Rust packages to enable
the use of make's jobserver
[1]: https://www.gnu.org/software/make/manual/html_node/POSIX-Jobserver.html
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/arp-whisper/Makefile | 1 | ||||
| -rw-r--r-- | utils/procs/Makefile | 1 | ||||
| -rw-r--r-- | utils/ripgrep/Makefile | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/utils/arp-whisper/Makefile b/utils/arp-whisper/Makefile index 23461f998..207ed5f1b 100644 --- a/utils/arp-whisper/Makefile +++ b/utils/arp-whisper/Makefile @@ -17,6 +17,7 @@ PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=LICENCE PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/rust/rust-package.mk diff --git a/utils/procs/Makefile b/utils/procs/Makefile index 9f1f11fb2..41eeb9c18 100644 --- a/utils/procs/Makefile +++ b/utils/procs/Makefile @@ -17,6 +17,7 @@ PKG_LICENSE:=MIT PKG_LICENSE_FILES:=LICENCE PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk include ../../lang/rust/rust-package.mk diff --git a/utils/ripgrep/Makefile b/utils/ripgrep/Makefile index 56658540f..bad9f95e2 100644 --- a/utils/ripgrep/Makefile +++ b/utils/ripgrep/Makefile @@ -17,6 +17,7 @@ PKG_LICENSE:=MIT Unlicense PKG_LICENSE_FILES:=LICENSE-MIT UNLICENSE PKG_BUILD_DEPENDS:=rust/host +PKG_BUILD_PARALLEL:=1 RUST_PKG_FEATURES:=pcre2 |
