llvmPackages_15: apply some patches from llvmPackages_14
See #194634 for details. PRs: - #191372 - #190936 - #82131 - #199844 - #197674 - #184408 - #193004
This commit is contained in:
parent
201ef33028
commit
81ef82a029
@ -84,6 +84,7 @@ let
|
|||||||
fi
|
fi
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
mv $out/share/clang/*.py $python/share/clang
|
||||||
rm $out/bin/c-index-test
|
rm $out/bin/c-index-test
|
||||||
|
patchShebangs $python/bin
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
mkdir -p $dev/bin
|
||||||
cp bin/clang-tblgen $dev/bin
|
cp bin/clang-tblgen $dev/bin
|
||||||
@ -108,6 +109,7 @@ let
|
|||||||
of tools that can be built using the Clang frontend as a library to
|
of tools that can be built using the Clang frontend as a library to
|
||||||
parse C/C++ code.
|
parse C/C++ code.
|
||||||
'';
|
'';
|
||||||
|
mainProgram = "clang";
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages {
|
||||||
pname = "clang-manpages";
|
pname = "clang-manpages";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ lib, stdenv, llvm_meta, version
|
{ lib, stdenv, llvm_meta, version
|
||||||
, monorepoSrc, runCommand
|
, monorepoSrc, runCommand
|
||||||
, cmake, python3, libllvm, libcxxabi, libxcrypt
|
, cmake, python3, libllvm, libcxxabi, libxcrypt
|
||||||
|
, doFakeLibgcc ? stdenv.hostPlatform.isFreeBSD
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -46,6 +47,8 @@ stdenv.mkDerivation {
|
|||||||
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||||
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
|
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
|
||||||
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
|
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
|
||||||
|
] ++ lib.optionals (useLLVM || bareMetal) [
|
||||||
|
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
|
||||||
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
|
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
|
||||||
"-DCMAKE_C_COMPILER_WORKS=ON"
|
"-DCMAKE_C_COMPILER_WORKS=ON"
|
||||||
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
"-DCMAKE_CXX_COMPILER_WORKS=ON"
|
||||||
@ -107,6 +110,8 @@ stdenv.mkDerivation {
|
|||||||
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
|
ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
|
||||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
|
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
|
||||||
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
|
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
|
||||||
|
'' + lib.optionalString doFakeLibgcc ''
|
||||||
|
ln -s $out/lib/freebsd/libclang_rt.builtins-*.a $out/lib/libgcc.a
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = llvm_meta // {
|
meta = llvm_meta // {
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
|
, targetLlvm
|
||||||
# This is the default binutils, but with *this* version of LLD rather
|
# This is the default binutils, but with *this* version of LLD rather
|
||||||
# than the default LLVM verion's, if LLD is the choice. We use these for
|
# than the default LLVM verion's, if LLD is the choice. We use these for
|
||||||
# the `useLLVM` bootstrapping below.
|
# the `useLLVM` bootstrapping below.
|
||||||
@ -166,7 +167,7 @@ let
|
|||||||
]
|
]
|
||||||
++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
|
++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
|
||||||
++ lib.optional
|
++ lib.optional
|
||||||
(!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
|
(!stdenv.targetPlatform.isWasm && !stdenv.targetPlatform.isFreeBSD && stdenv.targetPlatform.useLLVM or false)
|
||||||
"-lunwind"
|
"-lunwind"
|
||||||
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
|
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
|
||||||
};
|
};
|
||||||
@ -273,7 +274,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
openmp = callPackage ./openmp {
|
openmp = callPackage ./openmp {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta targetLlvm;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ];
|
nativeBuildInputs = [ cmake python3 ];
|
||||||
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.hostPlatform.isWasm) libunwind;
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DLLVM_ENABLE_RUNTIMES=libcxxabi"
|
"-DLLVM_ENABLE_RUNTIMES=libcxxabi"
|
||||||
|
@ -35,6 +35,7 @@ stdenv.mkDerivation rec {
|
|||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
||||||
];
|
];
|
||||||
|
LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-Wl,-z,stack-size=2097152";
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" ];
|
outputs = [ "out" "lib" "dev" ];
|
||||||
|
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
, debugVersion ? false
|
, debugVersion ? false
|
||||||
, enableManpages ? false
|
, enableManpages ? false
|
||||||
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
|
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
|
||||||
, enablePFM ? !(stdenv.isDarwin
|
, enablePFM ? stdenv.isLinux /* PFM only supports Linux */
|
||||||
|| stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
|
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
|
||||||
|| stdenv.isAarch32 # broken for the armv7l builder
|
# broken for the armv7l builder
|
||||||
)
|
&& !stdenv.hostPlatform.isAarch
|
||||||
, enablePolly ? false
|
, enablePolly ? false
|
||||||
} @args:
|
} @args:
|
||||||
|
|
||||||
@ -141,6 +141,7 @@ in stdenv.mkDerivation (rec {
|
|||||||
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
|
# Disables building of shared libs, -fPIC is still injected by cc-wrapper
|
||||||
"-DLLVM_ENABLE_PIC=OFF"
|
"-DLLVM_ENABLE_PIC=OFF"
|
||||||
"-DLLVM_BUILD_STATIC=ON"
|
"-DLLVM_BUILD_STATIC=ON"
|
||||||
|
"-DLLVM_LINK_LLVM_DYLIB=off"
|
||||||
# libxml2 needs to be disabled because the LLVM build system ignores its .la
|
# libxml2 needs to be disabled because the LLVM build system ignores its .la
|
||||||
# file and doesn't link zlib as well.
|
# file and doesn't link zlib as well.
|
||||||
# https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
|
# https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
, runCommand
|
, runCommand
|
||||||
, cmake
|
, cmake
|
||||||
, llvm
|
, llvm
|
||||||
|
, targetLlvm
|
||||||
, lit
|
, lit
|
||||||
, clang-unwrapped
|
, clang-unwrapped
|
||||||
, perl
|
, perl
|
||||||
@ -33,7 +34,9 @@ stdenv.mkDerivation rec {
|
|||||||
outputs = [ "out" "dev" ];
|
outputs = [ "out" "dev" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake perl pkg-config lit ];
|
nativeBuildInputs = [ cmake perl pkg-config lit ];
|
||||||
buildInputs = [ llvm ];
|
buildInputs = [
|
||||||
|
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
|
||||||
|
];
|
||||||
|
|
||||||
# Unsup:Pass:XFail:Fail
|
# Unsup:Pass:XFail:Fail
|
||||||
# 26:267:16:8
|
# 26:267:16:8
|
||||||
|
@ -15140,8 +15140,7 @@ with pkgs;
|
|||||||
inherit (stdenvAdapters) overrideCC;
|
inherit (stdenvAdapters) overrideCC;
|
||||||
buildLlvmTools = buildPackages.llvmPackages_15.tools;
|
buildLlvmTools = buildPackages.llvmPackages_15.tools;
|
||||||
targetLlvmLibraries = targetPackages.llvmPackages_15.libraries or llvmPackages_15.libraries;
|
targetLlvmLibraries = targetPackages.llvmPackages_15.libraries or llvmPackages_15.libraries;
|
||||||
} // lib.optionalAttrs (stdenv.hostPlatform.isi686 && stdenv.hostPlatform == stdenv.buildPlatform && buildPackages.stdenv.cc.isGNU) {
|
targetLlvm = targetPackages.llvmPackages_15.llvm or llvmPackages_15.llvm;
|
||||||
stdenv = gcc7Stdenv;
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
llvmPackages_latest = llvmPackages_14;
|
llvmPackages_latest = llvmPackages_14;
|
||||||
|
Loading…
Reference in New Issue
Block a user