Commit graph

32 commits

Author SHA1 Message Date
John Ericson 18c38f8aee treewide: All the linker to be chosen independently
This will begin the process of breaking up the `useLLVM` monolith. That
is good in general, but I hope will be good for NetBSD and Darwin in
particular.

Co-authored-by: sterni <sternenseemann@systemli.org>
2021-05-14 21:29:51 +00:00
John Ericson 49d2653653
Merge pull request #122974 from sternenseemann/lldClang-no-double-wrap
llvmPackages_*.lldClang: don't wrap bintools twice
2021-05-14 14:52:57 -04:00
sternenseemann 3eaa00879c llvmPackages_*.lldClang: don't wrap bintools twice
The bintools argument received a wrapped version of tools.bintools which
is already wrapped. Wrapped bintools twice leads to users of lldClang
being unable to find the tools which are not wrapped like ar.
2021-05-14 12:50:41 +02:00
John Ericson e830db4320 llvmPackages: Fix more inconsistencies
The main thing was using `llvm_meta` in all versions.

Secondarily:

 - libunwindx7: Forgot to split outputs

 - libcxx{,abi} 12: Forgot to apply output-splitting patches.

 - simplify `useLLVM` stdenv-switching logic.

 - openmp always gets its own directory
2021-05-12 00:16:11 +00:00
John Ericson 37194a325d treewide: Try to make a few bootstrapping things more consistent
- Introduce `preLibcCrossHeaders` to bootstrap libgcc and compiler-rt
  the same way.

- Organize LLVM bintools as `bintools{-unwrapped,,NoLibc}` for
  consistency with GNU Binutils and Apple's cctools.

- Do Android changes for all `llvmPackages` for consistency.

- Improve the way the default GCC and LLVM versions are selected.
2021-05-12 00:14:56 +00:00
John Ericson e0d3c9d031 llvmPackages*.libcxx*: Always use the attribute name for pname
This decision was made in a902d99422 but
just for LLVM 12. Now we apply it consitently.
2021-05-12 00:14:56 +00:00
John Ericson 894f0c6ec8 llvmPackages: Always put libunwind before openmp
This keeps the "main bootstrap" together.
2021-05-12 00:13:13 +00:00
John Ericson cf02b24813 Merge remote-tracking branch 'upstream/staging-next' into staging 2021-05-11 22:30:46 +00:00
Vladimír Čunát 6b3b7940ff
llvm*Packages: fix output selection (lib.get*) 2021-05-11 10:45:11 +02:00
John Ericson fc7a998748 compiler-rt: Fix build by passing resource dir
Before, clang was able to find some headers with a relative path to the
`-B` flag pointing near the unwrapped clang binary. But with multiple
outputs that doesn't work, so we use a "resource directory" as it done
later in the bootstrap.
2021-05-07 16:39:19 +00: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
John Ericson 0ae1182489 llvmPackages_*.libunwind: Move into own directory
I expect to soon give it some patches that would go in there too, but
either way it's good to match the others.
2021-03-26 05:06:15 +00:00
John Ericson 19a974945b llvmPackages: Organize files
Always do pkg/default.nix not pkg.nix; use directories to avoid
prefixing patches and other files.
2021-03-24 05:02:50 +00:00
John Ericson 0710308402 clang, cc-wrapper: Move --gcc-toolchain logic into CC wrapper
Take 2, after #94582 had to be reverted.

This reverts commit ac03cfa3c5.
2021-01-24 15:49:32 -05:00
Ben Siraphob acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
John Ericson 92f96f47b0 treewide: Get rid of cc.gcc
Instead, we have a new `gccForLibs`, which has the appropriate
definition for e.g. avoiding `x86_32` linking problems.
2020-08-02 17:12:05 +00:00
Holger Wünsche c4740fcb1b
llvmPackages_{8..10}: comment out broken manpages
This disables all manpages packages depending on recommonmark. This can
be undone once recommonmark supports sphinx 3. The other
manpage-packages don't use recommonmark and don't need to be commented
out.
2020-07-28 09:34:13 +02:00
John Ericson f3f7612a40 C++ Compilers: Systematize handling of standard libraries 2020-06-22 04:24:44 +00:00
Travis Whitaker 74f3b25896 LLVM: Always pass host/target info to compiler-rt/libstdcxxClang 2020-04-13 18:49:27 -04:00
John Ericson bc054004ac cc-wrapper, clang: libstdcxxHook should a propagated build input
Lumping it in with the target platform libraries was incorrect, and
caused eval failures when gcc couldn't be built for the target platform.
2020-03-18 11:28:52 -04:00
Matthew Bauer db29857eb3 Re-Revert "clang_7,clang_8,clang_9: fix compilation of HIP-code"
This reverts commit f14a4d60b7, and thus
applying 558af6fbc7.
2020-01-28 11:35:19 -05:00
Daiderd Jordan d0a90de910
llvmPackages: python2 -> python3 2020-01-13 11:13:56 +01:00
volth 08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
Orivej Desh c9091c1d9d llvmPackages_8: 8.0.0 -> 8.0.1
Starting with 8.0.1 and 7.1.0 LLVM has moved release hosting to GitHub.
2019-08-05 23:32:16 +00:00
Matthew Bauer 556466d52f wasm: set -fno-exceptions
We need this to support C++ code.
2019-04-23 21:48:58 -04:00
Matthew Bauer 9abff4af4f wasm: init cross target
Adds pkgsCross.wasm32 and pkgsCross.wasm64. Use it to build Nixpkgs
with a WebAssembly toolchain.

stdenv/cross: use static overlay on isWasm

isWasm doesn’t make sense dynamically linked.
2019-04-23 21:48:57 -04:00
John Ericson 6794b01658 clang 8, lldClangStdenv: Get LLVM's unwind working properly
Backport the `--unwindlib` flag, so it don't try to use libgcc on Linux
for hysterical reasons. The alternative of passing `-lunwind` always
would mess up C.
2019-04-12 13:19:48 -04:00
Matthew Bauer d453273fbf llvm8: support c++ in cross case
this adds libc++ to the LLVM cross, giving us access to the full
Nixpkgs set. This requires 4 stages of wrapped compilers:

- Clang with no libraries
- Clang with just compiler-rt
- Clang with Libc, and compiler-rt
- Clang with Libc++, Libc, and compiler-rt
2019-04-11 21:28:51 -04:00
Will Dietz 5c4aed5c8a llvmPackages_8: rc5 -> 8.0.0 release 2019-03-20 09:56:20 -05:00
Will Dietz 91b1806476 llvmPackages_8: rc3 -> rc5 2019-03-12 16:39:44 -05:00
Will Dietz 145f213806 llvmPackages_8: rc2 -> rc3 2019-03-03 21:54:26 -06:00
Matthew Bauer 52cb072562 llvm8: init 2019-03-01 23:42:10 -05:00