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