about summary refs log tree commit diff
path: root/pkgs/stdenv/darwin
diff options
context:
space:
mode:
authorRandy Eckenrode <randy@largeandhighquality.com>2023-05-18 08:16:24 -0400
committerRandy Eckenrode <randy@largeandhighquality.com>2023-06-06 19:05:22 -0400
commitdf7487ff174ede2ab4544694f5fbc5309b9e7e77 (patch)
treebab9464688246c363c5243b31651fe3b09595f38 /pkgs/stdenv/darwin
parent04bf42cee46989951631242650d5b9b6f11563f1 (diff)
downloadnixlib-df7487ff174ede2ab4544694f5fbc5309b9e7e77.tar
nixlib-df7487ff174ede2ab4544694f5fbc5309b9e7e77.tar.gz
nixlib-df7487ff174ede2ab4544694f5fbc5309b9e7e77.tar.bz2
nixlib-df7487ff174ede2ab4544694f5fbc5309b9e7e77.tar.lz
nixlib-df7487ff174ede2ab4544694f5fbc5309b9e7e77.tar.xz
nixlib-df7487ff174ede2ab4544694f5fbc5309b9e7e77.tar.zst
nixlib-df7487ff174ede2ab4544694f5fbc5309b9e7e77.zip
cctools-llvm: init at 11.1.0-973.0.1
cctools-llvm is a replacement for cctools that replaces as much of cctools with equivalents from LLVM that it can reasonably do. This was motivated by wanting to reduce dependencies on cctools, which are updated infrequently by upstream.

To provide a motivating example, the version of `strip` included in cctools cannot properly strip the archives in compiler-rt in LLVM 15. Paths are left to bootstrap tools, resulting in failed requisites checks in the final stdenv build. Since `strip` needs replaced, the opportunity was taken to replace other provided they are functional replacements.

Note: This has to be done in cctools (or some equivalent) because some derivations (noteably LLVM) use the bintools of the stdenv directly instead of going through the wrapper.

The following tools from LLVM are not used in this derivation:

* LLD - not fully compatible with ld64 yet and potentially too big of a change;
* libtool - not a drop-in replacement yet because it does not support linker passthrough, which is needed by xcbuild;
* lipo - crashes when running the LLVM test suite;
* install_name_tool - fails when trying to build swift-corefoundation; and.
* randlib - not completely a drop-in replacement, so leaving it out for now.

If other incompatabilities are found, the tools can be reverted or made conditional. For example, cctools `strip` is preferred on older versions of LLVM (which lack the compiler-rt issue) or when cctools itself is a new enough version because `llvm-strip` on LLVM 11 produces files that older verions of `codesign_allocate` cannot process correctly.

One final caveat/note: Some tools are not duplicated or linked from cctools-port. The names of the tools and which ones were linked was determined based on what is provided upstream in Xcode and is installed on macOS system.
Diffstat (limited to 'pkgs/stdenv/darwin')
-rw-r--r--pkgs/stdenv/darwin/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix
index 780717db56b8..a83f727cfe17 100644
--- a/pkgs/stdenv/darwin/default.nix
+++ b/pkgs/stdenv/darwin/default.nix
@@ -651,7 +651,7 @@ rec {
         darwin = super.darwin.overrideScope (_: _: {
           inherit (darwin) dyld ICU Libsystem Csu libiconv rewrite-tbd;
         } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
-          inherit (darwin) binutils binutils-unwrapped cctools;
+          inherit (darwin) binutils binutils-unwrapped cctools-port;
         });
       } // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) {
         inherit llvm;