From 7a193130109736e67fb3aaef1ac2c7ccd851025e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 31 Jan 2020 13:50:52 -0800 Subject: [PATCH] Reintroduce the workaround for LLVM library path This reverts commit 93ecbc5a139208a2eeff691980d8e513b6b1b406, reintroducing the workaround for rust#40717, now rust#68714. --- rust.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rust.spec b/rust.spec index 91f99c1..7dfe393 100644 --- a/rust.spec +++ b/rust.spec @@ -235,6 +235,10 @@ Requires: /usr/bin/cc %if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1} %global llvm_has_filecheck 1 %endif +%if "%{llvm_root}" != "%{_prefix}" +# https://github.com/rust-lang/rust/issues/68714 +%global library_path $(%{llvm_root}/bin/llvm-config --libdir) +%endif %endif %description @@ -493,6 +497,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %endif %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # We're going to override --libdir when configuring to get rustlib into a @@ -543,6 +548,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %install %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} DESTDIR=%{buildroot} %{python} ./x.py install @@ -613,6 +619,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %check %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # The results are not stable on koji, so mask errors and just log it.