From 5354fb113a7d248a8b67c0cea158d831784f9a2d Mon Sep 17 00:00:00 2001 From: Tasos Sahanidis Date: Sun, 7 Apr 2024 00:19:25 +0300 Subject: extra/rust: Fix out of memory linking LLVM --- extra/rust/PKGBUILD | 7 +++++-- extra/rust/config.toml.patch | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'extra') diff --git a/extra/rust/PKGBUILD b/extra/rust/PKGBUILD index 7933ccf5..14ddf770 100644 --- a/extra/rust/PKGBUILD +++ b/extra/rust/PKGBUILD @@ -6,7 +6,7 @@ # see https://github.com/rust-lang/rust/issues/60294 source+=(config.toml.patch) -b2sums+=('899c8ba0052c72095e3fb8e9f1d06c91dafbec2403f605163765d8493ccb6255fbd719848ba92a04d443af99edd64976bafc8d96e06f5f7f79291eb060fdabc7') +b2sums+=('916e62176ff8f943428532c28ec31632c153db5a9e906ae7a45df88cac72d437d23a56eb05e915ea2b2f524ac96d0b9ff8c106ed82572f7ed3324ded3fcf5a74') eval "$( declare -f prepare | \ @@ -19,7 +19,7 @@ eval "$( eval "$( declare -f build | \ sed ' - s/-j "$(nproc)"/-j8/ + s/-j "$(nproc)"/$(grep -o -- "-j *[0-9]*" <<< ${MAKEFLAGS:--j8})/ ' )" @@ -79,3 +79,6 @@ makedepends=(${makedepends[@]//lib32-gcc-libs/}) # from build-support makedepends=(${makedepends[@]//rust/}) makedepends+=('rust176-bin') + +# Do not run out of memory linking LLVM +options+=(!debug) diff --git a/extra/rust/config.toml.patch b/extra/rust/config.toml.patch index f54a06cd..20b8e24b 100644 --- a/extra/rust/config.toml.patch +++ b/extra/rust/config.toml.patch @@ -5,7 +5,7 @@ [llvm] link-shared = true +link-jobs = 1 -+use-linker = "gold" ++use-linker = "bfd" [build] target = [ -- cgit v1.2.3-70-g09d2