aboutsummaryrefslogtreecommitdiff
path: root/lang/rust
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2020-05-18 18:40:41 +0000
committerAlan Somers <asomers@FreeBSD.org>2020-05-18 18:40:41 +0000
commita91e9355f1f6590c3c646f15e5d8f3744b247daf (patch)
tree02b490f899a7285d2b47b93afc9597ba934eaed9 /lang/rust
parenta7553e9646ec22e37cee91ac6893925218382b89 (diff)
downloadports-a91e9355f1f6590c3c646f15e5d8f3744b247daf.tar.gz
ports-a91e9355f1f6590c3c646f15e5d8f3744b247daf.zip
lang/rust-nightly: enable the Rust profiler
Enable the rust profiler on rust-nightly (as an unstable feature, it's not allowed on the stable toolchain). This allows it to generate code coverage reports. https://doc.rust-lang.org/unstable-book/compiler-flags/profile.html https://crates.io/crates/grcov Reviewed by: tobik Approved by: tobik (maintainer) Differential Revision: https://reviews.freebsd.org/D24765
Notes
Notes: svn path=/head/; revision=535771
Diffstat (limited to 'lang/rust')
-rw-r--r--lang/rust/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/lang/rust/Makefile b/lang/rust/Makefile
index 4b6c8989942e..5f2585e5748f 100644
--- a/lang/rust/Makefile
+++ b/lang/rust/Makefile
@@ -133,6 +133,9 @@ do-configure:
@${ECHO_CMD} 'python="${PYTHON_CMD}"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'docs=${_RUST_BUILD_DOCS}' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'verbose=2' >> ${WRKSRC}/config.toml
+.if defined(NIGHTLY_DATE)
+ @${ECHO_CMD} 'profiler=true' >> ${WRKSRC}/config.toml
+.endif
@${ECHO_CMD} 'target=[${_RUST_TARGETS:@.target.@"${.target.}"@:ts,}]' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'cargo="${WRKDIR}/bootstrap/bin/cargo"' >> ${WRKSRC}/config.toml
@${ECHO_CMD} 'rustc="${WRKDIR}/bootstrap/bin/rustc"' >> ${WRKSRC}/config.toml