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:
+3
-3
@@ -50,10 +50,10 @@ stdenv.mkDerivation rec {
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
./compiler-rt-X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
|
||||
./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
|
||||
./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
|
||||
]# ++ 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
|
||||
@@ -31,7 +31,7 @@ let
|
||||
'';
|
||||
in {
|
||||
|
||||
llvm = callPackage ./llvm.nix { };
|
||||
llvm = callPackage ./llvm { };
|
||||
|
||||
clang-unwrapped = callPackage ./clang {
|
||||
inherit (tools) lld;
|
||||
@@ -79,9 +79,9 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld.nix {};
|
||||
lld = callPackage ./lld {};
|
||||
|
||||
lldb = callPackage ./lldb.nix {};
|
||||
lldb = callPackage ./lldb {};
|
||||
|
||||
# Below, is the LLVM bootstrapping logic. It handles building a
|
||||
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
||||
@@ -165,7 +165,7 @@ 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 ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
|
||||
}));
|
||||
@@ -179,7 +179,7 @@ let
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
|
||||
libcxxabi = callPackage ./libc++abi.nix ({} //
|
||||
libcxxabi = callPackage ./libc++abi ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
libunwind = libraries.libunwind;
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ stdenv.mkDerivation {
|
||||
"-DLIBCXXABI_ENABLE_SHARED=OFF"
|
||||
];
|
||||
|
||||
patches = [ ./libcxxabi-no-threads.patch ];
|
||||
patches = [ ./no-threads.patch ];
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxx.src}
|
||||
@@ -33,7 +33,7 @@ stdenv.mkDerivation {
|
||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
patch -p1 -d libcxx -i ${../libcxx-0001-musl-hacks.patch}
|
||||
'' + lib.optionalString stdenv.hostPlatform.isWasm ''
|
||||
patch -p1 -d llvm -i ${./libcxxabi-wasm.patch}
|
||||
patch -p1 -d llvm -i ${./wasm.patch}
|
||||
'';
|
||||
|
||||
installPhase = if stdenv.isDarwin
|
||||
+1
-1
@@ -22,7 +22,7 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
src = fetch pname "1vlyg015dyng43xqb8cg2l6r9ix8klibxsajazbfnckdnh54hwxj";
|
||||
|
||||
patches = [ ./lldb-procfs.patch ];
|
||||
patches = [ ./procfs.patch ];
|
||||
|
||||
nativeBuildInputs = [ cmake python3 which swig lit ]
|
||||
++ lib.optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
|
||||
+2
-2
@@ -62,8 +62,8 @@ in stdenv.mkDerivation (rec {
|
||||
''
|
||||
# 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 \
|
||||
Reference in New Issue
Block a user