57 Commits

Author SHA1 Message Date
ghpzin 9ecbf0230d llvmPackages_{18,19}.mlir: fix build with gcc15
- add patch from 2 upstream commits that were not backported to llvm_18
and llvm_19:

https://github.com/llvm/llvm-project/commit/41eb186fbb024898bacc2577fa3b88db0510ba1f
Fixes build failure with gcc15:
```
In file included from /build/mlir-src-18.1.8/mlir/lib/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.cpp:9:
/build/mlir-src-18.1.8/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:31:11:
error: 'int64_t' was not declared in this scope
   31 | FailureOr<int64_t> fullyComposeAndComputeConstantDelta(Value value1,
      |           ^~~~~~~
/build/mlir-src-18.1.8/mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h:13:1:
note: 'int64_t' is defined in header '<cstdint>'; this is probably
fixable by adding '#include <cstdint>'
   12 | #include "mlir/Support/LogicalResult.h"
  +++ |+#include <cstdint>
   13 |
```

https://github.com/llvm/llvm-project/commit/101109fc5460d5bb9bb597c6ec77f998093a6687
Fixes failure with gcc15:
```
In file included from /build/mlir-src-19.1.7/mlir/lib/Target/SPIRV/Deserialization/Deserialization.cpp:9:
/build/mlir-src-19.1.7/mlir/include/mlir/Target/SPIRV/Deserialization.h:29:51:
error: 'uint32_t' was not declared in this scope
   29 | OwningOpRef<spirv::ModuleOp> deserialize(ArrayRef<uint32_t> binary,
      |                                                   ^~~~~~~~
/build/mlir-src-19.1.7/mlir/include/mlir/Target/SPIRV/Deserialization.h:18:1:
note: 'uint32_t' is defined in header '<cstdint>'; this is probably
fixable by adding '#include <cstdint>'
   17 | #include "mlir/Support/LLVM.h"
  +++ |+#include <cstdint>
   18 |
```

First patch can be applied with `fetchpatch`, but only on llvm_19, because
of changed include line right above.
So use 2 versions of combined patches with 2 commits.
2025-12-04 07:21:16 +03:00
Emily 2dac87bbde llvmPackages_17: drop 2025-09-14 19:03:24 +01:00
Emily b600d09aa1 llvmPackages.libcxx: remove code for macOS < 11 2024-11-18 00:14:00 +00:00
Tristan Ross 76f48d38f8 llvmPackages_{15,17,18,19,git}.openmp: commonify patches 2024-08-09 14:13:36 -07:00
Tristan Ross 7b4be56d9c llvmPackages_{13,15,16,17,18,19,git}.llvm: commonify patches 2024-08-09 14:11:56 -07:00
Tristan Ross f95daad5d4 llvmPackages_{13,14,15,16,17,18,19,git}.lldb: commonify patches 2024-08-09 14:09:39 -07:00
Tristan Ross 314cebce73 llvmPackages_{13,14,15,16,17,18,git}.compiler-rt: commonify patches 2024-08-09 14:06:56 -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
Tristan Ross 7a95a8948b Merge pull request #324155 from paparodeo/x64-sdk11-no-rebuilds
treewide: change various flags to allow x64 darwin to default to sdk 11.0 when ready
2024-07-08 17:19:17 -07:00
github-actions[bot] d6339576fb Merge master into staging-next 2024-07-05 18:01:19 +00:00
Tobias Mayer da06c32a5f clang_18: Upstream patch to fix an ICE
See https://github.com/llvm/llvm-project/pull/93206.

Co-authored-by: Alyssa Ross <hi@alyssa.is>
2024-07-05 16:01:01 +02:00
github-actions[bot] 9cede82051 Merge master into staging-next 2024-07-04 12:01:10 +00:00
Masum Reza 0c4a8b4f89 Merge pull request #320472 from rhelmot/freebsd-libunwind-mess
{llvm,freebsd.libcxxrt}: Sort out references to unwind functions
2024-07-04 16:43:06 +05:30
Reno Dakota 07cba9376f treewide: only access apple_sdk.sdk when sdk < 11
update code to not assume that x64 darwin uses sdk 10.12. These changes
want to reach into apple_sdk.sdk to grab a header file which is only
required for sdk 10.12.
2024-07-03 00:03:59 +00:00
Martin Weinelt 2096642430 Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
- pkgs/os-specific/windows/mingw-w64/default.nix
2024-06-23 19:09:00 +02:00
Yueh-Shun Li eb572c420d clang-tools: move into llvmPackages 2024-06-23 01:34:26 +05:30
github-actions[bot] 61f347aa76 Merge staging-next into staging 2024-06-20 06:01:23 +00:00
Tristan Ross 599b8ebad1 llvmPackages_18: 18.1.7 -> 18.1.8 2024-06-18 18:10:40 -07:00
Artemis Tosini f76271c4df llvm: Don't use libunwind on FreeBSD
Native builds on nixpkgs FreeBSD always use llvm's libc++ as the
C++ standard library, with libcxxrt and "libgcc" from the FreeBSD tree
providing lower level ABI functions.

However, the cross LLVM stdenv assumed that we wanted libunwind instead
of libgcc. As libgcc headers are already in FreeBSD's libc, some C++
functions failed with duplicate header errors.

Disable all references to libunwind in libcxx on FreeBSD and the LLVM
cross stdenvs for FreeBSD.
2024-06-17 00:35:55 -07:00
Peter Waller 40a7f218c5 llvmPackages_{12,13,14,15,16,17,18,git}: Allow overriding dependencies
... consistently.

Further to #307211, allow overriding arguments through llvmPackages.override.

This makes it possible to override any dependency of LLVM or
clang by overriding it on `llvmPackages.override { <dependency> = ...; }`.

This is useful in development or customization where sometimes it is
desirable to turn features on or off.

Without this patch the only way to for example override ncurses was to
do `overriddenLLVM = llvmPackages.llvm.override { ncurses }`, but then
you would have to thread `overriddenLLVM` as dependencies into clang and
other packages, which results in quite a difficult expression to write
correctly in cross compilation scenarios.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-06-16 20:25:26 +01:00
Artturin 23b617791c Merge pull request #307211 from pwaller/llvm-simplify-arg-passthrough
llvmPackages_{12,13,14,15,16,17,18,git}: Simplify argument passthrough
2024-06-16 14:29:45 +03:00
Tristan Ross b31140ab08 llvmPackages_18: 18.1.6 -> 18.1.7 2024-06-05 20:42:42 -07:00
Reno Dakota 30d42ba569 Revert "llvmPackages.clang: Fix special-case for OpenBSD to be less special"
This reverts commit 222a29eb53.
2024-05-30 05:07:41 +00:00
Reno Dakota 8110970af9 Revert "llvmPackages.libcxx: Fix compiling for OpenBSD"
This reverts commit 0c6d2eee3c.
2024-05-30 05:07:41 +00:00
John Ericson 61c678f71e Merge pull request #311836 from obsidiansystems/aa-openbsd-1
openbsd: init at 7.5
2024-05-29 13:42:32 -04:00
AMS21 48d0c1cdfc llvmPackages_18: 18.1.5 -> 18.1.6 2024-05-27 11:50:48 +02:00
John Ericson 0c6d2eee3c llvmPackages.libcxx: Fix compiling for OpenBSD 2024-05-26 10:55:15 -04:00
John Ericson 222a29eb53 llvmPackages.clang: Fix special-case for OpenBSD to be less special 2024-05-26 10:55:15 -04:00
Peter Waller 8164fd64c9 llvmPackages_{12,13,14,15,16,17,18,git}: Simplify argument passthrough
This patch is not intended to introduce any functional change. drvPaths
should remain unchanged; if they do change, it's a bug.

Prior to this patch, a set of packages gets passed through from the
llvmPackages top level function to the individual packages via
callPackages, which is a newScope constructed with some specific
arguments.

As it stands this makes it harder to override dependencies of LLVM; for
example take ncurses. If you want to override it, it is an argument to
libllvm, however, if you override libllvm you then have to write a lot
of code to have correctly overridden clang, given how llvmPackages is
previously composed (out of tools and libraries).

Instead, I propose to make sure that all the dependencies of all
llvmPackages are listed as an inputs to the top leve llvmPackages,
and then the resulting newScope will contain all of them. This in
turn will make `llvmPackages.override` work as expected for any
input to each of the llvm packages.

We'll achieve this by first simplifying the code a bit and ensuring that
all arguments to llvmPackage get forwarded to all packages (via
`{}@args`).

This represents a chance to simplify things a bit so I propose doing it
in two steps:

1. This patch: Simplify argument pass through.
2. (Later): Ensure all arguments to each llvm package are listed in the
   top level `llvm/X/default.nix`.

Once the second patch lands, this means that `(llvmPackages.override {
ncurses = myncurses; }).clang` would consist of a clang whose libllvm
had the ncurses overridden. This is not the case prior to this patch.

Signed-off-by: Peter Waller <p@pwaller.net>
2024-05-25 11:43:26 +01:00
AMS21 31c5675041 llvmPackages_18: 18.1.4 -> 18.1.5 2024-05-04 19:15:56 +02:00
github-actions[bot] 24c668d7e0 Merge master into staging-next 2024-04-29 00:02:23 +00:00
Tristan Ross ba69cd4eb4 llvmPackages_18: 18.1.3 -> 18.1.4 2024-04-28 20:17:09 +02:00
github-actions[bot] 9c36f57e91 Merge staging-next into staging 2024-04-22 06:01:32 +00:00
Randy Eckenrode 99df680e03 llvmPackages_{12,13,14,15,16,17,18,git}: use fixpoint instead of rec
Currently, overriding llvmPackages.libllvm doesn’t work correctly. The
original version of libllvm will also be built because it is referenced
by libclang. Switching to the fixpoint allows the override to be
propagated to clang as expected. This will be needed for future Darwin
stdenv bootstrap improvements.
2024-04-21 20:52:37 -04:00
github-actions[bot] 8354618bb8 Merge staging-next into staging 2024-04-14 20:49:56 +00:00
github-actions[bot] b7dcef0598 Merge master into staging-next 2024-04-14 20:49:29 +00:00
Weijia Wang b174ea6192 llvmPackages_18: drop an orphaned file 2024-04-14 18:56:19 +02:00
Tristan Ross 2941e51966 llvmPackages_{12,13,14,15,16,17,18,git}: use common llvm 2024-04-13 19:57:49 -07:00
Weijia Wang 2d0506704b Merge branch 'master' into staging-next 2024-04-14 04:55:27 +02:00
Tristan Ross dc4d5c2193 llvmPackages_{12,13,14,15,16,17,18,git}: use common clang 2024-04-13 19:01:42 -07:00
Weijia Wang f3a1652b09 Merge branch 'master' into staging-next 2024-04-13 19:10:53 +02:00
Weijia Wang e65e742588 Merge pull request #303449 from ExpidusOS/feat/llvm-git-commonify-libcxx
llvmPackages_{12,13,14,15,16,17,18,git}: use common libcxx
2024-04-13 16:31:35 +02:00
Weijia Wang 8a26b55947 Merge pull request #303479 from ExpidusOS/feat/llvm-git-commonify-compiler-rt
llvmPackages_{12,13,14,15,16,17,18,git}: use common compiler-rt
2024-04-13 16:31:02 +02:00
github-actions[bot] 5a301eda67 Merge master into staging-next 2024-04-13 00:02:05 +00:00
Tristan Ross 782fc2ebac llvmPackages_{12,13,14,15,16,17,18,git}: use common libcxx 2024-04-12 15:50:13 -07:00
Tristan Ross 1572ec6bb1 llvmPackages_{12,13,14,15,16,17,18,git}: use common lld 2024-04-12 13:57:50 -07:00
Weijia Wang ded11d6ffe Merge pull request #303447 from ExpidusOS/feat/llvm-git-commonify-libunwind
llvmPackages_{12,13,14,15,16,17,18,git}: use common libunwind
2024-04-12 22:55:30 +02:00
Weijia Wang 792acac153 Merge pull request #303448 from ExpidusOS/feat/llvm-git-commonify-openmp
llvmPackages_{12,13,14,15,16,17,18,git}: use common openmp
2024-04-12 22:47:24 +02:00
Tristan Ross 312264686e llvmPackages_{12,13,14,15,16,17,18,git}: use common compiler-rt 2024-04-12 13:38:29 -07:00
Tristan Ross 8c71431f14 llvmPackages_{12,13,14,15,16,17,18,git}: use common openmp 2024-04-12 07:22:03 -07:00