Commit graph

17 commits

Author SHA1 Message Date
sternenseemann 91cba7b0a9 llvmPackages_{10,11,12}.compiler-rt: install resource txts to $out/share
7869d16545 changed how resource files are
installed. Likely by accident, now some of the resource files are
installed to $dev/include instead of $out/share. This causes the cc
wrapper's resource-root to miss those files from compiler-rt as they are
in a different place than expected.

This commit fixes all instances of this incorrect installation for
llvmPackages_10, 11 and 12 which are the only llvm package sets which
link ${targetLlvmLibraries.compiler-rt.out}/share to the resource-root.

For the other llvm package set this will likely also need to be fixed,
but it doesn't have to have immediate urgency and doing it in two steps
allows us to (hopefully) fix the chromium build without causing a darwin
stdenv rebuild.

The full fix can be found in #123103 and should probably be included in
the next staging-next rotation.
2021-05-15 17:40:24 +02:00
Vladimír Čunát ba2140b657
Merge #122044: compiler-rt: Fix build by passing resource dir
Fast-forwarded from staging to staging-next.  See:
https://github.com/NixOS/nixpkgs/pull/111487#issuecomment-840088733
2021-05-12 22:55:14 +02:00
John Ericson 22da550728
Fast-forward PR #122399 from staging to staging-next
compiler-rt: Revert passing `COMPILER_RT_OS_DIR` and not symlinking libs
(cherry picked from commit 680b33fe37)
https://github.com/NixOS/nixpkgs/pull/111487#issuecomment-840078869
2021-05-12 22:43:52 +02: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
Michael Weiss e4f8498c0b
llvmPackages_12: Create subdirectories for the last two packages
For consistency. Now all packages will have their own subdirectory
(continuation of 781e69d19c).
2021-04-24 11:43:29 +02:00
Michael Weiss a902d99422
llvmPackages_12: Always use the attribute name for pname
This might be a bit debatable but upstream uses "xx" instead of "++"
when using it as identifier / in the code (file/directory names, build
scripts, website URLs, etc.) so we should probably too.
And at least the attribute name and pname will be consistent now.
2021-04-24 11:43:29 +02:00
Luke Granger-Brown 9aa8ae999a llvmPackages_12.llvm: fix building on older CPUs
This commit patches one of the llvm-exegesis tests to swap out whatever
CPU model happens to be on the build host for bdver2 (AMD Family
15h/Piledriver), which was picked because it looks like that was the
intent of the test author. This provides a more predictable compilation
behaviour when running on older (or possibly even newer!) machines.

One of the machines that is currently part of the NixOS Hydra build
farm, wendy, is using an old AMD Opteron CPU for which LLVM has no
scheduling machine model. This causes one of the tests for llvm-exegesis
to fail, because it segfaults trying to use the machine model to produce
useful analysis results.

Note that this particular test only runs on x86-64 build hosts anyway;
aarch64 isn't affected.

This deliberately only patches LLVM 12 to limit the rebuilds; other
LLVM versions are going through staging.
2021-04-17 01:55:53 +00:00
Michael Weiss 28887e7fe5
llvmPackages_12: Improve and extend the meta attributes 2021-04-15 18:41:38 +02:00
Michael Weiss 2c2e8662b9
llvmPackages_12: 12.0.0-rc5 -> 12.0.0
Release notes: https://releases.llvm.org/12.0.0/docs/ReleaseNotes.html
2021-04-15 16:31:32 +02:00
sternenseemann 781e69d19c llvmPackages_12: reorganize files
Restructure pkgs/development/compilers/llvm/12 in a similar spirit
as #117433 to mirror the other llvm directories.
2021-04-15 12:44:05 +02:00
Michael Weiss 2b95bf44b8
llvmPackages_12: 12.0.0-rc4 -> 12.0.0-rc5
Note: Tested in #116646.
2021-04-08 16:12:48 +02:00
Michael Weiss a960fead6e
llvmPackages_12: 12.0.0-rc3 -> 12.0.0-rc4 2021-04-02 14:35:23 +02:00
Michael Weiss cc12a82cf2
llvmPackages_12: Fix libunwind, openmp, libcxx, and libcxxabi
All builds succeed now: nix-build -A llvmPackages_12
2021-04-01 20:08:20 +02:00
Gabor Greif 7c27d49815
llvmPackages_12: init at 12.0.0-rc3
https://lists.llvm.org/pipermail/release-testers/2021-March/001496.html
2021-04-01 12:32:19 +02:00
Michael Weiss 2fd9e41719
llvmPackages_12: Copy from llvmPackages_11 2021-04-01 12:32:18 +02:00