Skip to content

Commit

Permalink
lang/rust*: Mk/Uses/cargo.mk: Move TMPDIR to WRKDIR
Browse files Browse the repository at this point in the history
rustc stashes intermediary files in TMPDIR (default /tmp) which
might cause issues for users that for some reason space limit their
/tmp.  WRKDIR should have plenty of space.

Other ports that use rustc might be affected too, but set it only
in USES=cargo and lang/rust* ports for now.

PR:		258126
With hat:	rust
  • Loading branch information
Tobias Kortkamp authored and Tobias Kortkamp committed Sep 6, 2021
1 parent b7fe3ca commit b1670e2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Mk/Uses/cargo.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ CARGO_TEST?= yes
CARGO_USE_GITHUB?= no
CARGO_USE_GITLAB?= no

# rustc stashes intermediary files in TMPDIR (default /tmp) which
# might cause issues for users that for some reason space limit
# their /tmp. WRKDIR should have plenty of space.
# Allow users and ports to still overwrite it.
.if ${TMPDIR:U/tmp} == /tmp
TMPDIR= ${WRKDIR}
.endif

# Manage crate features.
.if !empty(CARGO_FEATURES:M--no-default-features)
CARGO_BUILD_ARGS+= --no-default-features
Expand Down
5 changes: 5 additions & 0 deletions lang/rust-bootstrap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ CC= clang90
CXX= clang++90
.endif
PATCHDIR= ${.CURDIR}/../rust/files
# rustc stashes intermediary files in TMPDIR (default /tmp) which
# might cause issues for users that for some reason space limit
# their /tmp. WRKDIR should have plenty of space.
# ?= to allow users to still overwrite it in make.conf.
TMPDIR?= ${WRKDIR}
# Resulting packages are not specific to amd64
NO_ARCH= yes

Expand Down
6 changes: 6 additions & 0 deletions lang/rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ TEST_ENV= ${MAKE_ENV} \

CONFLICTS_INSTALL?= rust-nightly

# rustc stashes intermediary files in TMPDIR (default /tmp) which
# might cause issues for users that for some reason space limit
# their /tmp. WRKDIR should have plenty of space.
# ?= to allow users to still overwrite it in make.conf.
TMPDIR?= ${WRKDIR}

OPTIONS_DEFINE= DOCS GDB SOURCES WASM
OPTIONS_DEFAULT= SOURCES WASM
OPTIONS_EXCLUDE_armv6= DOCS
Expand Down

0 comments on commit b1670e2

Please sign in to comment.