--- a/llvm/cmake/modules/AddLLVM.cmake	2026-04-21 10:46:41
+++ b/llvm/cmake/modules/AddLLVM.cmake	2026-04-26 14:35:57
@@ -2543,7 +2543,7 @@
 endfunction()
 
 function(llvm_setup_rpath name)
-  if(CMAKE_INSTALL_RPATH)
+  if(CMAKE_INSTALL_RPATH OR CMAKE_INSTALL_NAME_DIR)
     return()
   endif()
 
