Commit Graph

60 Commits

Author SHA1 Message Date
Daiderd Jordan
40ffedfb38
darwin: expose bootstrapLlvmVersion as argument in the stdenv
This enables the bootstrap stdenv test to specify the actual llvm
of the newly generated build instread of assuming it's the same version
as the current stdenv.
2021-06-13 17:32:06 +02:00
toonn
c7b433acf9
bootstrap-tools: libclang-cpp already included
Changes to llvmPackages have caused the `libclang-cpp*.dylib` files to
be included in the `clang-unwrapped.lib` output. So we no longer need to
copy them from libclang.
2021-06-06 20:17:32 +02:00
toonn
336d82617f
bootstrap-tools: Patch TargetConditionals.h
`TargetConditionals.h` was missing several definitions, like
`TARGET_OS_TV` that are part of SDK 10.12 at least. And one that doesn't
seem to occur in any SDK afaict, `TARGET_OS_EMBEDDED_OTHER`.

I added the definitions from SDK 10.12 verbatim and defined
`TARGET_OS_EMBEDDED_OTHER` to be equal to `0`.

This is a modified version of a patch to avoid a stdenv rebuild.
2021-06-06 20:17:13 +02:00
toonn
fa49e70c1b
bootstrap-tools: Include libclang-cpp.11.1.dylib too
We need to include the library with the version suffix because
`libclang-cpp.dylib` is just a symlink.
2021-06-05 19:56:53 +02:00
toonn
d259fcc3e2
bootstrap-tools: Include libclang-cpp.dylib
Credits to @LnL7, this is based on commit
ae68f1c447d775e64d6e16a33f2affe591c419bf from PR #85151.
2021-06-05 19:56:53 +02:00
toonn
4a2698221b
bootstrap-tools: Update to LLVM 11 2021-06-05 19:56:53 +02:00
toonn
3b8782a806
bootstrap-tools: Add bootstrapFiles argument
I was having a hard time testing new bootstrapFiles because
`make-bootstrap-tools.nix` imports `pkgspath` but does not pass anything
but the current system.

This is merely for convenience and I'm not entirely certain it's a
sensible thing to do, maybe generating new bootstrapFiles while
overriding the current bootstrapFiles isn't something you're supposed to
do?
2021-06-05 19:56:53 +02:00
toonn
7da313e10a
bootstrap-tools: Fix xnu python3 patch
This patch only affects the xnu included in the bootstrap-tools to avoid
a stdenv rebuild.
2021-06-05 19:55:38 +02:00
Andrew Childs
38207735f4 darwin/make-bootstrap-tools: move "lib" from install name to rpath
The rpath structure for the bootstrap tools was reworked to minimize
the amount of rewriting required on unpack, but the test was not
updated to match the different structure.

Additionally [1] builds that use the bootstrap version of libc++
cannot find libc++abi if the reference includes the "lib"
component (ie, libc++ refers to libc++abi with
@rpath/lib/libc++abi.dylib).

[1] https://logs.nix.samueldr.com/nix-darwin/2021-05-18#4993282

Test failure observed on Hydra: https://hydra.nixos.org/build/143130126
2021-05-24 15:04:39 +09:00
Andrew Childs
3eacdfe24a stdenv/darwin: bootstrap tools for Apple Silicon 2021-05-17 00:27:02 +09:00
Andrew Childs
7869d16545 llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.

The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.

Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.

----

Other misc notes, highly incomplete

- lvm-config-native and llvm-config are put in `dev` because they are
  tools just for build time.

- Clang no longer has an lld dep. That was introduced in
  db29857eb3, but if clang needs help
  finding lld when it is used we should just pass it flags / put in the
  resource dir. Providing it at build time increases critical path
  length for no good reason.

----

A note on `nativeCC`:

`stdenv` takes tools from the previous stage, so:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`

while:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2021-04-30 05:41:00 +00:00
Ryan Burns
bcd7b0dd5d darwin/make-bootstrap-tools: avoid brotli dependency
Needed as of e3d19670a0
2021-03-18 12:30:16 -07:00
Ben Siraphob
0e49ba1b64 make-bootstrap-tools: stdenv.lib -> lib 2021-01-15 14:24:03 +07:00
Andrew Childs
34c8fae439 darwin/stdenv: tapi stub based bootstrap
Fixes bootstrapping on macOS Big Sur.
2020-12-22 11:43:54 +09:00
Andrew Childs
47c770e0e6 darwin/make-bootstrap-tools: remove references to old libSystem 2020-11-12 16:57:19 +09:00
Andrew Childs
630f5d30df stdenv/darwin: enable tapi support in cctools 2020-08-21 01:09:42 +09:00
volth
f3282c8d1e treewide: remove unused variables (#63177)
* treewide: remove unused variables

* making ofborg happy
2019-06-16 19:59:05 +00:00
Matthew Bauer
f1461d8c3d darwin-bootstrap: copy libLLVM dylib
This is needed for the bootstrap tools to work:

https://hydra.nixos.org/build/92534667
2019-04-26 21:55:09 -04:00
Matthew Bauer
c1cb58e81e darwin/make-bootstrap-tools: fix build 2019-04-26 21:55:02 -04:00
Matthew Bauer
ae1e940cc0 darwin: move to llvm7 2019-04-20 23:17:04 -04:00
Matthew Bauer
d02bb3c197 darwin.make-bootstrap-tools: remove dsymutil
This hopefully is not needed for the bootstrap tools. Needs more testing.
2019-01-06 22:15:43 -06:00
Dan Peebles
110c252870 cctools: support LTO on Darwin
LTO is disabled during bootstrap to keep the bootstrap tools small and
avoid unnecessary LLVM rebuilds, but is enabled in the final stdenv
stage and should be usable by normal packages.
2018-09-16 02:12:11 -04:00
Dan Peebles
4efd4053ed stdenv/darwin: integrate a new CoreFoundation
This also updates the bootstrap tool builder to LLVM 5, but not the ones
we actually use for bootstrap. I'll make that change in a subsequent commit
so as to provide traceable provenance of the bootstrap tools.
2018-09-15 16:05:46 -04:00
Daiderd Jordan
5024e4aa39
stdenv-bootstrap-tools: update unpack to use $reexportedLibrariesFile 2018-07-07 11:43:27 +02:00
Vladimír Čunát
03eef81727
darwin bootstrap tools: fix after #34339 (http2 in curl) 2018-02-10 19:20:44 +01:00
Vladimír Čunát
ced4e5a683
darwin stdenv boostrap tools: use curl without kerberos
/cc #29785.  Otherwise we would have to put the lib in, etc.
2017-12-24 11:10:10 +01:00
Dan Peebles
d5bdfcbfe6 darwin.make-bootstrap-tools: fix ICU reference to improve purity 2017-11-13 20:27:11 -05:00
Dan Peebles
c217f59344 darwin.make-bootstrap-tools.test: fix build breakage
In the extremely unlikely case that our store hash path ends in several
digits (as is the case right now), the Darwin ld will try to interpret
those digits as a version number and barf. To avoid that, we pass in the
SDK version explicitly to stop it from trying to figure it out from iffy
context.
2017-05-05 21:34:28 -04:00
Dan Peebles
72d9016b8b darwin.make-bootstrap-tools: fix to use LLVM 4
This should now roughly match the bootstrap tools we're using on Darwin
2017-04-08 16:38:48 -04:00
John Ericson
3e197f7d81 top-level: Normalize stdenv booting
Introduce new abstraction, `stdenv/booter.nix` for composing bootstraping
stages, and use it everywhere for consistency. See that file for more doc.

Stdenvs besides Linux and Darwin are completely refactored to utilize this.
Those two, due to their size and complexity, are minimally edited for
easier reviewing.

No hashes should be changed.
2017-01-13 13:23:23 -05:00
John Ericson
19fbe80c3d top-level: avoid another assert false while we're at it 2016-12-15 17:09:46 -05:00
John Ericson
5c6234a7d3 top-level: Allow manually specifying a stdenv, and fix stdenv tests
- The darwin test can now force the use of the freshly-booted darwin stdenv
 - The linux test now passes enough dummy arguments

This may make debugging harder, if so, check out #20889
2016-12-03 17:21:07 -08:00
Dan Peebles
6a380c20e0 darwin.make-bootstrap-tools: Fix test target
I'll probably get rid of this eventually since the test-pkgs stuff is
more realistic, but this gives quick feedback for now.
2016-10-15 21:36:51 -04:00
Vladimír Čunát
e0210d7cbf tested job: fixup evaluation after 5dadc3a
I believe hardcoding system to builtins.currentSystem isn't very good,
as e.g. Hydra surely evaluates on Linux only...
2016-10-14 09:21:38 +02:00
Dan Peebles
5dadc3a30c darwin.make-bootstrap-tools: fix for new stdenv setup 2016-10-13 22:32:19 -04:00
obadz
6389f9b349 Revert "make-bootstrap-tools.darwin: upgrade to llvm 3.8"
This reverts commit bddf4e2180.

Trying to fix stdenvBootstrapTools.x86_64-darwin.stdenv

cc @copumpkin @domenkozar
2016-08-29 16:19:36 +01:00
Shea Levy
8b9b9fad31 Revert "Revert "Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs""
Revert a revert of a merge that shouldn't have been in master but was intentionally in staging.

Next time I'll do this right after the revert instead of so far down the line...

This reverts commit 9adad8612b.
2016-08-24 07:35:30 -04:00
obadz
2a552a0888 Partially revert "make-bootstrap-tools.darwin: upgrade to llvm 3.8"
This partially reverts commit bddf4e2180.

cc @copumpkin

Was breaking nix-build <nixpkgs/nixos/release-combined.nix> -A nixpkgs.tarball
See http://hydra.nixos.org/build/38886695/nixlog/2
2016-08-21 15:26:51 +01:00
Dan Peebles
bddf4e2180 make-bootstrap-tools.darwin: upgrade to llvm 3.8
This will break part of the bootstrap tools tests because the new tools
need some changes in the stdenv, but if I change them all at once, the
stdenv breaks with the old bootstrap tools. So I'm doing this first, then
will make changes to the stdenv once this bundle is built and I can use
it.

I also added some functionality to let me test one set of bootstrap tools
on another nixpkgs tree, which makes testing a lot more pleasant.
2016-08-19 23:22:22 -04:00
Shea Levy
9adad8612b Revert "Merge branch 'modprobe-fix' of git://github.com/abbradar/nixpkgs"
Was meant to go into staging, sorry

This reverts commit 57b2d1e9b0, reversing
changes made to 760b2b9048.
2016-08-15 19:05:52 -04:00
Dan Peebles
8f4bbdce99 make-bootstrap-tools: fix on darwin
A couple of things broke after my stdenv change.
2016-08-14 16:20:33 -04:00
Tuomas Tynkkynen
0cdf892769 darwin make-bootstrap-tools: Document reason for special coreutils
Discussion:
https://github.com/NixOS/nixpkgs/commit/ac4958efc33322c9
2016-07-09 17:23:43 +03:00
Tuomas Tynkkynen
644d4e9ac9 Revert "Revert "make-bootstrap-tools: try again to fix on Darwin""
This reverts commit debd401b0f.

We must not use a single-binary build for the bootstrap since the common
binary gains a dynamic linkage to gmp (due to 'factor' and 'expr'
handling arbitrary-precision arithmetic).
2016-07-09 17:19:18 +03:00
Vladimír Čunát
1e2d0205a8 make-bootstrap-tools: try again to fix on Darwin
For discussion see:
https://github.com/NixOS/nixpkgs/commit/ac4958efc33322c9
2016-07-03 16:34:47 +02:00
Vladimír Čunát
debd401b0f Revert "make-bootstrap-tools: try again to fix on Darwin"
This reverts commit ac4958efc3.
2016-07-03 16:34:46 +02:00
Vladimír Čunát
ac4958efc3 make-bootstrap-tools: try again to fix on Darwin
I've got no way to test, so just trying a likely safer way blindly.
2016-07-03 14:21:55 +02:00
Vladimír Čunát
f4792cdc0c make-bootstrap-tools*: fixup after #16406
Our coreutils now uses single-binary-build mode where, by default,
simple shebang scripts are used for all the binaries. That doesn't work
e.g. with the Linux unpacker which only handles standard binaries and
symlinks. Let's use the symlinked mode instead for boostrapping.
This does NOT change any stdenv hashes.

I only tested the case most important to me:
$ nix-build pkgs/top-level/release.nix -A stdenvBootstrapTools.x86_64-linux.test
2016-06-28 09:54:22 +02:00
Nikolay Amiantov
5ff40ddedf add get* helper functions and mass-replace manual outputs search with them 2016-04-25 13:24:39 +03:00
Vladimír Čunát
ab15a62c68 Merge branch 'master' into closure-size
Beware that stdenv doesn't build. It seems something more will be needed
than just resolution of merge conflicts.
2016-04-01 10:06:01 +02:00
Vladimír Čunát
c643ccaa8c Merge #13950: move ncurses utilities to $out 2016-03-16 08:39:37 +01:00