Files
nixpkgs/pkgs/by-name/op/openshadinglanguage/libclang-no-shared.patch
Andrew Marshall fc6c01f1e4 openshadinglanguage: remove libclang as shared lib
This seems unnecessary since build succeeds, and OSL render in Blender
also succeeds.

It is necessary since adding libclang-cpp.so pulls in libLLVM, which we
are trying to avoid with LLVM_STATIC since it causes libLLVM conflicts
downstream in e.g. `pkgsRocm.blender`.

See https://github.com/NixOS/nixpkgs/issues/530702.
2026-07-27 22:55:06 -04:00

25 lines
926 B
Diff

diff --git a/src/cmake/modules/FindLLVM.cmake b/src/cmake/modules/FindLLVM.cmake
index 56809dc3..b1a1ec1e 100644
--- a/src/cmake/modules/FindLLVM.cmake
+++ b/src/cmake/modules/FindLLVM.cmake
@@ -103,19 +103,6 @@ if (NOT LLVM_LIBRARY)
set (LLVM_LIBRARY "${LLVM_LIBRARIES}")
endif ()
-execute_process (COMMAND ${LLVM_CONFIG} --shared-mode
- OUTPUT_VARIABLE LLVM_SHARED_MODE
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-if (LLVM_SHARED_MODE STREQUAL "shared")
- find_library ( _CLANG_CPP_LIBRARY
- NAMES "clang-cpp"
- PATHS ${LLVM_LIB_DIR}
- NO_DEFAULT_PATH)
- if (_CLANG_CPP_LIBRARY)
- list (APPEND CLANG_LIBRARIES ${_CLANG_CPP_LIBRARY})
- endif ()
-endif ()
-
foreach (COMPONENT clangFrontend clangDriver clangSerialization
clangParse clangSema clangAnalysis clangAST
clangASTMatchers clangEdit clangLex