Commit Graph

2326 Commits

Author SHA1 Message Date
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
Acture
324f837bf1 flang-rt: add runtime package
Add a standalone derivation for LLVM's flang-rt runtime libraries
(libFortranRuntime, libFortranDecimal). flang-rt is a runtimes-style
package: building it requires running a working flang binary at *build*
time, but the produced libraries are linked into derivations targeting
the *host*.

The runtime is therefore wired up using `buildFlang`, sourced from
`buildLlvmPackages.flang-unwrapped` so that the build-platform flang
(spliced via the LLVM package set) compiles the runtime, while the
resulting libraries are still produced for the host platform. This
mirrors the existing `buildLlvmTools.tblgen` / `buildLlvmPackages.tblgen`
pattern used elsewhere in the LLVM package set.

`unwrapped` rather than the wrapped flang is used because flang-rt's
CMake glue invokes the compiler directly and does not need (or want)
Nix's cc-wrapper resource-dir and rpath plumbing during the runtime
build.

flang-rt only consumes LLVM's CMake helpers and the build-time flang;
it does not link against MLIR or libclang, so neither MLIR_DIR nor
CLANG_DIR is passed and the unused empty `dev` output is omitted.

Co-authored-by: stove <stove@rivosinc.com>
Co-authored-by: acture <acture@gmail.com>
2026-05-04 18:06:35 +08:00
Acture
6014579a95 clang, cc-wrapper: make wrapper flang-aware
Build on the initial LLVM Flang wrapper work by exposing the needed clang passthru and teaching cc-wrapper about flang-specific flag handling.

Co-authored-by: stove <stove@rivosinc.com>
Co-authored-by: acture <acture@gmail.com>
Co-authored-by: Emily <hello@emily.moe>
Co-authored-by: Philip Taron <philip.taron@gmail.com>
2026-05-04 18:05:42 +08:00
Alyssa Ross
8150c3151e llvmPackages_git: 23.0.0-unstable-2026-04-19 -> 23.0.0-unstable-2026-05-03 (#513861) 2026-05-04 08:09:29 +00:00
Tristan Ross
0dc14b72b3 llvmPackages_git: 23.0.0-unstable-2026-04-19 -> 23.0.0-unstable-2026-05-03 2026-05-03 21:13:12 -07:00
R. Ryantm
2debdbcd54 llvmPackages.lldbPlugins.llef: 2.2.3 -> 2.2.4 2026-05-01 13:49:20 +00:00
Alyssa Ross
48f3c768d1 llvmPackages_git: 23.0.0-unstable-2026-04-05 -> 23.0.0-unstable-2026-04-19 (#509468) 2026-04-21 14:42:13 +00:00
Tristan Ross
54827df441 llvmPackages_git: 23.0.0-unstable-2026-04-05 -> 23.0.0-unstable-2026-04-19 2026-04-19 19:43:21 -07:00
jopejoe1
baf97485d9 llvm: make use of compound licenses 2026-04-19 12:25:57 +02:00
Ben Wolsieffer
bf224aefe9 llvm: fix version >=20 on armv6l
We were removing a test that failed on armv6l. In LLVM 20, this test was
moved to a different directory, causing the build to fail. It is not
clear if the test still needs to be removed after this reorganization,
and I don't have hardware that can do a native armv6l build of LLVM.
2026-04-18 22:08:50 -04:00
Tristan Ross
8c84a28cfc llvmPackages_git: 23.0.0-unstable-2026-03-29 -> 23.0.0-unstable-2026-04-05 2026-04-05 20:40:16 -07:00
Tristan Ross
e8ab81d7b5 llvmPackages_git: 23.0.0-unstable-2026-03-22 -> 23.0.0-unstable-2026-03-29 2026-03-29 21:13:53 -07:00
Philip Taron
08a57c5745 llvmPackages_22: 22.1.0-rc3 -> 22.1.2 (#493742) 2026-03-29 00:28:09 +00:00
Tristan Ross
424d615351 llvmPackages_22: 22.1.0-rc3 -> 22.1.2 2026-03-28 09:19:15 -07:00
Tristan Ross
3d72d08288 llvmPackages_git: 23.0.0-unstable-2026-03-15 -> 23.0.0-unstable-2026-03-22 2026-03-22 22:51:58 -07:00
nixpkgs-ci[bot]
e185a81fe3 Merge master into staging-next 2026-03-16 18:21:07 +00:00
Tristan Ross
4bd7a7855f llvmPackages_git: 23.0.0-unstable-2026-03-02 -> 23.0.0-unstable-2026-03-15 2026-03-15 21:54:10 -07:00
nixpkgs-ci[bot]
23ee7d594c Merge master into staging-next 2026-03-14 00:21:49 +00:00
Silvan Mosberger
9ae65c847f teams/security-review: init and add as maintainer (#496902) 2026-03-13 18:41:21 +00:00
nixpkgs-ci[bot]
4f1c61e545 Merge master into staging-next 2026-03-13 18:11:40 +00:00
Alyssa Ross
3491f67382 clang-tools: Respect $CLANGD_FLAGS in wrapper (#498874) 2026-03-13 16:26:10 +00:00
Eike Foede
b9ea8c2256 clang-tools: Respect $CLANGD_FLAGS in wrapper
clangd can take arguments also via environment variable CLANGD_FLAGS.
This has to be respected in the wrapper, which checks whether a
--query-driver was provided.
2026-03-12 11:53:22 +01:00
nixpkgs-ci[bot]
28b363b0ae Merge master into staging-next 2026-03-07 12:08:06 +00:00
Alyssa Ross
f38814b27d llvmPackages.lldbPlugins.llef: 2.2.2 -> 2.2.3 (#494846) 2026-03-07 08:24:20 +00:00
Alyssa Ross
c60ba578a0 llvmPackages_git: 23.0.0-unstable-2026-02-23 -> 23.0.0-unstable-2026-03-02 (#495686) 2026-03-07 08:11:55 +00:00
Alyssa Ross
b25485cb71 compiler-rt: enable build of libatomic (#488265) 2026-03-07 07:57:37 +00:00
Alexander Bantyev
2839911e81 various: add security-review team as a maintainer
Adds the @NixOS/security-review team as a maintainer to multiple
packages deemed to be important security-wise.

For the motivation of the package list, see:
https://github.com/NixOS/nixpkgs/issues/494349#issuecomment-4005099033
2026-03-05 15:19:44 +01:00
Tristan Ross
b2aacfefd8 llvmPackages_git: 23.0.0-unstable-2026-02-23 -> 23.0.0-unstable-2026-03-02 2026-03-02 20:34:32 -08:00
R. Ryantm
c4500bedb9 llvmPackages.lldbPlugins.llef: 2.2.2 -> 2.2.3 2026-02-27 15:34:17 +00:00
nixpkgs-ci[bot]
fa073e0e32 Merge staging-next into staging 2026-02-25 18:24:25 +00:00
Alyssa Ross
e24a364eea lldb_22: fix install (#493774) 2026-02-25 16:35:23 +00:00
Matthias Ahouansou
034613e2bb lldb_22: fix install
It broke due to the extension package.json being moved to a subdirectory
2026-02-25 13:00:53 +00:00
nixpkgs-ci[bot]
98bcc882ce Merge staging-next into staging 2026-02-25 12:15:16 +00:00
Alyssa Ross
fcbdef1ded llvmPackages_git: 23.0.0-unstable-2026-02-15 -> 23.0.0-unstable-2026-02-23 (#493219) 2026-02-25 10:21:30 +00:00
Tristan Ross
711f40ddd7 llvmPackages_git: 23.0.0-unstable-2026-02-15 -> 23.0.0-unstable-2026-02-23 2026-02-24 09:32:38 -08:00
nixpkgs-ci[bot]
323165562d Merge staging-next into staging 2026-02-22 12:09:00 +00:00
nixpkgs-ci[bot]
085a49826d Merge master into staging-next 2026-02-22 12:08:22 +00:00
Theo Paris
4f7aa89ec9 llvmPackages.libc: fix building for embedded targets
Signed-off-by: Theo Paris <theo@theoparis.com>
Change-Id: I5e842dccd5c2c388477b8405e1eb3f2d6a6a6964
2026-02-21 15:56:32 -08:00
Alyssa Ross
9882525c43 clang-tools: add python tools like clang-format-diff to clang-tools (#444818) 2026-02-21 15:30:22 +00:00
Michael Daniels
cdb47d5b88 Merge branch 'staging-next' into staging 2026-02-17 19:55:41 -05:00
Fabián Heredia Montiel
d80b1bccd5 Merge remote-tracking branch 'origin/master' into staging-next 2026-02-17 12:29:41 -06:00