Hi,
I would like to make a change in the installed files of lang/rust, and
doing some cleanup in the port specific code.
The diff does severals things:
- remove now unneeded MAKE_ENV option to pass --sysroot argument to
bootstrapper
- backport the latest changes for building rustc under openbsd
(resolves problems of building lang/rust with LLVM or rustc
libraries in /usr/local/lib)
- switch the install from installing a stage3 rustc binary to
installing a stage2 rustc binary (and all required libraries)
The main difference between stage2 and stage3 for rustc is normally
stage2 binary is for standard install, and stage3 binary for building a
bootstrapper. In pratice, stage3 is self contained: it only depends of
system-libaries (libc, libm, and libestdc++), whereas the stage2 depends
also to a big set of libraries coming with rustc.
stage3 binary:
-r-xr-xr-x 1 root bin 42.0M Dec 20 18:55
/usr/local/lib/rustlib/x86_64-unknown-openbsd/bin/rustc
stage2 binary:
-r-xr-xr-x 1 root bin 7.8K Jan 9 14:07
/usr/local/lib/rustlib/x86_64-unknown-openbsd/bin/rustc
Installing a stage3 was initially done in order to avoid problem of
versioning: the libraries installed with rustc aren't versioned
according to OpenBSD schema, and it seems really complex to do, as rustc
do lot of things by itself for linking.
So I would like advices from ports developpers to known if my approch is
right.
As you will see in PLIST-main, the make installs libraries like:
+lib/liblog-${RUST_HASH}.so
+lib/librbml-${RUST_HASH}.so
+lib/librustc-${RUST_HASH}.so
+lib/librustc_back-${RUST_HASH}.so
Rust use versioning system that include the RUST_HASH (hash of the
current version number of the compiler, here 1.5.0) in the library name.
So any change of compiler version implies new libraries.
Currently, nothing depends of libraries included in lang/rust.
This switch is need in order to build cargo: it depends of a library
(libsyntax-${RUST_HASH}.so) that is currently no installed with stage3
binary.
Thanks for your comments.
--
Sebastien Marie
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/rust/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 10 Dec 2015 17:53:57 -0000 1.12
+++ Makefile 9 Jan 2016 13:12:08 -0000
@@ -10,6 +10,7 @@ COMMENT-doc = html documentation for ru
V = 1.5.0
RUST_HASH = 35c36e89
DISTNAME = rustc-${V}-src
+REVISION = 0
SUBST_VARS += RUST_HASH
@@ -68,12 +69,9 @@ LIBESTDC_VERSION = 17.0
# RUSTFLAGS extra flags passed to rust
# -L modgcc-libs : disambiguate libestdc++.so
# -Z print-link-args : unhide link call
-# RUSTFLAGS_STAGE0 extra flags passed to stage0
-# --sysroot force sysroot (due to limitation of us bootstrapper)
# RUST_LOG helper
MAKE_ENV = VERBOSE=1 \
RUSTFLAGS="-L ${WRKDIR}/modgcc-libs -Z print-link-args"
\
- RUSTFLAGS_STAGE0="--sysroot
${WRKBUILD}/${TRIPLE_ARCH}/stage0" \
RUST_LOG="${RUST_LOG}"
@@ -97,9 +95,7 @@ USE_LIBTOOL = gnu
CONFIGURE_ARGS += --llvm-root="${LOCAL_LLVM_FOR_RUST}"
.endif
-ALL_TARGET += rustc-stage3 \
- ${TRIPLE_ARCH}/stage3/bin/rustdoc \
- docs
+ALL_TARGET += rustc-stage2 docs
TEST_TARGET = check
TEST_ENV += ALLOW_NONZERO_RLIMIT_CORE=1
TEST_DEPENDS += devel/git
@@ -129,34 +125,14 @@ post-configure:
cp ${WRKDIR}/rust-stage0/lib/lib*.so* \
${WRKBUILD}/${TRIPLE_ARCH}/stage0/lib
-
-# do-install: don't use the default install target
-do-install:
- # host binary
- ${INSTALL_PROGRAM_DIR} ${PREFIX}/lib/rustlib/${TRIPLE_ARCH}/bin
- ${INSTALL_PROGRAM} ${WRKBUILD}/${TRIPLE_ARCH}/stage3/bin/rustc \
+post-install:
+ # cleanup
+ rm
${PREFIX}/lib/rustlib/{install.log,uninstall.sh,rust-installer-version}
+ # host binary wrapper
+ ${INSTALL_PROGRAM_DIR} \
${PREFIX}/lib/rustlib/${TRIPLE_ARCH}/bin
+ mv ${PREFIX}/bin/rustc ${PREFIX}/lib/rustlib/${TRIPLE_ARCH}/bin
${SUBST_PROGRAM} -c \
files/rustc ${PREFIX}/bin/rustc
- ${INSTALL_PROGRAM} ${WRKBUILD}/${TRIPLE_ARCH}/stage3/bin/rustdoc \
- ${PREFIX}/bin/rustdoc
-
- # data
- ${INSTALL_DATA} \
- ${WRKSRC}/man/{rustc,rustdoc}.1 \
- ${PREFIX}/man/man1
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/rust
- ${INSTALL_DATA}
${WRKSRC}/{COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md} \
- ${PREFIX}/share/doc/rust
- # target libraries
- ${INSTALL_DATA_DIR} ${PREFIX}/lib/rustlib/${TRIPLE_ARCH}/lib
- ${INSTALL_DATA} \
-
${WRKBUILD}/${TRIPLE_ARCH}/stage3/lib/rustlib/${TRIPLE_ARCH}/lib/lib* \
- ${PREFIX}/lib/rustlib/${TRIPLE_ARCH}/lib
-
- # html documentation
- cp -R ${WRKBUILD}/doc ${PREFIX}/share/doc/rust/html
- chmod -R a+rX ${PREFIX}/share/doc/rust/html
-
.include <bsd.port.mk>
Index: patches/patch-configure
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-configure,v
retrieving revision 1.4
diff -u -p -r1.4 patch-configure
--- patches/patch-configure 22 Sep 2015 08:11:24 -0000 1.4
+++ patches/patch-configure 9 Jan 2016 13:12:08 -0000
@@ -1,9 +1,9 @@
$OpenBSD: patch-configure,v 1.4 2015/09/22 08:11:24 semarie Exp $
Remove requirement for curl or wget.
The snapshot isn't downloaded but copied by post-configure.
---- configure.orig Tue Aug 4 21:28:47 2015
-+++ configure Fri Aug 7 06:37:54 2015
-@@ -696,7 +696,7 @@ putvar CFG_BOOTSTRAP_KEY
+--- configure.orig Fri Dec 4 21:18:59 2015
++++ configure Tue Dec 15 06:46:14 2015
+@@ -721,7 +721,7 @@ putvar CFG_BOOTSTRAP_KEY
step_msg "looking for build programs"
Index: patches/patch-mk_cfg_x86_64-unknown-openbsd_mk
===================================================================
RCS file: patches/patch-mk_cfg_x86_64-unknown-openbsd_mk
diff -N patches/patch-mk_cfg_x86_64-unknown-openbsd_mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-mk_cfg_x86_64-unknown-openbsd_mk 9 Jan 2016 13:12:08
-0000
@@ -0,0 +1,9 @@
+$OpenBSD$
+https://github.com/rust-lang/rust/pull/29794
+--- mk/cfg/x86_64-unknown-openbsd.mk.orig Sat Jan 9 08:59:36 2016
++++ mk/cfg/x86_64-unknown-openbsd.mk Sat Jan 9 09:00:04 2016
+@@ -20,3 +20,4 @@ CFG_LDPATH_x86_64-unknown-openbsd :=
+ CFG_RUN_x86_64-unknown-openbsd=$(2)
+ CFG_RUN_TARG_x86_64-unknown-openbsd=$(call
CFG_RUN_x86_64-unknown-openbsd,,$(2))
+ CFG_GNU_TRIPLE_x86_64-unknown-openbsd := x86_64-unknown-openbsd
++RUSTC_FLAGS_x86_64-unknown-openbsd=-C linker=$(call FIND_COMPILER,$(CC))
Index: patches/patch-mk_platform_mk
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-mk_platform_mk,v
retrieving revision 1.1
diff -u -p -r1.1 patch-mk_platform_mk
--- patches/patch-mk_platform_mk 10 Dec 2015 17:53:57 -0000 1.1
+++ patches/patch-mk_platform_mk 9 Jan 2016 13:12:08 -0000
@@ -1,20 +1,19 @@
-$OpenBSD: patch-mk_platform_mk,v 1.1 2015/12/10 17:53:57 semarie Exp $
-Remove possible conflict between system-llvm and rustc-llvm
+$OpenBSD$
https://github.com/rust-lang/rust/pull/29794
---- mk/platform.mk.orig Fri Dec 4 21:18:59 2015
-+++ mk/platform.mk Wed Dec 9 10:06:55 2015
-@@ -211,9 +211,11 @@ define CFG_MAKE_TOOLCHAIN
- # On OpenBSD, we need to pass the path of libstdc++.so to the linker
- # (use path of libstdc++.a which is a known name for the same path)
- ifeq ($(OSTYPE_$(1)),unknown-openbsd)
+--- mk/platform.mk.orig Sat Jan 9 09:59:06 2016
++++ mk/platform.mk Sat Jan 9 09:59:13 2016
+@@ -208,14 +208,6 @@ define CFG_MAKE_TOOLCHAIN
+
+ ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
+
+- # On OpenBSD, we need to pass the path of libstdc++.so to the linker
+- # (use path of libstdc++.a which is a known name for the same path)
+- ifeq ($(OSTYPE_$(1)),unknown-openbsd)
- RUSTC_FLAGS_$(1)=-L "$$(dir $$(shell $$(CC_$(1))
$$(CFG_GCCISH_CFLAGS_$(1)) \
- -print-file-name=lib$(CFG_STDCPP_NAME).a))" \
- $(RUSTC_FLAGS_$(1))
-+ STDCPP_LIBDIR_RUSTFLAGS_$(1)= \
-+ -L "$$(dir $$(shell $$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
-+ -print-file-name=lib$(CFG_STDCPP_NAME).a))"
-+ else
-+ STDCPP_LIBDIR_RUSTFLAGS_$(1)=
- endif
-
+- endif
+-
# On Bitrig, we need the relocation model to be PIC for everything
+ ifeq (,$(filter $(OSTYPE_$(1)),bitrig))
+ LLVM_MC_RELOCATION_MODEL="pic"
Index: patches/patch-mk_target_mk
===================================================================
RCS file: patches/patch-mk_target_mk
diff -N patches/patch-mk_target_mk
--- patches/patch-mk_target_mk 10 Dec 2015 17:53:57 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
-$OpenBSD: patch-mk_target_mk,v 1.1 2015/12/10 17:53:57 semarie Exp $
-Remove possible conflict between system-llvm and rustc-llvm
-https://github.com/rust-lang/rust/pull/29794
---- mk/target.mk.orig Fri Dec 4 21:18:59 2015
-+++ mk/target.mk Wed Dec 9 10:06:55 2015
-@@ -95,6 +95,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
- $$(RUSTFLAGS_$(4)) \
- $$(RUSTFLAGS$(1)_$(4)) \
- $$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
-+ $$(STDCPP_LIBDIR_RUSTFLAGS_$(2)) \
- --out-dir $$(@D) \
- -C extra-filename=-$$(CFG_FILENAME_EXTRA) \
- $$<
-@@ -128,7 +129,9 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
- $$(TSREQ$(1)_T_$(2)_H_$(3)) \
- | $$(TBIN$(1)_T_$(2)_H_$(3))/
- @$$(call E, rustc: $$@)
-- $$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --cfg $(4)
-+ $$(STAGE$(1)_T_$(2)_H_$(3)) \
-+ $$(STDCPP_LIBDIR_RUSTFLAGS_$(2)) \
-+ -o $$@ $$< --cfg $(4)
-
- endef
-
Index: patches/patch-mk_tests_mk
===================================================================
RCS file: patches/patch-mk_tests_mk
diff -N patches/patch-mk_tests_mk
--- patches/patch-mk_tests_mk 10 Dec 2015 17:53:57 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-$OpenBSD: patch-mk_tests_mk,v 1.1 2015/12/10 17:53:57 semarie Exp $
-Remove possible conflict between system-llvm and rustc-llvm
-https://github.com/rust-lang/rust/pull/29794
---- mk/tests.mk.orig Fri Dec 4 21:18:59 2015
-+++ mk/tests.mk Wed Dec 9 10:06:55 2015
-@@ -391,7 +391,8 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
- $$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
- -L "$$(RT_OUTPUT_DIR_$(2))" \
- $$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
-- $$(RUSTFLAGS_$(4))
-+ $$(RUSTFLAGS_$(4)) \
-+ $$(STDCPP_LIBDIR_RUSTFLAGS_$(2))
-
- endef
-
-@@ -661,9 +662,9 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
- --android-cross-path=$(CFG_ANDROID_CROSS_PATH) \
- --adb-path=$(CFG_ADB) \
- --adb-test-dir=$(CFG_ADB_TEST_DIR) \
-- --host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L
$$(RT_OUTPUT_DIR_$(3))" \
-+ --host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L
$$(RT_OUTPUT_DIR_$(3)) $$(STDCPP_LIBDIR_RUSTFLAGS_$(3))" \
- --lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \
-- --target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L
$$(RT_OUTPUT_DIR_$(2))" \
-+ --target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L
$$(RT_OUTPUT_DIR_$(2)) $$(STDCPP_LIBDIR_RUSTFLAGS_$(2))" \
- $$(CTEST_TESTARGS)
-
- ifdef CFG_VALGRIND_RPASS
Index: patches/patch-src_etc_rust-gdb
===================================================================
RCS file: patches/patch-src_etc_rust-gdb
diff -N patches/patch-src_etc_rust-gdb
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_etc_rust-gdb 9 Jan 2016 13:12:08 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+only compatible with egdb (gdb from ports)
+--- src/etc/rust-gdb.orig Sat Dec 12 07:12:56 2015
++++ src/etc/rust-gdb Sat Dec 12 07:13:44 2015
+@@ -17,7 +17,7 @@ RUSTC_SYSROOT=`rustc --print=sysroot`
+ GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+
+ # Run GDB with the additional arguments that load the pretty printers
+-PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" gdb \
++PYTHONPATH="$PYTHONPATH:$GDB_PYTHON_MODULE_DIRECTORY" egdb \
+ -d "$GDB_PYTHON_MODULE_DIRECTORY" \
+ -iex "add-auto-load-safe-path $GDB_PYTHON_MODULE_DIRECTORY" \
+ "$@"
Index: patches/patch-src_test_run-make_tools_mk
===================================================================
RCS file: patches/patch-src_test_run-make_tools_mk
diff -N patches/patch-src_test_run-make_tools_mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_test_run-make_tools_mk 9 Jan 2016 13:12:08 -0000
@@ -0,0 +1,17 @@
+$OpenBSD$
+https://github.com/rust-lang/rust/pull/29794
+--- src/test/run-make/tools.mk.orig Sat Jan 9 09:02:08 2016
++++ src/test/run-make/tools.mk Sat Jan 9 09:02:26 2016
+@@ -85,11 +85,7 @@ ifeq ($(UNAME),Bitrig)
+ else
+ ifeq ($(UNAME),OpenBSD)
+ EXTRACFLAGS := -lm -lpthread
+- # extend search lib for found estdc++ if build using gcc from
+- # ports under OpenBSD. This is needed for:
+- # - run-make/execution-engine
+- # - run-make/issue-19371
+- RUSTC := $(RUSTC) -L/usr/local/lib
++ RUSTC := $(RUSTC) -C linker="$(word 1,$(CC:ccache=))"
+ else
+ EXTRACFLAGS := -lm -lrt -ldl -lpthread
+ EXTRACXXFLAGS := -lstdc++
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/lang/rust/pkg/PLIST-main,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST-main
--- pkg/PLIST-main 2 Nov 2015 12:44:24 -0000 1.3
+++ pkg/PLIST-main 9 Jan 2016 13:12:08 -0000
@@ -1,7 +1,43 @@
@comment $OpenBSD: PLIST-main,v 1.3 2015/11/02 12:44:24 semarie Exp $
+bin/rust-gdb
bin/rustc
@bin bin/rustdoc
+lib/libarena-${RUST_HASH}.so
+lib/libflate-${RUST_HASH}.so
+lib/libfmt_macros-${RUST_HASH}.so
+lib/libgetopts-${RUST_HASH}.so
+lib/libgraphviz-${RUST_HASH}.so
+lib/liblog-${RUST_HASH}.so
+lib/librbml-${RUST_HASH}.so
+lib/librustc-${RUST_HASH}.so
+lib/librustc_back-${RUST_HASH}.so
+lib/librustc_borrowck-${RUST_HASH}.so
+lib/librustc_data_structures-${RUST_HASH}.so
+lib/librustc_driver-${RUST_HASH}.so
+lib/librustc_front-${RUST_HASH}.so
+lib/librustc_lint-${RUST_HASH}.so
+lib/librustc_llvm-${RUST_HASH}.so
+lib/librustc_mir-${RUST_HASH}.so
+lib/librustc_platform_intrinsics-${RUST_HASH}.so
+lib/librustc_privacy-${RUST_HASH}.so
+lib/librustc_resolve-${RUST_HASH}.so
+lib/librustc_trans-${RUST_HASH}.so
+lib/librustc_typeck-${RUST_HASH}.so
+lib/librustdoc-${RUST_HASH}.so
+lib/libserialize-${RUST_HASH}.so
+lib/libstd-${RUST_HASH}.so
+lib/libsyntax-${RUST_HASH}.so
+lib/libterm-${RUST_HASH}.so
+lib/libtest-${RUST_HASH}.so
lib/rustlib/
+lib/rustlib/components
+lib/rustlib/etc/
+lib/rustlib/etc/debugger_pretty_printers_common.py
+lib/rustlib/etc/gdb_load_rust_pretty_printers.py
+lib/rustlib/etc/gdb_rust_pretty_printing.py
+lib/rustlib/manifest-rust-docs
+lib/rustlib/manifest-rust-std-${TRIPLE_ARCH}
+lib/rustlib/manifest-rustc
lib/rustlib/${TRIPLE_ARCH}/
lib/rustlib/${TRIPLE_ARCH}/bin/
@bin lib/rustlib/${TRIPLE_ARCH}/bin/rustc
@@ -15,6 +51,7 @@ lib/rustlib/${TRIPLE_ARCH}/lib/libcompil
lib/rustlib/${TRIPLE_ARCH}/lib/libcore-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/libflate-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/libflate-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/libfmt_macros-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/libgetopts-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/libgetopts-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/libgraphviz-${RUST_HASH}.rlib
@@ -25,12 +62,28 @@ lib/rustlib/${TRIPLE_ARCH}/lib/liblog-${
lib/rustlib/${TRIPLE_ARCH}/lib/librand-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/librbml-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/librbml-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_back-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/librustc_bitflags-${RUST_HASH}.rlib
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_borrowck-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_data_structures-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_driver-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_front-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_lint-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_llvm-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_mir-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_platform_intrinsics-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_privacy-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_resolve-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_trans-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/librustc_typeck-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/librustc_unicode-${RUST_HASH}.rlib
+lib/rustlib/${TRIPLE_ARCH}/lib/librustdoc-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/libserialize-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/libserialize-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/libstd-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/libstd-${RUST_HASH}.so
+lib/rustlib/${TRIPLE_ARCH}/lib/libsyntax-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/libterm-${RUST_HASH}.rlib
lib/rustlib/${TRIPLE_ARCH}/lib/libterm-${RUST_HASH}.so
lib/rustlib/${TRIPLE_ARCH}/lib/libtest-${RUST_HASH}.rlib