compilerplugins/Makefile-clang.mk |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 646981459df7ba075069320bcaba4dd983777f4f
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Mon Oct 9 16:30:10 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Mon Oct 9 23:25:10 2023 +0200

    Add -rpath when building analyzer executable on macOS
    
    ...as at least with LLVM 18 trunk, the generated executable references
    @rpath/libclang-cpp.dylib but didn't actually contain an LC_RPATH
    
    Change-Id: Ida643903aa4566853ea9541553f0dfc9c3243d4b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157706
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index 7d993433c030..16a75e44b403 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -260,7 +260,9 @@ $(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: 
$(SHARED_SOURCE_INFOS) $(CLANGOU
 # and it can also cause trouble with finding the proper headers.
 CLANGTOOLDEFS = $(filter-out -stdlib=%,$(CLANGDEFS) -I$(CLANGSYSINCLUDE))
 CLANGTOOLDEFS += -w
-ifneq ($(filter-out MACOSX WNT,$(OS)),)
+ifneq ($(filter MACOSX,$(OS)),)
+CLANGTOOLLIBS += -Wl,-rpath,$(CLANGLIBDIR)
+else ifneq ($(filter-out WNT,$(OS)),)
 ifneq ($(CLANGDIR),/usr)
 # Help the generator find Clang shared libs, if Clang is built so and 
installed in a non-standard prefix.
 CLANGTOOLLIBS += -Wl,--rpath,$(CLANGLIBDIR)

Reply via email to