Commit Graph

72 Commits

Author SHA1 Message Date
sternenseemann
f0f66c41d4
llvmPackages_12: build from monorepo source
As mentioned in #305146, keeping LLVM 12 is a source of pain because it
is the only version to be built from individual release tarball instead
of the LLVM monorepo. This commit makes LLVM 12 start from the monorepo
as well, simplifying all common LLVM expressions in the process.

With #347887, some quirks in the expressions for LLVM <14 were ironed
out, so building LLVM through from the monorepo is quite simple now.

- Most expressions only required minor changes, mostly removing the
  special casing for `sourceRoot`.

- The patch lists from llvm/12/default.nix were ported to
  common/default.nix. This only required a few extra conditionals which
  could be reduced via a rebuild also involving other LLVM versions.
  Outstanding tasks of little urgency have been noted in TODO comments.
  I have verified that the patch lists stay the same for all packages
  except LLVM where merely the order changes. An extra set of eyes
  is appreciated, of course.

- clang: The expression was reworked to use the same symlink location
  for clang-tools-extra for all versions including LLVM 12. This
  required adjusting the ad hoc patching of the clangd cmake files
  slightly.

- libunwind: We no longer need to make the libcxx sources available
  manually. We can rely on the monorepo source instead.

- lld: We no longer need to make the libunwind sources available manually.

- llvm: We no longer need to make the polly sources available manually

- On Darwin, we need to bypass CMake's C++ compiler for libcxx and
  libunwind now. It isn't a 100% clear why, probably because we've
  started to use Darwin's bootstrapStdenv for libcxx in the common
  expression compared to LLVM 12 on master [1].
  The reordering of flags for wasm causes a rebuild for some packages
  like firefox, but this should be tolerable on staging.

[1]: 665ebfb253/pkgs/development/compilers/llvm/12/default.nix (L392-L430)

(cherry picked from commit ee9eacf23e)
(cherry picked from commit c4e9f17ef9)
2024-11-30 15:11:09 +01:00
Tristan Ross
7c18ea34a2
llvmPackages: Make targetLlvmLibraries overridable (#355001) 2024-11-25 07:25:49 -08:00
Tristan Ross
54300c25d8
llvmPackages_19: 19.1.3 -> 19.1.4 2024-11-19 18:30:54 -08:00
Peter Waller
51ba14b167 llvmPackages: Make targetLlvmLibraries overridable
Pull #320261 introduced the possibility to consistently override
dependencies within an llvm package set. This is useful for development
and testing exotic configurations.

Go one step further and enable overriding targetLlvmLibraries.

This makes it possible to write an overlay such as:

```nix
overlays = [
  (self: super: {
    llvmPackages = super.llvmPackages.override (prev: {
      targetLlvmLibraries = super.targetPackages.llvmPackages.libraries // {
        compiler-rt = super.targetPackages.llvmPackages.libraries.compiler-rt.override {
          ...
        }
      };
    });
  })
];
```

... where the overridden compiler-rt will be used in a pkgsLLVM build.

As a straw man, I've done the minimally invasive thing to the code
structure: `targetLlvmLibraries` is not an explicitly named parameter
for llvmPackages; but it is available in `packageSetArgs` if passed.
This makes it slightly less discoverable, but this seems like a
reasonable tradeoff considered that modifying this would be a fairly
advanced/esoteric thing to need to do.

In some ways it would be better to have as an explicit parameter with a
default, but the obvious thing won't work because the default needs to
be a non-trivial expression. Potentially we could instead have it as a
defaulted parameter with the value of 'null', and if it's null, then
compute the current thing.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-11-10 14:31:35 +00:00
Reno Dakota
3cd45d08ee
llvmPackages_19: 19.1.1 -> 19.1.3
https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.3
2024-11-06 15:49:20 -08:00
Tristan Ross
ee04df014d
llvmPackages_git: 20.0.0-git-2024-09-29 -> 20.0.0-git-2024-10-07 2024-10-07 07:46:03 -07:00
Tristan Ross
8fb95f8b0d
llvmPackages_19: 19.1.0 -> 19.1.1 2024-10-01 06:41:48 -07:00
Tristan Ross
5792062b63
llvmPackages_git: 20.0.0-git-2024-09-22 -> 20.0.0-git-2024-09-29 2024-09-29 21:19:05 -07:00
Tristan Ross
a95f58cca4 llvmPackages_19: 19.1.0-rc3 -> 19.1.0 2024-09-29 17:03:11 +02:00
Tristan Ross
d55298086a
llvmPackages_git: 20.0.0-git-2024-09-16 -> 20.0.0-git-2024-09-22 2024-09-25 06:59:58 -07:00
Tristan Ross
25e07e7c53
llvmPackages: Reinstate overriding across whole package set (#341855) 2024-09-22 11:03:58 -07:00
Tristan Ross
9fdc0cc04c
llvmPackages_git: 20.0.0-git-2024-09-09 -> 20.0.0-git-2024-09-16 2024-09-16 18:56:52 -07:00
Peter Waller
ddafd4b14a llvmPackages: Reinstate overriding across whole package set
Pull #320261 introduced the possibility to consistently override
dependencies within an llvm package set. I think #325175 accidentally
dropped this, so reinstate it.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-09-15 10:09:34 +01:00
Tristan Ross
632c74153f
llvmPackages_git: 20.0.0-git-2024-09-01 -> 20.0.0-git-2024-09-09 2024-09-09 20:30:53 -07:00
Tristan Ross
0c3b35b3a1
llvmPackages_git: 20.0.0-git-2024-08-25 -> 20.0.0-git-2024-09-01 2024-09-01 20:53:45 -07:00
Tristan Ross
7b6f5058cf
llvmPackages_git: 20.0.0-git-2024-08-13 -> 20.0.0-git-2024-08-25 2024-08-25 21:14:28 -07:00
Tristan Ross
4a3bd44183
llvmPackages_19: 19.1.0-rc2 -> 19.1.0-rc3 2024-08-20 20:03:23 -07:00
tomberek
7248a7fde6
Merge pull request #333146 from ExpidusOS/feat/llvm-clean
Minor LLVM improvements
2024-08-16 01:34:50 -04:00
Tristan Ross
e8402fc56c
Merge pull request #334538 from ExpidusOS/feat/llvm-git-2024-08-13
llvmPackages_git: 20.0.0-git-2024-08-04 -> 20.0.0-git-2024-08-13
2024-08-14 18:15:20 -07:00
Tristan Ross
0fefb5a6ce
llvmPackages_git: 20.0.0-git-2024-08-04 -> 20.0.0-git-2024-08-13 2024-08-13 20:51:56 -07:00
Tristan Ross
a0f2fd5f0e
llvmPackages_19: 19.1.0-rc1 -> 19.1.0-rc2 2024-08-09 17:08:09 -07:00
Tristan Ross
f0c83432db
llvmPackagesSets: expose make package 2024-08-07 20:06:56 -07:00
Tristan Ross
a87f5eb7d0
llvmPackages_{13,14,15,16,17,18,git}: add recurse into attrs 2024-08-07 20:05:28 -07:00
Tristan Ross
59ee727a79
llvmPackages_git: 20.0.0-git-2024-07-28 -> 20.0.0-git-2024-08-04 2024-08-04 20:56:14 -07:00
Tristan Ross
811f87c5d5
llvmPackages_git: 19.0.0-git-2024-07-21 -> 20.0.0-git-2024-07-28 2024-07-31 22:00:15 -07:00
Tristan Ross
34da284106
llvmPackages_19: init 2024-07-31 18:04:20 -07:00
Tristan Ross
3827d51c23
llvmPackages_git: 19.0.0-git-2024-07-14 -> 19.0.0-git-2024-07-21 2024-07-21 20:17:23 -07:00
Tristan Ross
d94a7ad348
llvmPackages_git: 19.0.0-git-2024-07-08 -> 19.0.0-git-2024-07-14 2024-07-14 21:28:10 -07:00
nicoo
46d30329ab llvm: simplify the mkPackage helper 2024-07-10 13:51:58 +00:00
Tristan Ross
5c8f1f933e
llvmPackages_git: 19.0.0-git-2024-06-30 -> 19.0.0-git-2024-07-08 2024-07-08 22:06:29 -07:00
Tristan Ross
80e3c2c5d0
llvmPackages_{13,14,15,16,17,18,git}: commonify the default.nix 2024-07-08 17:21:53 -07:00
Shea Levy
fea2266290 llvm: Split llvmFull into separate derivations
Now most packages in the llvm suite are built as separate derivations.
The exceptions are:

* compiler-rt must currently be built with llvm. This increases llvm's
  size by 6 MB
* clang-tools-extra must be built with clang

In addition, the top-level llvm attribute is defaulted to llvm 3.4, and
llvm 3.3 must be accessed by the llvm_33 attribute. This is to make the
out-of-date packages obvious in the hope that eventually all will be
updated to work with 3.4 and 3.3 can be removed. I think we should keep
this policy in the future (latest llvm gets top-level name, the rest are
versioned until they can be removed).

The llvm packages (except libc++, which exception I will try to remove
on the next update) can all be accessed via the llvmPackages attribute,
and there are also aliases for the packages that already existed (llvm,
clang, and dragonegg).

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-20 20:33:06 -05:00
Vladimír Čunát
ac6761c908 Merge master into stdenv-updates
Conflicts:
	pkgs/applications/version-management/gource/default.nix
	pkgs/top-level/all-packages.nix
2014-01-20 19:39:28 +01:00
Shea Levy
55e6303d6a Add full llvm build, update libc++ and dragonegg
Some packages in the llvm suite (e.g. compiler-rt) cannot be built
separate from the build of llvm, and while some others (e.g. clang) can
the combined build is much better tested (we've had to work around
annoying issues before). So this puts llvm, clang, clang-tools-extra,
compiler-rt, lld, lldb, and polly all into one big build (llvmFull).
This build includes a static llvm, as dynamic is similarly less tested
and has known failures.

This also updates libc++ and dragonegg. libc++ now builds against
libc++abi as a separate package rather than building it during the
libc++ build.

The clang purity patch is gone. Instead, we simply set --sysroot to
/var/empty for pure builds, as all impure paths are either looked up in
the gcc prefix (which we hard-code at compile time) or in the sysroot.
This also means that if NIX_ENFORCE_PURITY is 0 then clang will look in
the normal Linux paths by default, which is the proper behavior IMO.

polly required an updated isl. When stdenv-updates is merged, perhaps we
can update the isl used by gcc and avoid having two versions.

Since llvm on its own is now separate from the llvm used by clang, I've
removed myself as maintainer from llvm and will leave maintenance of
that to those who are interested in llvm separate from clang.

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-20 05:42:38 -05:00
Mathijs Kwik
6072a289fc llvm: no-rule-aarch64.patch is only needed on 3.3
the fix just missed 3.3 but it's in 3.4
see bottom of: http://llvm.org/bugs/show_bug.cgi?id=16625
2014-01-18 19:13:29 +01:00
Vladimír Čunát
0a58b512cb Merge master into stdenv-updates
Conflicts (simple):
	pkgs/development/compilers/gcc/4.8/default.nix
	pkgs/development/compilers/llvm/default.nix
	pkgs/development/libraries/gmp/5.1.1.nix
	pkgs/development/libraries/gmp/5.1.3.nix
	pkgs/development/libraries/gmp/5.1.x.nix
	pkgs/top-level/all-packages.nix
2014-01-18 14:46:20 +01:00
Vladimír Čunát
ae0c9b626f llvm: add 3.4, urge for versioned usage
The 3.4 code was tested preliminary in x-updates,
described by 2e4eab1228.

Updates to llvm break builds of dependent packages (in all cases I've seen),
and often upstream isn't too fast in porting to the newest version.
Consequently, it seems better to keep more versions (two ATM),
both in one file to share eventual changes.
Also, using versioned llvm_* attributes is proposed because of this.
2014-01-13 21:53:50 +01:00
Vladimír Čunát
2265bab69d llvm: fix heavily parallel builds 2013-12-28 17:32:01 +01:00
Vladimír Čunát
4bcdeb49a1 mesa: update 9.1.6 -> 9.2.1, enable R600 LLVM stuff 2013-10-05 21:18:35 +02:00
Vladimír Čunát
0adae9f822 llvm: add support for R600
It will be useful for mesa >= 9.2.*
Also, I want to restart the build on Hydra, as it succeeds for me.
2013-09-24 23:10:48 +02:00
Vladimír Čunát
9475e4d50a llvm (merge amend): fix evaluation
Regular binutils now include gold.
2013-09-02 15:45:29 +02:00
Petr Rockai
8bc805a211 llvm: Build the LLVMgold.so plugin for ld.gold &c.
Conflicts (simple):
	pkgs/development/compilers/llvm/default.nix
2013-08-18 21:35:17 +02:00
Vladimír Čunát
625f40151b Merge branch 'master' into x-updates
Conflicts (a little tricky, I did some cleanup of interacting changes):
	pkgs/development/compilers/llvm/default.nix
	pkgs/development/libraries/libpng/default.nix
	pkgs/tools/package-management/nixops/default.nix
	pkgs/top-level/all-packages.nix
2013-08-02 18:30:53 +02:00
Peter Simons
e2874236d3 llvm: fix meta.license attribute 2013-07-04 17:53:57 +02:00
Jason "Don" O'Conal
3b490b7ccb llvm: re-disabling tests
accidentally re-enabled doCheck, which isn't working yet
2013-07-04 19:02:40 +10:00
Jason "Don" O'Conal
67e5eb909b llvm: fix build on darwin
* add DYLD_LIBRARY_PATH
* don't build with shared libs
2013-07-04 08:48:55 +10:00
Shea Levy
9b502a9ae1 llvm: Update to 3.3
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-06-21 19:18:52 -04:00
Vladimír Čunát
14f36162d2 llvm: switch back to cmake build, so now clang builds 2013-06-01 23:36:38 +02:00
Vladimír Čunát
70882b980c WARNING: history from now is going to change (mesa+llvm)
Current WIP, only tested nouveau (3D works very well).
2013-05-16 17:16:02 +02:00
Shea Levy
857742ea22 clang/llvm: 3.2 2013-01-22 14:33:55 -05:00