Commit Graph

2326 Commits

Author SHA1 Message Date
Tristan Ross
e427a1d3bb llvmPackages.libc: init at 20.0.0-unstable-2024-12-08 (#363449) 2025-01-19 19:42:06 -08:00
Austin Horstman
ad2c670306 llvmPackages_[14-17].lldb: fix build with clang-19 (#373938) 2025-01-19 13:21:23 -06:00
Tristan Ross
25b03f7b44 llvmPackages_19: 19.1.6 -> 19.1.7 2025-01-14 21:38:12 -08:00
Reno Dakota
57febece67 llvmPackages{12,13,14}.lldb: fix installCheckPhase on darwin
darwin doesn't have a lib output so use `${!outputLib}`
2025-01-14 21:37:32 -08:00
Reno Dakota
7bb07f13a6 llvmPackages_{12,13,14,15,16}.lldb: fix build with clang-19
73e15b5edb
2025-01-14 21:37:32 -08:00
Reno Dakota
357745da8a llvmPackages_{12,13,14,15,16,17}.lldb: fix build with libcxx-19
68744ffbdd
2025-01-14 21:37:32 -08:00
K900
24c287ca64 Merge remote-tracking branch 'origin/staging-next' into staging 2024-12-26 10:09:36 +03:00
Vladimír Čunát
f6a2e6accd llvmPackages_19.libclc: fix cross compilation (#366701) 2024-12-25 19:45:50 +01:00
Tristan Ross
f72b341556 llvmPackages_git.libc: init 2024-12-24 18:49:02 -08:00
Tristan Ross
37409b3b1a llvmPackages_git: 20.0.0-unstable-2024-11-26 -> 20.0.0-unstable-2024-12-17 2024-12-24 18:39:08 -08:00
Philip Taron
eb9c60553b llvmPackages.llvm: Relax replace-fail in tests (#366358) 2024-12-22 16:25:12 -08:00
github-actions[bot]
f8f22218c9 Merge staging-next into staging 2024-12-23 00:15:27 +00:00
Philip Taron
87387bb46d llvmPackages.tblgen: Fix 12/13/14 build (#366355) 2024-12-22 12:31:28 -08:00
K900
c03fa0c918 Merge remote-tracking branch 'origin/master' into staging-next 2024-12-22 21:59:42 +03:00
Peter Waller
9676ba5756 llvmPackages.clang: Drop failing substituteInPlace for CompletionModel.cmake
Fix up #356120 for clang 12. The failing replacement target was removed
between llvm 12.0.0 and 12.0.1.

Ref: https://github.com/NixOS/nixpkgs/pull/348568#discussion_r1894533619
Ref: 3be5dbbc32
Signed-off-by: Peter Waller <p@pwaller.net>
2024-12-22 16:51:56 +01:00
György Kurucz
304d149f24 llvmPackages.libcxx: use hasSharedLibraries instead of isStatic 2024-12-22 15:59:28 +01:00
Nick Cao
6ae428ac13 llvmPackages_19.libclc: fix cross compilation 2024-12-19 21:50:32 -05:00
K900
7661b4ac55 Merge remote-tracking branch 'origin/staging-next' into staging 2024-12-19 12:47:54 +03:00
Reno Dakota
1259856bac llvmPackages.lldbPlugins: drop llvm/clang rebuild
Eliminate rebuilding the following packages on darwin just for this
attrset:

< DarwinTools-1.drv
< DarwinTools-1.tar.gz.drv
< IOKit-11.0.drv
< builder.pl.drv
< clang-16.0.6.drv
< clang-at-least-16-LLVMgold-path.patch.drv
< clang-darwin-An-OS-version-preprocessor-define.patch.drv
< clang-src-16.0.6.drv
< llvm-16.0.6.drv
< llvm-src-16.0.6.drv
< psutil-6.0.0.tar.gz.drv
< python3-3.12.7-env.drv
< python3.12-psutil-6.0.0.drv
< sysctl-system_cmds-1012.drv

found by diffing the output of the command below before and after this
change:
```
nix-store --query -R $(nix-instantiate -A llvmPackages.lldbPlugins) | \
  cut -d- -f 2- | sort
```
2024-12-18 18:48:23 -08:00
Peter Waller
3fdf224de2 llvmPackages.tblgen: Fix 12/13/14 build
The original tblgen split landed before I was quite ready for it, so
older versions of clang had not been tested.

Reinstate them here.

* Apply patches from LLVM (aside for those from polly, because the
  source tree is not present)
* Apply the clang/gnu-install-dirs.patch patch to the clang tree.
* Bracket the build targets with appropriate version checks so we don't
  try to build non-existent things.
* Bracket mlir-tblgen with >=16 to mirror the rest of mlir support.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-12-18 22:34:33 +00:00
Peter Waller
002b5ce885 llvmPackages.llvm: Relax replace-fail in tests
There is at least one of these which isn't always present across all
LLVM version, so relax it to --replace-quiet.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-12-18 22:33:17 +00:00
github-actions[bot]
dd1d7cff2b Merge master into staging-next 2024-12-18 18:04:46 +00:00
Tristan Ross
9c40bef08a llvmPackages_git: 20.0.0-git-2024-10-07 -> 20.0.0-git-2024-11-25 2024-12-18 16:44:57 +01:00
Reno Dakota
81bf89d5e8 llvmPackages_19: 19.1.5 -> 19.1.6
https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.6
https://discourse.llvm.org/t/llvm-19-1-6-released/83723
2024-12-17 21:18:50 -08:00
Reno Dakota
71d262c2e0 llvmPackages_{12-19}.llvm: fix darwin build
build breaks after replace -> replace-fail
df8af496f7

pattern fails to match and doesn't seem to have a match in llvm-[12-]
https://github.com/llvm/llvm-project/blob/release/12.x/llvm/cmake/modules/AddLLVM.cmake
2024-12-17 21:17:41 -08:00
Philip Taron
bbbe3d4ddc llvmPackages: remove _IMPORT_PREFIX replacements
These strings do not show up in the files where they are attempting to be replaced.
2024-12-17 16:41:57 -08:00
github-actions[bot]
17dc04d068 Merge staging-next into staging 2024-12-17 12:06:41 +00:00
K900
293d08b05f Merge remote-tracking branch 'origin/master' into staging-next 2024-12-17 09:46:26 +03:00
Tristan Ross
ba1deff5ad llvmPackages.*: Expose git rev through pkg.src.rev (#354792) 2024-12-16 19:38:25 -08:00
Tristan Ross
a5a2607523 llvmPackages: Fix update-git.py (#354472) 2024-12-16 19:38:04 -08:00
Peter Waller
269fdda927 llvmPackages: sed -i 's/--replace /--replace-fail /g'
Rationale: --replace is deprecated and emits warnings. If these
replacements fail it is probably better to know about it early and come
up with better fixes than the alternative of letting them silently fail
and discover some distal brokenness.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-12-15 16:20:01 +00:00
misuzu
4a30ef65f2 {libllvm,isl,libiberty,libmpc}: fix references to /usr/bin/uname on native FreeBSD (#356763) 2024-12-14 13:02:45 +02:00
John Ericson
19ab1e3e99 llvmPackages: Split tablegen into its own derivation (#362384) 2024-12-13 20:06:54 -05:00
K900
a7e86ba134 Merge remote-tracking branch 'origin/master' into staging-next 2024-12-13 15:35:01 +03:00
Arne Keller
314b7e17df llvmPackages: add asl20-llvm to licenses for v19+ (#314347) 2024-12-13 10:45:57 +01:00
Peter Waller
59331c3a17 llvmPackages: Split tablegen into its own derivation
Background:

LLVM has some tools that run at build time. In native builds, these are
built as a part of the usual build, but in cross builds they need to
come from buildPackages.

In many scenarios this is a small problem because LLVM from
buildPackages is already available as a build; but if cross building a
version of LLVM which is not available (e.g. a new git commit of LLVM)
this results in two builds of LLVM and clang, one native and one for the
cross.

Full builds of LLVM are expensive; and unnecessary in this scenario. We
don't need a native LLVM, only a native copy of the tools which run at
build time. This is only tablegen and related tooling, which are cheap
to build.

Implementation-wise, we introduce a derivation llvmPackages.tblgen,
which specifies the tablegen targets which need to be built and has a
custom installPhase to copy them to the output.

A previous attempt in https://github.com/NixOS/nixpkgs/pull/359967
dropped the use of LLVM_TABLEGEN_EXE and friends on the grounds that
llvm can already cross build these things, but that is false since it's
necessary in that case to wire in a cross compiler. This PR avoids that
problem by allowing access to buildPackages.tblgen.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-12-11 20:55:03 +00:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Silvan Mosberger
84d4f874c2 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 78e9caf153
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:23:58 +01:00
Peter Waller
4a880d2484 llvmPackages.bolt: Use ninja, drop libclang dependency
Using ninja makes it consistent with the other llvm package builds, and
libclang is not necessary as a dependency.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-12-10 09:21:19 +00:00
Philip Taron
eb69690f63 llvmPackages_19: 19.1.4 -> 19.1.5 (#361678) 2024-12-05 20:49:10 -08:00
Reno Dakota
b25d66d263 llvmPackages_19: 19.1.4 -> 19.1.5
https://github.com/llvm/llvm-project/releases/tag/llvmorg-19.1.5
2024-12-04 15:37:02 +00:00
Philip Taron
246e737cca various: replace substituteAll with replaceVars (#360770) 2024-12-02 05:52:25 -08:00
Wolfgang Walther
4423b0746c various: replace substituteAll with replaceVars
This deals with some special cases, i.e. where "null" is used to avoid
replacing some values or where the syntax is not too easy to grep for
for automated replacement.
2024-12-01 14:56:12 +01:00
Wolfgang Walther
217d3132cf various: remove unused substituteAll imports 2024-12-01 14:25:56 +01:00
Reno Dakota
85492cd5fd llvmPackages_12.compiler-rt: fix build race aarch64-darwin
b31080c596
(cherry picked from commit 47a4caf483)
(cherry picked from commit c5d97e0577)
2024-11-30 15:11:11 +01:00
sternenseemann
6309f13670 llvmPackages_12.clang: use nostdlibinc patch instead of sed command
Seems like the patch we've written for LLVM 13 and above also works for
LLVM 12 which seems a little more robust.

(cherry picked from commit 37437849de)
(cherry picked from commit f30f8ee969)
2024-11-30 15:11:10 +01:00
sternenseemann
fcb5d10d26 llvmPackages_12.compiler-rt: move codesign patch into versioned dir
All LLVM versions < 12 have been removed, so this patch can live in the
versioned directory, simplifying the patch list in the process.

(cherry picked from commit 8408b91e8d)
(cherry picked from commit e33308016c)
2024-11-30 15:11:09 +01:00
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
sternenseemann
fe5ea976bf llvmPackages_{12,13}.lldb: don't try to find nonexistent patch
We just need to make sure the attribute evaluates so we can cleanly
access `meta.broken` for those versions.

(cherry picked from commit ce6c31c312)
(cherry picked from commit 9bf90993f4)
2024-11-30 15:11:09 +01:00
K900
3b5cb28a23 Merge remote-tracking branch 'origin/staging-next' into staging 2024-11-26 09:46:04 +03:00