2316 Commits

Author SHA1 Message Date
whispers 28e4505698 llvm: add comment about backport selectiondag miscompile fix 2026-07-15 10:32:24 -04:00
whispers 4f7c60edb1 llvm_22: pick patch for selectiondag freeze condition miscompile
see https://github.com/NixOS/nixpkgs/commit/f8a025c9646e61bc992f4f3d76dd4193d749f417.
this commit backports that same change to LLVM 22. the fix is not
available upstream since LLVM 22 is EOL, but we can pick the patch
from the Rust fork of LLVM, as that is currently on version 22.1.
2026-07-15 10:32:24 -04:00
whispers f8a025c964 llvm_21: backport patch for selectiondag freeze condition miscompile
Several LLVM versions have a bug in SelectionDAG that causes
miscompilations around conditional poisions. This was exposed due to
Rust 1.97.0 exercising the involved code path heavily and generating
segfaulting code, but the bug existed beforehand as well. The patch was
made to LLVM 23, but the tests have many conflicts, so this is a manual
backport. This backport was made by:

- applying the code change to `llvm/lib`
- hand-updating `test/CodeGen/Mips/cmov.ll` with the same diff as the PR
- updating the rest with `utils/update_llc_test_checks.py` from the LLVM
  source tree, and verifying the diff against the one in the PR.

The last step made this a rather large and gnarly patch, but it's mostly
mechanical.

Rust issue: https://github.com/rust-lang/rust/issues/159035
LLVM issue: https://github.com/llvm/llvm-project/issues/208611
LLVM PR: https://github.com/llvm/llvm-project/pull/208683
2026-07-15 07:16:19 -04:00
nixpkgs-ci[bot] c45ba81144 Merge staging-next into staging 2026-07-13 12:50:29 +00:00
Tristan Ross 94ed25df38 llvmPackages_git: 23.0.0-unstable-2026-07-05 -> 23.0.0-unstable-2026-07-12 2026-07-12 19:06:20 -07:00
Grimmauld 1d05796574 treewide: openmpCheckPhaseHook -> checkPhaseThreadLimitHook 2026-07-10 00:47:02 +02:00
nixpkgs-ci[bot] ef2a4dc291 Merge master into staging-next 2026-07-07 12:49:45 +00:00
Tristan Ross 21abc45679 llvmPackages_git: 23.0.0-unstable-2026-06-28 -> 23.0.0-unstable-2026-07-05 2026-07-05 19:18:14 -07:00
nixpkgs-ci[bot] 77e66ec830 Merge master into staging-next 2026-06-29 13:30:07 +00:00
Tristan Ross 844c6a6f56 llvmPackages_git: 23.0.0-unstable-2026-06-21 -> 23.0.0-unstable-2026-06-28 2026-06-28 20:34:39 -07:00
Grimmauld 559ae88af9 llvmPackages.openmp: propagate openmpCheckPhaseHook 2026-06-26 18:42:06 +02:00
Alyssa Ross 606fc62a8e llvmPackages_22.libclc: fix eval + build (#535109) 2026-06-25 10:15:09 +00:00
Ryan Burns 4da4d4bc7b llvmPackages_22.libclc: prepare_builtins was removed in LLVM 22.1
Or more specifically, in:
https://github.com/llvm/llvm-project/commit/f07988ff3ec8b8b838f5c6ce9e1ec519e16432a9
2026-06-24 18:43:30 -07:00
nixpkgs-ci[bot] 15ac393dce Merge staging-next into staging 2026-06-22 13:54:31 +00:00
Tristan Ross c583625dd7 llvmPackages_git: 23.0.0-unstable-2026-06-14 -> 23.0.0-unstable-2026-06-21 2026-06-21 18:25:05 -07:00
nixpkgs-ci[bot] 56d55fe668 Merge staging-next into staging 2026-06-16 19:14:38 +00:00
Alyssa Ross e5e5559286 llvmPackages_22: 22.1.7 -> 22.1.8 (#532370) 2026-06-16 17:34:46 +00:00
Tristan Ross 559fe1e719 llvmPackages_22: 22.1.7 -> 22.1.8 2026-06-16 09:22:23 -07:00
nixpkgs-ci[bot] 1edac5a512 Merge staging-next into staging 2026-06-16 13:47:49 +00:00
Tristan Ross 4d8211ff1d llvmPackages_git: 23.0.0-unstable-2026-06-07 -> 23.0.0-unstable-2026-06-14 2026-06-14 21:54:54 -07:00
nixpkgs-ci[bot] 5db68cfaa0 Merge staging-next into staging 2026-06-10 13:12:00 +00:00
Alyssa Ross 0634e1e5c1 llvmPackages_git: 23.0.0-unstable-2026-05-31 -> 23.0.0-unstable-2026-… (#529346) 2026-06-10 10:16:08 +00:00
nixpkgs-ci[bot] 16753a2419 Merge staging-next into staging 2026-06-10 07:31:29 +00:00
SandaruKasa 1e688f1324 llvmPackages.bintools-unwrapped: inherit meta.teams from llvm 2026-06-09 01:06:18 +03:00
Tristan Ross e9cd46ce60 llvmPackages_git: 23.0.0-unstable-2026-05-31 -> 23.0.0-unstable-2026-06-07 2026-06-07 18:35:12 -07:00
nixpkgs-ci[bot] ad3c932e68 Merge staging-next into staging 2026-06-08 00:49:28 +00:00
Tristan Ross b3578a5bfd llvmPackages_git: 23.0.0-unstable-2026-05-24 -> 23.0.0-unstable-2026-… (#526627) 2026-06-07 23:28:40 +00:00
nixpkgs-ci[bot] 6d151c9ef3 Merge staging-next into staging 2026-06-07 18:29:16 +00:00
Philip Taron 126e9b8e25 treewide: drop some unnecessary toString calls (#527924) 2026-06-07 13:03:10 +00:00
nixpkgs-ci[bot] 40cd11208d Merge staging-next into staging 2026-06-05 18:41:13 +00:00
Robert Hensing 235013cf37 treewide: drop unnecessary toString calls
Scope:
- Combination of
  - Textual matches of "baseNameOf (toString"
  - Redundant toString calls I've found with my latest
    "lazy paths" nix branch as they force lazy fetches into
    the store. More info and new PR soon.
- Only cases I believe are worthwhile or easily determined

I've determined the validity by
- testing llvmPackages instantiation
- figuring out which types can pass into any particular
  toString call - "human fuzzy type checker"

Behavior considerations by type:

- `path`: converted back to a string *without* context
  `baseNameOf` does not copy things to the store on its own,
  equivalent to its behavior for string inputs
- `null`: converted to `""` -> may be valid input!
  ok if "" would not have been acceptable anyway
- `string` itself: passed through identically -> trivial
- `attrset` with `outPath`: same coercion as built into
  the `baseNameOf` function -> trivial
- other atomic types: generally not sensible inputs to
  `baseNameOf` -> fuzzy but true
2026-06-04 13:11:56 +02:00
Tristan Ross 69fcef5537 llvmPackages_22: 22.1.6 -> 22.1.7 2026-06-03 10:11:17 -07:00
nixpkgs-ci[bot] a0ee92dfa2 Merge staging-next into staging 2026-06-02 00:49:58 +00:00
Clément 5d26766cbf treewide: add missing meta.homepage with source git repository
Added homepage where missing, where the sources are pulled from:
- https://github.com
- https://git.sr.ht
- https://gitlab.com
- https://invent.kde.org
- https://codeberg.org
- https://gitlab.gnome.org
- https://gitlab.freedesktop.org
- https://git.FreeBSD.org
- https://salsa.debian.org
- https://git.tvdr.de
- https://git.suckless.org
2026-06-01 23:40:52 +02:00
Tristan Ross 0917fee1c3 llvmPackages_git: 23.0.0-unstable-2026-05-24 -> 23.0.0-unstable-2026-05-31 2026-05-31 22:49:57 -07:00
nixpkgs-ci[bot] 13e9f64a65 Merge staging-next into staging 2026-05-25 18:35:07 +00:00
Alyssa Ross 03c3837e3a llvmPackages_git: 23.0.0-unstable-2026-05-17 -> 23.0.0-unstable-2026-… (#523822) 2026-05-25 16:10:19 +00:00
Tristan Ross c33cc6c3dd llvmPackages_22: 22.1.5 -> 22.1.6 2026-05-24 21:38:27 -07:00
Tristan Ross cf95967217 llvmPackages_git: 23.0.0-unstable-2026-05-17 -> 23.0.0-unstable-2026-05-24 2026-05-24 17:42:06 -07:00
nixpkgs-ci[bot] f25f9861cd Merge staging-next into staging 2026-05-18 18:38:14 +00:00
Alyssa Ross cae91756d2 llvmPackages_22.libc: fix by using hdrgen unconditionally (#518990) 2026-05-18 09:45:29 +00:00
nixpkgs-ci[bot] db34c90d52 Merge staging-next into staging 2026-05-18 07:25:26 +00:00
Tristan Ross f3e9b5a2d0 llvmPackages_git: 23.0.0-unstable-2026-05-10 -> 23.0.0-unstable-2026-05-17 2026-05-17 20:42:50 -07:00
nixpkgs-ci[bot] 9bca079625 Merge staging-next into staging 2026-05-11 16:11:04 +00:00
Alyssa Ross d2a5a9c051 flang: update support and add flang-rt (#452306) 2026-05-11 14:28:54 +00:00
Xiangyan Sun be1817333d llvmPackages_22.libc: fix by using hdrgen unconditionally 2026-05-11 02:37:58 -07:00
Tristan Ross 7073f2042e llvmPackages_git: 23.0.0-unstable-2026-05-03 -> 23.0.0-unstable-2026-05-10 2026-05-10 21:29:06 -07:00
Tristan Ross 569248d0e0 llvmPackages_22: 22.1.2 -> 22.1.5 2026-05-05 12:41:53 -07:00
Acture 7e8258d3af llvm/mlir: fix MLIRConfig.cmake to support external tablegen overrides
MLIRConfig.cmake unconditionally overwrites MLIR_TABLEGEN_EXE and does
not create an imported target, breaking standalone builds that provide
their own mlir-tblgen binary (e.g. Nix sandboxed builds).

The patch adds guards to respect caller-set MLIR_TABLEGEN_EXE,
MLIR_PDLL_TABLEGEN_EXE, and MLIR_SRC_SHARDER_TABLEGEN_EXE values, and
auto-creates an imported mlir-tblgen target for downstream consumers.
This replaces the previous dummy-target workaround in flang's
CMakeLists.txt.

Upstream issue: https://github.com/llvm/llvm-project/issues/150986

Co-authored-by: Alexander Bantyev <balsoft@balsoft.ru>
2026-05-04 18:06:37 +08:00
Acture 1ba36147a8 flang: package standalone flang with LLVM 20+ driver fixes
Wire flang into llvmPackages as a first-class Fortran compiler. flang
is built standalone on top of the LLVM/clang package set rather than
bundled into the llvm derivation, with passthru metadata
(`langFortran`, `isFlang`, `isClang`, `hardeningUnsupportedFlags`) so
cc-wrapper and downstream tooling can detect and adapt to it.

Driver compatibility patches backported from upstream are applied
selectively per LLVM version:

  * `use-xflang-in-diagnostics` is applied to LLVM 20 and newer; it
    teaches the driver to suggest `-Xflang` instead of `-Xclang` in
    error messages for options only available to `flang -fc1`.
  * `warn-on-fbuiltin-and-fno-builtin` and
    `accept-and-ignore-some-gfortran-optimization-flags` are applied
    to LLVM 20 and 21 only. LLVM 22 has equivalent behaviour merged
    upstream (`warn_drv_invalid_argument_for_flang` and
    `clang_ignored_gcc_optimization_f_Group` handling in
    clang/lib/Driver/ToolChains/Flang.cpp), so the patches are skipped
    there.

Patches live under pkgs/development/compilers/llvm/21/flang/ and are
shared across versions via patches.nix. They are applied to a private
libclang variant rather than the flang source tree because standalone
flang resolves driver/option definitions through the installed libclang
package.

Two focused passthru tests are added:

  * `compile-smoke` exercises basic compilation and `@response-file`
    handling.
  * `driver-flags` covers wrapper flag isolation
    (`NIX_CFLAGS_COMPILE` must not leak into flang;
    `NIX_FFLAGS_COMPILE` must reach it), the backported driver
    diagnostics, and regression coverage for previously hard-erroring
    flags.

Build on the earlier standalone flang work by @picostove.

Co-authored-by: stove <stove@rivosinc.com>
Co-authored-by: acture <acture@gmail.com>
Co-authored-by: Alyssa Ross <hi@alyssa.is>
2026-05-04 18:06:36 +08:00