diff --git a/clang.spec b/clang.spec index 03b0995..0b0b0ab 100644 --- a/clang.spec +++ b/clang.spec @@ -3,7 +3,7 @@ %global toolchain clang %bcond_with compat_build -%bcond_with bundle_compat_lib +%bcond_without bundle_compat_lib %bcond_without check %global maj_ver 15 @@ -526,6 +526,12 @@ sed -i -e "s/'ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH'/'ASAN_SYMBOLIZER_PAT %if %{without compat_build} %if %{with check} + +# Move the compat -cpp.so out of the way so it's not picked up +# by the LD_LIBRARY_PATH below. +compat_lib=$(find %{buildroot}%{_libdir} -name libclang-cpp.so.%{compat_maj_ver}) +mv "$compat_lib" . + # requires lit.py from LLVM utilities # FIXME: Fix failing ARM tests SOURCE_DATA_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \ @@ -534,6 +540,9 @@ SOURCE_DATA_EPOCH=1629181597 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} %else false %endif + +mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" + %endif %endif