diff options
author | jperkin <jperkin@pkgsrc.org> | 2018-07-06 08:22:53 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2018-07-06 08:22:53 +0000 |
commit | 60ac2ee9d8bb621543190876b19acb44d16eee6b (patch) | |
tree | 3c74b2b4b03916091337071975c4f7c73a38cb6a /lang | |
parent | bc80590f72b3770bfe330512f4585b61bd060971 (diff) | |
download | pkgsrc-60ac2ee9d8bb621543190876b19acb44d16eee6b.tar.gz |
rust: Set CARGO_BUILD_JOBS to MAKE_JOBS.
cargo defaults to using the number of CPUs detected on the host machine, which
is a terrible heuristic and can easily lead to DRAM exhaustion, especially in a
zones environment where you have access to the full number of CPUs but will be
limited to a portion of available DRAM.
Tidy up a SunOS section while here.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/rust/Makefile | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile index 11cf5ffdd30..a27bf92b7ea 100644 --- a/lang/rust/Makefile +++ b/lang/rust/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.40 2018/07/04 13:40:22 jperkin Exp $ +# $NetBSD: Makefile,v 1.41 2018/07/06 08:22:53 jperkin Exp $ DISTNAME= rustc-1.27.0-src PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//} @@ -31,11 +31,15 @@ CONFIGURE_ARGS+= --disable-codegen-tests CONFIGURE_ARGS+= --disable-dist-src CONFIGURE_ARGS+= --disable-llvm-static-stdcpp CONFIGURE_ARGS+= --disable-ninja +CONFIGURE_ARGS.SunOS+= --disable-jemalloc # This should allow us to perform "offline" builds (so cargo doesn't fetch # dependencies during the build stage) but this isn't hooked up yet. CONFIGURE_ARGS+= --enable-vendor +# cargo defaults to using the number of available CPUs +MAKE_ENV+= CARGO_BUILD_JOBS=${MAKE_JOBS:U1} + UNLIMIT_RESOURCES+= cputime PYTHON_VERSIONS_ACCEPTED= 27 @@ -57,17 +61,6 @@ GCC_REQD+= 4.8 BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags # -# Use bundled LLVM and libumem on SunOS. -# -.if ${OPSYS} == "SunOS" -CONFIGURE_ARGS+= --disable-jemalloc -.else -#CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm} -#BUILDLINK_API_DEPENDS.llvm+= llvm>=4.0.1nb1 -#.include "../../lang/llvm/buildlink3.mk" -.endif - -# # Rust unfortunately requires itself to build. On platforms which aren't # supported by upstream (where they offer binary bootstraps), or where we do # not trust random binaries from the Internet, we need to build and provide our |