fixup! llvmPackages_13.libcxx: fix darwin build
This commit is contained in:
parent
d8338cbe06
commit
7994b1dfc0
3 changed files with 9 additions and 11 deletions
|
@ -254,7 +254,7 @@ let
|
|||
cxx-headers = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
stdenv = stdenv_;
|
||||
isCxxHeaders = true;
|
||||
headersOnly = true;
|
||||
};
|
||||
in callPackage ./libcxxabi {
|
||||
stdenv = stdenv_;
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
, libcxxabi
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
|
||||
# If isCxxHeaders is true, the resulting package would only include the headers.
|
||||
# If headersOnly is true, the resulting package would only include the headers.
|
||||
# Use this to break the circular dependency between libcxx and libcxxabi.
|
||||
#
|
||||
# Some context:
|
||||
# https://reviews.llvm.org/rG1687f2bbe2e2aaa092f942d4a97d41fad43eedfb
|
||||
, isCxxHeaders ? false
|
||||
, headersOnly ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = if isCxxHeaders then "cxx-headers" else "libcxx";
|
||||
pname = if headersOnly then "cxx-headers" else "libcxx";
|
||||
inherit version;
|
||||
|
||||
inherit src;
|
||||
sourceRoot = "source/libcxx";
|
||||
|
||||
outputs = [ "out" ] ++ lib.optional (!isCxxHeaders) "dev";
|
||||
outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
|
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ cmake python3 ]
|
||||
++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
||||
|
||||
buildInputs = lib.optionals (!isCxxHeaders) [ libcxxabi ];
|
||||
buildInputs = lib.optionals (!headersOnly) [ libcxxabi ];
|
||||
|
||||
cmakeFlags = [ "-DLIBCXX_CXX_ABI=libcxxabi" ]
|
||||
++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
|
||||
|
@ -43,12 +43,12 @@ stdenv.mkDerivation rec {
|
|||
"-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
|
||||
] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
|
||||
|
||||
buildFlags = lib.optional isCxxHeaders "generate-cxx-headers";
|
||||
installTargets = lib.optional isCxxHeaders "install-cxx-headers";
|
||||
buildFlags = lib.optional headersOnly "generate-cxx-headers";
|
||||
installTargets = lib.optional headersOnly "install-cxx-headers";
|
||||
|
||||
# At this point, cxxabi headers would be installed in the dev output, which
|
||||
# prevents moveToOutput from doing its job later in the build process.
|
||||
postInstall = lib.optionalString (!isCxxHeaders) ''
|
||||
postInstall = lib.optionalString (!headersOnly) ''
|
||||
mv "$dev/include/c++/v1/"* "$out/include/c++/v1/"
|
||||
pushd "$dev"
|
||||
rmdir -p include/c++/v1
|
||||
|
|
|
@ -12578,8 +12578,6 @@ with pkgs;
|
|||
targetLlvmLibraries = targetPackages.llvmPackages_13.libraries;
|
||||
} // lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) {
|
||||
stdenv = gcc7Stdenv;
|
||||
} // lib.optionalAttrs stdenv.hostPlatform.isDarwin {
|
||||
stdenv = llvmPackages_11.stdenv;
|
||||
}));
|
||||
|
||||
llvmPackages_latest = llvmPackages_13;
|
||||
|
|
Loading…
Reference in a new issue