Merge pull request #302749 from wegank/cling-2
cling: cleanup, fix runtime error
This commit is contained in:
commit
6ba9dcd9a8
|
@ -1,6 +1,5 @@
|
||||||
{ cmake
|
{ cmake
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchgit
|
|
||||||
, git
|
, git
|
||||||
, lib
|
, lib
|
||||||
, libffi
|
, libffi
|
||||||
|
@ -28,7 +27,7 @@
|
||||||
|
|
||||||
# Build with libc++ (LLVM) rather than stdlibc++ (GCC).
|
# Build with libc++ (LLVM) rather than stdlibc++ (GCC).
|
||||||
# This is experimental and not all features work.
|
# This is experimental and not all features work.
|
||||||
, useLLVMLibcxx ? false
|
, useLLVMLibcxx ? clangStdenv.isDarwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -53,7 +52,7 @@ let
|
||||||
clingSrc = fetchFromGitHub {
|
clingSrc = fetchFromGitHub {
|
||||||
owner = "root-project";
|
owner = "root-project";
|
||||||
repo = "cling";
|
repo = "cling";
|
||||||
rev = "v1.0";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-Ye8EINzt+dyNvUIRydACXzb/xEPLm0YSkz08Xxw3xp4=";
|
sha256 = "sha256-Ye8EINzt+dyNvUIRydACXzb/xEPLm0YSkz08Xxw3xp4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -66,8 +65,6 @@ let
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./no-clang-cpp.patch
|
./no-clang-cpp.patch
|
||||||
|
|
||||||
# ./force-install-cling-targets.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ python3 git cmake ];
|
nativeBuildInputs = [ python3 git cmake ];
|
||||||
|
@ -122,10 +119,10 @@ let
|
||||||
cxxFlags = if useLLVMLibcxx then [
|
cxxFlags = if useLLVMLibcxx then [
|
||||||
"-I" "${lib.getDev llvmPackages_13.libcxx}/include/c++/v1"
|
"-I" "${lib.getDev llvmPackages_13.libcxx}/include/c++/v1"
|
||||||
"-L" "${llvmPackages_13.libcxx}/lib"
|
"-L" "${llvmPackages_13.libcxx}/lib"
|
||||||
"-l" "${llvmPackages_13.libcxx}/lib/libc++.so"
|
"-l" "${llvmPackages_13.libcxx}/lib/libc++${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||||
] else [
|
] else [
|
||||||
"-I" "${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}"
|
"-I" "${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}"
|
||||||
"-I" "${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}/x86_64-unknown-linux-gnu"
|
"-I" "${gcc-unwrapped}/include/c++/${gcc-unwrapped.version}/${stdenv.hostPlatform.config}"
|
||||||
];
|
];
|
||||||
|
|
||||||
# The flags passed to the wrapped cling should
|
# The flags passed to the wrapped cling should
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
diff --git a/tools/cling/cmake/modules/CMakeLists.txt b/tools/cling/cmake/modules/CMakeLists.txt
|
|
||||||
--- a/tools/cling/cmake/modules/CMakeLists.txt
|
|
||||||
+++ b/tools/cling/cmake/modules/CMakeLists.txt
|
|
||||||
@@ -54,10 +54,8 @@ set(CLING_CONFIG_EXPORTS_FILE)
|
|
||||||
|
|
||||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
|
||||||
get_property(cling_has_exports GLOBAL PROPERTY CLING_HAS_EXPORTS)
|
|
||||||
- if(cling_has_exports)
|
|
||||||
- install(EXPORT ClingTargets DESTINATION ${CLING_INSTALL_PACKAGE_DIR}
|
|
||||||
- COMPONENT cling-cmake-exports)
|
|
||||||
- endif()
|
|
||||||
+ install(EXPORT ClingTargets DESTINATION ${CLING_INSTALL_PACKAGE_DIR}
|
|
||||||
+ COMPONENT cling-cmake-exports)
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/ClingConfig.cmake
|
|
Loading…
Reference in New Issue
Block a user