svn commit: r535771 - in head/lang: rust rust-nightly

Alan Somers asomers at FreeBSD.org
Mon May 18 18:40:42 UTC 2020


Author: asomers (src committer)
Date: Mon May 18 18:40:41 2020
New Revision: 535771
URL: https://svnweb.freebsd.org/changeset/ports/535771

Log:
  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

Modified:
  head/lang/rust-nightly/Makefile
  head/lang/rust/Makefile

Modified: head/lang/rust-nightly/Makefile
==============================================================================
--- head/lang/rust-nightly/Makefile	Mon May 18 18:33:10 2020	(r535770)
+++ head/lang/rust-nightly/Makefile	Mon May 18 18:40:41 2020	(r535771)
@@ -3,7 +3,7 @@
 
 PORTVERSION=	1.45.0.${NIGHTLY_DATE:C,-,,g}
 # Always set PORTREVISION explicitly as otherwise it is inherited from lang/rust
-PORTREVISION=	0
+PORTREVISION=	1
 PKGNAMESUFFIX=	-nightly
 DISTNAME=	rustc-nightly-src
 

Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile	Mon May 18 18:33:10 2020	(r535770)
+++ head/lang/rust/Makefile	Mon May 18 18:40:41 2020	(r535771)
@@ -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


More information about the svn-ports-head mailing list