Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Nov 2017 18:16:15 +0000 (UTC)
From:      =?UTF-8?Q?Jean-S=c3=a9bastien_P=c3=a9dron?= <dumbbell@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r454983 - in head/lang/rust: . files
Message-ID:  <201711271816.vARIGF9Q091347@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dumbbell
Date: Mon Nov 27 18:16:15 2017
New Revision: 454983
URL: https://svnweb.freebsd.org/changeset/ports/454983

Log:
  lang/rust: Remove the LLVM_PORT option
  
  FTR, this option allowed to used LLVM from ports instead of building the
  bundled copy.
  
  The problem is that this combination isn't really tested upstream. This
  led to regressions which are difficult to diagnose. For instance, in
  Rust 1.21.0, the bundled LLVM provided a new API to query the features
  supported by the target arch. The equivalent code inside Rust was
  removed to use that new API. Unfortunately, building Rust 1.21.0+ with a
  copy of LLVM not providing this API didn't failed but instead made that
  list of CPU features empty. This resulted in the following obscure build
  failure in Firefox:
  
      error[E0432]: unresolved import `x86::sse2`
  
  To avoid future pain for both end users and maintainers, we decided to
  remove that option. Yes, it will increase the (already long) time to
  build Rust, but it should save time wasted on debugging what is not
  really supported anyway.
  
  PR:		223342, 223300
  Reported by:	Many users

Modified:
  head/lang/rust/Makefile
  head/lang/rust/files/config.toml

Modified: head/lang/rust/Makefile
==============================================================================
--- head/lang/rust/Makefile	Mon Nov 27 18:10:41 2017	(r454982)
+++ head/lang/rust/Makefile	Mon Nov 27 18:16:15 2017	(r454983)
@@ -63,7 +63,7 @@ PLIST_SUB+=		RUST_TARGET=${RUST_TARGET}
 
 USES=		compiler gmake libedit pkgconfig python:2.7,build ssl
 
-OPTIONS_DEFINE=		DOCS GDB LLNEXTGEN PORT_LLVM SOURCES
+OPTIONS_DEFINE=		DOCS GDB LLNEXTGEN SOURCES
 GDB_DESC=		Install ports gdb (necessary for debugging rust programs)
 LLNEXTGEN_DESC=		Build with grammar verification
 SOURCES_DESC=		Install source files
@@ -71,12 +71,6 @@ SOURCES_DESC=		Install source files
 GDB_RUN_DEPENDS=		${LOCALBASE}/bin/gdb:devel/gdb
 LLNEXTGEN_BUILD_DEPENDS=	LLnextgen:devel/llnextgen
 
-# Rust may pass more regression tests with bundled LLVM
-PORT_LLVM_DESC=	Build against devel/llvm${LLVM_VER} instead of bundled version
-PORT_LLVM_BUILD_DEPENDS=	${LOCALBASE}/bin/FileCheck${LLVM_VER}:devel/llvm${LLVM_VER}
-LLVM_VER?=			40
-LLVM_CONFIG=			${LOCALBASE}/bin/llvm-config${LLVM_VER}
-
 # Rust manifests list all files and directories installed by rust-installer.
 # We use them in:
 #     - pre-install to cleanup the ${STAGEDIR}
@@ -236,12 +230,6 @@ post-configure-DOCS-on:
 
 post-configure-DOCS-off:
 	${REINPLACE_CMD} -e 's,%DOCS%,false,' ${WRKSRC}/config.toml
-
-post-configure-PORT_LLVM-on:
-	${REINPLACE_CMD} -e 's,%LLVM_CONFIG%,${LLVM_CONFIG},' ${WRKSRC}/config.toml
-
-post-configure-PORT_LLVM-off:
-	${REINPLACE_CMD} -e '/%LLVM_CONFIG%/d' ${WRKSRC}/config.toml
 
 do-build:
 	cd ${WRKSRC} && \

Modified: head/lang/rust/files/config.toml
==============================================================================
--- head/lang/rust/files/config.toml	Mon Nov 27 18:10:41 2017	(r454982)
+++ head/lang/rust/files/config.toml	Mon Nov 27 18:16:15 2017	(r454983)
@@ -25,7 +25,6 @@ mandir = "%MANDIR%"
 channel = "%CHANNEL%"
 
 [target.%TARGET%]
-llvm-config = "%LLVM_CONFIG%"
 
 [dist]
 



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