llvmPackages_12: Fix libunwind, openmp, libcxx, and libcxxabi
All builds succeed now: nix-build -A llvmPackages_12
This commit is contained in:
parent
619913c789
commit
cc12a82cf2
@ -15,14 +15,7 @@ stdenv.mkDerivation {
|
|||||||
mv llvm-* llvm
|
mv llvm-* llvm
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = [
|
patches = lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
||||||
(fetchpatch {
|
|
||||||
# Backported from LLVM 12, avoids clashes with commonly used "block.h" header.
|
|
||||||
url = "https://github.com/llvm/llvm-project/commit/19bc9ea480b60b607a3e303f20c7a3a2ea553369.patch";
|
|
||||||
sha256 = "sha256-aWa66ogmPkG0xHzSfcpD0qZyZQcNKwLV44js4eiun78=";
|
|
||||||
stripLen = 1;
|
|
||||||
})
|
|
||||||
] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
|
||||||
|
|
||||||
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||||
patchShebangs utils/cat_files.py
|
patchShebangs utils/cat_files.py
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
|
{ lib, stdenv, cmake, python3, fetch, libcxx, libunwind, llvm, version
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ stdenv.mkDerivation {
|
|||||||
|
|
||||||
src = fetch "libcxxabi" "1vdc6zld5rlbrbpxf0fxs0m6k1cabpi82ksiwgj1pmhx8l140n0q";
|
src = fetch "libcxxabi" "1vdc6zld5rlbrbpxf0fxs0m6k1cabpi82ksiwgj1pmhx8l140n0q";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake python3 ];
|
||||||
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
||||||
|
|
||||||
cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||||
@ -21,8 +21,6 @@ stdenv.mkDerivation {
|
|||||||
"-DLIBCXXABI_ENABLE_SHARED=OFF"
|
"-DLIBCXXABI_ENABLE_SHARED=OFF"
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [ ./libcxxabi-no-threads.patch ];
|
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
unpackFile ${libcxx.src}
|
unpackFile ${libcxx.src}
|
||||||
mv libcxx-* libcxx
|
mv libcxx-* libcxx
|
||||||
|
@ -1,12 +0,0 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
||||||
index 4138acf..41b4763 100644
|
|
||||||
--- a/CMakeLists.txt
|
|
||||||
+++ b/CMakeLists.txt
|
|
||||||
@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS)
|
|
||||||
" is also set to ON.")
|
|
||||||
endif()
|
|
||||||
add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
|
|
||||||
+ add_definitions(-D_LIBCPP_HAS_NO_THREADS)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
|
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, stdenv, version, fetch, cmake, fetchpatch
|
{ lib, stdenv, version, fetch, libcxx, llvm, cmake
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -8,6 +8,13 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetch pname "18n3k2kf6pyvzspnz1i22czbgi14kmch76fxml8kvhky7mw7v1yz";
|
src = fetch pname "18n3k2kf6pyvzspnz1i22czbgi14kmch76fxml8kvhky7mw7v1yz";
|
||||||
|
|
||||||
|
postUnpack = ''
|
||||||
|
unpackFile ${libcxx.src}
|
||||||
|
mv libcxx-* libcxx
|
||||||
|
unpackFile ${llvm.src}
|
||||||
|
mv llvm-* llvm
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
|
cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetch
|
, fetch
|
||||||
, fetchpatch
|
|
||||||
, cmake
|
, cmake
|
||||||
, llvm
|
, llvm
|
||||||
, perl
|
, perl
|
||||||
@ -14,15 +13,6 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
src = fetch pname "0kw1g7ndvwi0g7lx5d55mp81h9vffxz820l9r2wjdvvfs3dsyq05";
|
src = fetch pname "0kw1g7ndvwi0g7lx5d55mp81h9vffxz820l9r2wjdvvfs3dsyq05";
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Fix compilation on aarch64-darwin, remove after the next release.
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
|
|
||||||
sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
|
|
||||||
stripLen = 1;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake perl ];
|
nativeBuildInputs = [ cmake perl ];
|
||||||
buildInputs = [ llvm ];
|
buildInputs = [ llvm ];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user