Hi,
The following diff on lang/rust will switch it to embedded LLVM.
Brad would like to update devel/llvm to 5.0rc, but rustc 1.19.0 doesn't
support it.
It is also a sane path for compiling rustc with libc++ instead of
libestdc++. Currently devel/llvm is linked to libestdc++ and rustc could
link with llvm and libc++ (as it would mix libc++ and libestdc++).
The status for libc++ regarding rustc is good for now, but I have a
stopper with not functional unwinding: it works with debugging symbols
but not without... More details at https://github.com/rust-lang/rust/issues/43575
Thanks.
--
Sebastien Marie
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/rust/Makefile,v
retrieving revision 1.49
diff -u -p -r1.49 Makefile
--- Makefile 22 Aug 2017 11:10:01 -0000 1.49
+++ Makefile 23 Aug 2017 18:06:24 -0000
@@ -20,7 +20,7 @@ BV = ${BV-${MACHINE_ARCH}}
PKGNAME = rust-${V}
PKGNAME-main = rust-${V}
PKGNAME-doc = rust-doc-${V}
-REVISION-main = 0
+REVISION-main = 1
MULTI_PACKAGES = -main -doc
@@ -63,8 +63,13 @@ MODULES += gcc4 \
lang/python
MODPY_RUNDEP = No
-BUILD_DEPENDS += devel/llvm \
- devel/cmake
+BUILD_DEPENDS += devel/cmake
+#BUILD_DEPENDS += devel/llvm
+
+.if ! ${BUILD_DEPENDS:Mdevel/llvm}
+# use ninja to compile embedded llvm
+BUILD_DEPENDS += devel/ninja
+.endif
LIB_DEPENDS += net/curl \
devel/libgit2/libgit2 \
@@ -154,9 +159,15 @@ do-configure:
echo '[dist]' >>${WRKBUILD}/config.toml
echo 'src-tarball = false' >>${WRKBUILD}/config.toml
+ echo '[llvm]' >>${WRKBUILD}/config.toml
+ echo 'static-libstdcpp = false' >>${WRKBUILD}/config.toml
+ echo 'ninja = true' >>${WRKBUILD}/config.toml
+
echo '[target.${TRIPLE_ARCH}]' >>${WRKBUILD}/config.toml
+.if ${BUILD_DEPENDS:Mdevel/llvm}
echo 'llvm-config = "${LOCALBASE}/bin/llvm-config"' \
>>${WRKBUILD}/config.toml
+.endif
rm -rf ${WRKDIR}/modgcc-libs
mkdir -p ${WRKDIR}/modgcc-libs
No comments:
Post a Comment