libtapi: init
(cherry picked from commit 69347697d3336d4b6add8276d9f75daf6f0cacf3)
This commit is contained in:
parent
0fe315c9b6
commit
f76c7b8fab
@ -2,6 +2,7 @@
|
||||
, libcxxabi, libuuid, llvm
|
||||
, libobjc ? null, maloader ? null
|
||||
, enableDumpNormalizedLibArgs ? false
|
||||
, enableTapiSupport ? stdenv.hostPlatform != stdenv.targetPlatform, libtapi
|
||||
}:
|
||||
|
||||
let
|
||||
@ -52,7 +53,8 @@ let
|
||||
|
||||
nativeBuildInputs = [ autoconf automake libtool_2 autoreconfHook ];
|
||||
buildInputs = [ libuuid ]
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ];
|
||||
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
|
||||
++ stdenv.lib.optional enableTapiSupport libtapi;
|
||||
|
||||
patches = [
|
||||
./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch
|
||||
@ -74,7 +76,11 @@ let
|
||||
# TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
|
||||
configurePlatforms = [ "build" "host" ]
|
||||
++ stdenv.lib.optional (stdenv.targetPlatform != stdenv.hostPlatform) "target";
|
||||
configureFlags = [ "--disable-clang-as" ];
|
||||
configureFlags = [ "--disable-clang-as" ]
|
||||
++ stdenv.lib.optionals enableTapiSupport [
|
||||
"--enable-tapi-support"
|
||||
"--with-libtapi=${libtapi}"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp
|
||||
|
29
pkgs/os-specific/darwin/libtapi/default.nix
Normal file
29
pkgs/os-specific/darwin/libtapi/default.nix
Normal file
@ -0,0 +1,29 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, python }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "libtapi";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tpoechtrager";
|
||||
repo = "apple-libtapi";
|
||||
rev = "e56673694db395e25b31808b4fbb9a7005e6875f";
|
||||
sha256 = "1lnl1af9sszp9wxfk0wljrpdmwcx83j0w5c0y4qw4pqrdkdgwks7";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake python ];
|
||||
|
||||
preConfigure = ''
|
||||
cd src/apple-llvm/src
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=OFF" ];
|
||||
|
||||
buildFlags = "libtapi";
|
||||
|
||||
installTarget = "install-libtapi";
|
||||
|
||||
meta = with lib; {
|
||||
license = licenses.apsl20;
|
||||
maintainers = with maintainers; [ matthewbauer ];
|
||||
};
|
||||
|
||||
}
|
@ -27,7 +27,7 @@ in
|
||||
};
|
||||
|
||||
cctools = callPackage ../os-specific/darwin/cctools/port.nix {
|
||||
inherit (darwin) libobjc maloader;
|
||||
inherit (darwin) libobjc maloader libtapi;
|
||||
stdenv = if stdenv.isDarwin then stdenv else pkgs.libcxxStdenv;
|
||||
libcxxabi = pkgs.libcxxabi;
|
||||
};
|
||||
@ -79,4 +79,6 @@ in
|
||||
|
||||
darling = callPackage ../os-specific/darwin/darling/default.nix { };
|
||||
|
||||
libtapi = callPackage ../os-specific/darwin/libtapi {};
|
||||
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user