mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
llvmPackages: move patches to proper folders (#287092)
* llvmPackages: move clang-*-LLVMgold-path.patch to common/clang * llvmPackages: move exegesis-force-bdver2.patch to 9/llvm * llvmPackages: move llvm-config-link-static.patch to common/llvm * llvmPackages: move TLI-musl.patch to common/llvm * llvmPackages: move libcxx-0001-musl-hacks.patch to common/llvm
This commit is contained in:
parent
cbc4211f0a
commit
bd1607202d
@ -50,7 +50,7 @@ let
|
||||
# https://reviews.llvm.org/D51899
|
||||
./gnu-install-dirs.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-11-15-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -30,7 +30,7 @@ stdenv.mkDerivation {
|
||||
})
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
../../common/libcxx/libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
# Prevent errors like "error: 'foo' is unavailable: introduced in macOS yy.zz"
|
||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation {
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -d libcxx -i ${../../libcxx-0001-musl-hacks.patch}
|
||||
patch -p1 -d libcxx -i ${../../common/libcxx/libcxx-0001-musl-hacks.patch}
|
||||
'' + lib.optionalString stdenv.hostPlatform.isWasm ''
|
||||
patch -p1 -d llvm -i ${../../common/libcxxabi/wasm.patch}
|
||||
'';
|
||||
|
@ -86,7 +86,7 @@ in stdenv.mkDerivation (rec {
|
||||
# of the flags used for the normal LLVM build. To avoid the need for building
|
||||
# a native libLLVM.so (which would fail) we force llvm-config to be linked
|
||||
# statically against the necessary LLVM components always.
|
||||
../../llvm-config-link-static.patch
|
||||
../../common/llvm/llvm-config-link-static.patch
|
||||
|
||||
./gnu-install-dirs.patch
|
||||
# On older CPUs (e.g. Hydra/wendy) we'd be getting an error in this test.
|
||||
@ -149,7 +149,7 @@ in stdenv.mkDerivation (rec {
|
||||
--replace "Path.cpp" ""
|
||||
rm unittests/Support/Path.cpp
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -47,7 +47,7 @@ let
|
||||
# https://reviews.llvm.org/D51899
|
||||
./gnu-install-dirs.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-11-15-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -24,7 +24,7 @@ stdenv.mkDerivation {
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
../../common/libcxx/libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation {
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -d libcxx -i ${../../libcxx-0001-musl-hacks.patch}
|
||||
patch -p1 -d libcxx -i ${../../common/libcxx/libcxx-0001-musl-hacks.patch}
|
||||
'' + lib.optionalString stdenv.hostPlatform.isWasm ''
|
||||
patch -p1 -d llvm -i ${../../common/libcxxabi/wasm.patch}
|
||||
'';
|
||||
|
@ -87,7 +87,7 @@ in stdenv.mkDerivation (rec {
|
||||
# of the flags used for the normal LLVM build. To avoid the need for building
|
||||
# a native libLLVM.so (which would fail) we force llvm-config to be linked
|
||||
# statically against the necessary LLVM components always.
|
||||
../../llvm-config-link-static.patch
|
||||
../../common/llvm/llvm-config-link-static.patch
|
||||
# Fix llvm being miscompiled by some gccs. See llvm/llvm-project#49955
|
||||
# Fix llvm being miscompiled by some gccs. See https://github.com/llvm/llvm-project/issues/49955
|
||||
./fix-llvm-issue-49955.patch
|
||||
@ -138,7 +138,7 @@ in stdenv.mkDerivation (rec {
|
||||
# TODO: Fix failing tests:
|
||||
rm test/DebugInfo/X86/vla-multi.ll
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -43,7 +43,7 @@ let
|
||||
./revert-malloc-alignment-assumption.patch
|
||||
../../common/clang/add-nostdlibinc-flag.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-11-15-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
../../common/libcxx/libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
|
@ -81,7 +81,7 @@ in stdenv.mkDerivation (rec {
|
||||
# of the flags used for the normal LLVM build. To avoid the need for building
|
||||
# a native libLLVM.so (which would fail) we force llvm-config to be linked
|
||||
# statically against the necessary LLVM components always.
|
||||
../../llvm-config-link-static.patch
|
||||
../../common/llvm/llvm-config-link-static.patch
|
||||
|
||||
./gnu-install-dirs.patch
|
||||
|
||||
@ -128,7 +128,7 @@ in stdenv.mkDerivation (rec {
|
||||
rm unittests/IR/PassBuilderCallbacksTest.cpp
|
||||
rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -46,7 +46,7 @@ let
|
||||
./gnu-install-dirs.patch
|
||||
../../common/clang/add-nostdlibinc-flag.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-11-15-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
../../common/libcxx/libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
|
@ -110,7 +110,7 @@ in stdenv.mkDerivation (rec {
|
||||
rm unittests/IR/PassBuilderCallbacksTest.cpp
|
||||
rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -52,7 +52,7 @@ let
|
||||
./gnu-install-dirs.patch
|
||||
../../common/clang/add-nostdlibinc-flag.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-11-15-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
|
||||
relative = "libcxx";
|
||||
})
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
../../common/libcxx/libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
@ -230,7 +230,7 @@ in stdenv.mkDerivation (rec {
|
||||
# timing-based tests are trouble
|
||||
rm utils/lit/tests/googletest-timeout.py
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -52,7 +52,7 @@ let
|
||||
./gnu-install-dirs.patch
|
||||
../../common/clang/add-nostdlibinc-flag.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-at-least-16-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -223,7 +223,7 @@ in
|
||||
# timing-based tests are trouble
|
||||
rm utils/lit/tests/googletest-timeout.py
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -53,7 +53,7 @@ let
|
||||
./gnu-install-dirs.patch
|
||||
../../common/clang/add-nostdlibinc-flag.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-at-least-16-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -220,7 +220,7 @@ stdenv.mkDerivation (rec {
|
||||
rm unittests/IR/PassBuilderCallbacksTest.cpp
|
||||
rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -52,7 +52,7 @@ let
|
||||
./HIP-use-PATH-9.patch
|
||||
./gnu-install-dirs.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-6-10-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-6-10-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -22,7 +22,7 @@ stdenv.mkDerivation {
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
../../common/libcxx/libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
# Prevent errors like "error: 'foo' is unavailable: introduced in macOS yy.zz"
|
||||
|
@ -17,7 +17,7 @@ stdenv.mkDerivation {
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -d $(ls -d libcxx-*) -i ${../../libcxx-0001-musl-hacks.patch}
|
||||
patch -p1 -d $(ls -d libcxx-*) -i ${../../common/libcxx/libcxx-0001-musl-hacks.patch}
|
||||
'' + lib.optionalString stdenv.hostPlatform.isWasm ''
|
||||
patch -p1 -d $(ls -d llvm-*) -i ${../../common/libcxxabi/wasm.patch}
|
||||
'';
|
||||
|
@ -86,12 +86,12 @@ in stdenv.mkDerivation (rec {
|
||||
# of the flags used for the normal LLVM build. To avoid the need for building
|
||||
# a native libLLVM.so (which would fail) we force llvm-config to be linked
|
||||
# statically against the necessary LLVM components always.
|
||||
../../llvm-config-link-static.patch
|
||||
../../common/llvm/llvm-config-link-static.patch
|
||||
|
||||
./gnu-install-dirs.patch
|
||||
# Force a test to evaluate the saved benchmark for a CPU for which LLVM has
|
||||
# an execution model. See NixOS/nixpkgs#119673.
|
||||
../../exegesis-force-bdver2.patch
|
||||
./exegesis-force-bdver2.patch
|
||||
|
||||
# Fix missing includes for GCC 11
|
||||
(fetchpatch {
|
||||
@ -137,7 +137,7 @@ in stdenv.mkDerivation (rec {
|
||||
--replace "Path.cpp" ""
|
||||
rm unittests/Support/Path.cpp
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
@ -54,7 +54,7 @@ let
|
||||
./gnu-install-dirs.patch
|
||||
../../common/clang/add-nostdlibinc-flag.patch
|
||||
(substituteAll {
|
||||
src = ../../clang-at-least-16-LLVMgold-path.patch;
|
||||
src = ../../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
||||
libllvmLibdir = "${libllvm.lib}/lib";
|
||||
})
|
||||
];
|
||||
|
@ -224,7 +224,7 @@ stdenv.mkDerivation (rec {
|
||||
rm unittests/IR/PassBuilderCallbacksTest.cpp
|
||||
rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
patch -p1 -i ${../../common/llvm/TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user