Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Dec 2018 17:07:42 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r486769 - head/Mk/Uses
Message-ID:  <201812061707.wB6H7gqM041538@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Thu Dec  6 17:07:42 2018
New Revision: 486769
URL: https://svnweb.freebsd.org/changeset/ports/486769

Log:
  USES=cargo to convert LDFLAGS into RUSTFLAGS
  
  Approved by:	rust (tobik)
  Differential Revision:	https://reviews.freebsd.org/D18039

Modified:
  head/Mk/Uses/cargo.mk   (contents, props changed)

Modified: head/Mk/Uses/cargo.mk
==============================================================================
--- head/Mk/Uses/cargo.mk	Thu Dec  6 16:51:51 2018	(r486768)
+++ head/Mk/Uses/cargo.mk	Thu Dec  6 17:07:42 2018	(r486769)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812061707.wB6H7gqM041538>