llvmPackages: Organize files
Always do pkg/default.nix not pkg.nix; use directories to avoid prefixing patches and other files.
This commit is contained in:
+4
-3
@@ -51,10 +51,11 @@ stdenv.mkDerivation {
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
../7/compiler-rt-glibc.patch
|
||||
./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
# https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce
|
||||
../../common/compiler-rt/glibc.patch
|
||||
] ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
|
||||
++ lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
|
||||
++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
|
||||
|
||||
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
|
||||
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
|
||||
@@ -28,7 +28,7 @@ let
|
||||
'';
|
||||
in {
|
||||
|
||||
llvm = callPackage ./llvm.nix { };
|
||||
llvm = callPackage ./llvm { };
|
||||
|
||||
clang-unwrapped = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
@@ -68,16 +68,16 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld.nix {};
|
||||
lld = callPackage ./lld {};
|
||||
|
||||
lldb = callPackage ./lldb.nix {};
|
||||
lldb = callPackage ./lldb {};
|
||||
});
|
||||
|
||||
libraries = lib.makeExtensible (libraries: let
|
||||
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
||||
in {
|
||||
|
||||
compiler-rt = callPackage ./compiler-rt.nix {};
|
||||
compiler-rt = callPackage ./compiler-rt {};
|
||||
|
||||
stdenv = overrideCC stdenv buildLlvmTools.clang;
|
||||
|
||||
@@ -85,7 +85,7 @@ let
|
||||
|
||||
libcxx = callPackage ./libc++ {};
|
||||
|
||||
libcxxabi = callPackage ./libc++abi.nix {};
|
||||
libcxxabi = callPackage ./libc++abi {};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
});
|
||||
|
||||
+3
-3
@@ -67,15 +67,15 @@ stdenv.mkDerivation ({
|
||||
''
|
||||
# Patch llvm-config to return correct library path based on --link-{shared,static}.
|
||||
+ optionalString (enableSharedLibraries) ''
|
||||
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
|
||||
patch -p1 < ./llvm-outputs.patch
|
||||
substitute '${./outputs.patch}' ./outputs.patch --subst-var lib
|
||||
patch -p1 < ./outputs.patch
|
||||
'' + ''
|
||||
# FileSystem permissions tests fail with various special bits
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "Path.cpp" ""
|
||||
rm unittests/Support/Path.cpp
|
||||
'' + optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -i ${../TLI-musl.patch}
|
||||
patch -p1 -i ${../../TLI-musl.patch}
|
||||
substituteInPlace unittests/Support/CMakeLists.txt \
|
||||
--replace "add_subdirectory(DynamicLibrary)" ""
|
||||
rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
|
||||
Reference in New Issue
Block a user