From 63f30e14dc2ffca929e0e724468da67ea2210367 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Fri, 9 Dec 2022 10:30:56 +0100 Subject: [PATCH] Build test deps separately to avoid LD_LIBRARY_PATH interference Otherwise invocations of host clang will use the newly built libraries, which will use a non-existent resource directory, and thus cause headers like stddef.h not to be found. See here for the equivalent patch in Fedora: https://src.fedoraproject.org/rpms/clang/c/71aa74debd07c6b2c1db6687133b33e9b12a83d5?branch=rawhide Resolves: rhbz#2118567 --- clang.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang.spec b/clang.spec index b50015d..5caa86a 100644 --- a/clang.spec +++ b/clang.spec @@ -534,6 +534,10 @@ sed -i -e "s/'ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH'/'ASAN_SYMBOLIZER_PAT %if %{without compat_build} %if %{with check} +# Build test dependencies separately, to prevent invocations of host clang from being affected +# by LD_LIBRARY_PATH below. +%cmake_build --target clang-test-depends \ + ExtraToolsUnitTests ClangdUnitTests ClangIncludeCleanerUnitTests ClangPseudoUnitTests %if %{with bundle_compat_lib} # Move the compat -cpp.so out of the way so it's not picked up