summary refs log tree commit diff
path: root/pkgs/os-specific/darwin/cctools
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-23 09:40:37 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-23 09:40:37 -0400
commit18742471aff29270453a540f84d543137ee9d44e (patch)
treed21863fd81db3722e8cac52b52be3dd1c429cf21 /pkgs/os-specific/darwin/cctools
parent2e831da76da0a51557975a55dc8a18ebf3401bfb (diff)
parentbbcaf78350d87c4657b1a2451132535467a454eb (diff)
downloadnixpkgs-18742471aff29270453a540f84d543137ee9d44e.tar
nixpkgs-18742471aff29270453a540f84d543137ee9d44e.tar.gz
nixpkgs-18742471aff29270453a540f84d543137ee9d44e.tar.bz2
nixpkgs-18742471aff29270453a540f84d543137ee9d44e.tar.lz
nixpkgs-18742471aff29270453a540f84d543137ee9d44e.tar.xz
nixpkgs-18742471aff29270453a540f84d543137ee9d44e.tar.zst
nixpkgs-18742471aff29270453a540f84d543137ee9d44e.zip
Merge remote-tracking branch 'upstream/master' into staging
Use newer vagrant from master
Diffstat (limited to 'pkgs/os-specific/darwin/cctools')
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix34
1 files changed, 9 insertions, 25 deletions
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index 24f21b498aa..0c908197acb 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -1,6 +1,6 @@
 { stdenv, fetchFromGitHub, makeWrapper, autoconf, automake, libtool_2, autoreconfHook
-, llvm, libcxx, libcxxabi, clang, libuuid
-, libobjc ? null, maloader ? null, xctoolchain ? null
+, libcxx, libcxxabi, libuuid
+, libobjc ? null, maloader ? null
 , hostPlatform, targetPlatform
 , enableDumpNormalizedLibArgs ? false
 }:
@@ -22,7 +22,7 @@ let
 in
 
 # Non-Darwin alternatives
-assert (!hostPlatform.isDarwin) -> (maloader != null && xctoolchain != null);
+assert (!hostPlatform.isDarwin) -> maloader != null;
 
 assert enableDumpNormalizedLibArgs -> (!useOld);
 
@@ -57,8 +57,6 @@ let
       autoreconfHook
     ];
     buildInputs = [ libuuid ] ++
-      # Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang)
-      stdenv.lib.optionals (!stdenv.isDarwin) [ llvm clang ] ++
       stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ];
 
     patches = [
@@ -80,9 +78,6 @@ let
 
     # TODO(@Ericson2314): Always pass "--target" and always targetPrefix.
     configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
-    configureFlags = stdenv.lib.optionals (!stdenv.isDarwin) [
-      "CXXFLAGS=-I${libcxx}/include/c++/v1"
-    ];
 
     postPatch = ''
       sed -i -e 's/addStandardLibraryDirectories = true/addStandardLibraryDirectories = false/' cctools/ld64/src/ld/Options.cpp
@@ -110,8 +105,6 @@ let
       EOF
 
       cd cctools
-    '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
-      sed -i -e 's|clang++|& -I${libcxx}/include/c++/v1|' autogen.sh
     '';
 
     # TODO: this builds an ld without support for LLVM's LTO. We need to teach it, but that's rather
@@ -126,21 +119,12 @@ let
       popd
     '';
 
-    postInstall =
-      if hostPlatform.isDarwin
-      then ''
-        cat >$out/bin/dsymutil << EOF
-        #!${stdenv.shell}
-        EOF
-        chmod +x $out/bin/dsymutil
-      ''
-      else ''
-        for tool in dyldinfo dwarfdump dsymutil; do
-          ${makeWrapper}/bin/makeWrapper "${maloader}/bin/ld-mac" "$out/bin/${targetPlatform.config}-$tool" \
-            --add-flags "${xctoolchain}/bin/$tool"
-          ln -s "$out/bin/${targetPlatform.config}-$tool" "$out/bin/$tool"
-        done
-      '';
+    postInstall = ''
+      cat >$out/bin/dsymutil << EOF
+      #!${stdenv.shell}
+      EOF
+      chmod +x $out/bin/dsymutil
+    '';
 
     passthru = {
       inherit targetPrefix;