mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-02 04:50:21 +00:00
openshadinglanguage: remove libclang as shared lib (#546530)
This commit is contained in:
24
pkgs/by-name/op/openshadinglanguage/libclang-no-shared.patch
Normal file
24
pkgs/by-name/op/openshadinglanguage/libclang-no-shared.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
||||
@@ -31,6 +31,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-edtYKN2obQexQtclrIUflm3upc14MhHQ7eLvit5Hqq0=";
|
||||
};
|
||||
|
||||
patches = [ ./libclang-no-shared.patch ];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "LLVM_STATIC" true)
|
||||
(lib.cmakeBool "USE_QT" false)
|
||||
@@ -38,7 +40,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# Build system implies llvm-config and llvm-as are in the same directory.
|
||||
# Override defaults.
|
||||
(lib.cmakeFeature "LLVM_BC_GENERATOR" "${clang}/bin/clang++")
|
||||
(lib.cmakeFeature "LLVM_CONFIG" "${llvm.dev}/bin/llvm-config")
|
||||
(lib.cmakeFeature "LLVM_DIRECTORY" "${llvm}")
|
||||
];
|
||||
|
||||
@@ -53,7 +54,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
nativeBuildInputs = [
|
||||
bison
|
||||
clang
|
||||
cmake
|
||||
flex
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user