Commit 8db6e714 authored by Randy Eckenrode's avatar Randy Eckenrode Committed by Emily
Browse files

libtorch-bin: drop libc++ replacement

Darwin now uses the system libc++ by default, so drop the replacement.
The nixpkgs libc++ is not ABI-compatible with the system libc++, so this
replacement was not guaranteed to work anyway.

See: https://discourse.llvm.org/t/apples-libc-now-provides-std-type-descriptor-t-functionality-not-found-in-upstream-libc/73881/3
parent 22455076
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ let
  device = if cudaSupport then "cuda" else "cpu";
  srcs = import ./binary-hashes.nix version;
  unavailable = throw "libtorch is not available for this platform";
  libcxx-for-libtorch = if stdenv.hostPlatform.isDarwin then libcxx else (lib.getLib stdenv.cc.cc);
in
stdenv.mkDerivation {
  inherit version;
@@ -87,9 +86,6 @@ stdenv.mkDerivation {
        for rpath in $(otool -L $f | grep rpath | awk '{print $1}');do
          install_name_tool -change $rpath $out/lib/$(basename $rpath) $f
        done
        if otool -L $f | grep /usr/lib/libc++ >& /dev/null; then
          install_name_tool -change /usr/lib/libc++.1.dylib ${libcxx-for-libtorch.outPath}/lib/libc++.1.0.dylib $f
        fi
      done
      for f in $out/lib/*.dylib; do
          otool -L $f