diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-12-07 01:07:42 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2018-12-07 01:07:42 +0800 |
commit | b3372df9b7eb99bcc26fed20c9fea3c5dab5e16c (patch) | |
tree | ce52315c27daafa136e6b5cde7de2c1a26a7d4b2 /Mk | |
parent | 1bf26376028ca244d1cc6e4b20fdf6cb14ef44f1 (diff) | |
download | freebsd-ports-gnome-b3372df9b7eb99bcc26fed20c9fea3c5dab5e16c.tar.gz freebsd-ports-gnome-b3372df9b7eb99bcc26fed20c9fea3c5dab5e16c.tar.zst freebsd-ports-gnome-b3372df9b7eb99bcc26fed20c9fea3c5dab5e16c.zip |
USES=cargo to convert LDFLAGS into RUSTFLAGS
Approved by: rust (tobik)
Differential Revision: https://reviews.freebsd.org/D18039
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/cargo.mk | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk index cc608ef19cf9..a58c1853f8e2 100644 --- a/Mk/Uses/cargo.mk +++ b/Mk/Uses/cargo.mk @@ -62,15 +62,13 @@ CARGO_TARGET_DIR?= ${WRKDIR}/target # - RUSTC: path of rustc binary (default to lang/rust) # - RUSTDOC: path of rustdoc binary (default to lang/rust) # - RUSTFLAGS: custom flags to pass to all compiler invocations that Cargo performs -# -# XXX LDFLAGS => -C link-arg=$1 (via RUSTFLAGS) CARGO_ENV+= \ CARGO_HOME=${WRKDIR}/cargo-home \ CARGO_BUILD_JOBS=${MAKE_JOBS_NUMBER} \ CARGO_TARGET_DIR=${CARGO_TARGET_DIR} \ RUSTC=${LOCALBASE}/bin/rustc \ RUSTDOC=${LOCALBASE}/bin/rustdoc \ - RUSTFLAGS="${RUSTFLAGS}" + RUSTFLAGS="${RUSTFLAGS} ${LDFLAGS:S/^/-C link-arg=/}" # Adjust -C target-cpu if -march/-mcpu is set by bsd.cpu.mk .if ${ARCH} == amd64 || ${ARCH} == i386 |