Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
... 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>
|
|
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>
|
|
|
|
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.
|
|
|
|
|
|
llvmPackages_{12,13,14,15,16,17,18,git}: use common libcxx
|
|
llvmPackages_{12,13,14,15,16,17,18,git}: use common compiler-rt
|
|
|
|
|
|
llvmPackages_{12,13,14,15,16,17,18,git}: use common libunwind
|
|
llvmPackages_{12,13,14,15,16,17,18,git}: use common openmp
|
|
|
|
|
|
|
|
This gets clumsily reimplemented in various places, to no useful end.
|
|
since https://github.com/NixOS/nixpkgs/pull/292043 libcxxabi is built
using the same compiler wrapper as libcxx and thus uses the
`-rtlib=compiler-rt`. Adding the `LIBCXXABI_USE_COMPILER_RT=ON` at build
time ensures that the compiler-rt libraries provided at link time
resolving symbol errors for aarch64 pkgLLVM.libcxx build
https://hydra.nixos.org/build/253162977
|
|
Conflicts:
- pkgs/development/python-modules/sphinx-autobuild/default.nix
|
|
The nixpkgs-unstable channel's programs.sqlite was used to identify
packages producing exactly one binary, and these automatically added
to their package definitions wherever possible.
|
|
into libcxx (#292043)
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548 https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again
This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)
### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.
### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx
### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override
https://github.com/NixOS/nixpkgs/pull/292043
|
|
|
|
|
|
* llvmPackages: move clang-*-LLVMgold-path.patch to common/clang
* llvmPackages: move exegesis-force-bdver2.patch to 9/llvm
* llvmPackages: move llvm-config-link-static.patch to common/llvm
* llvmPackages: move TLI-musl.patch to common/llvm
* llvmPackages: move libcxx-0001-musl-hacks.patch to common/llvm
|
|
This fixes the tests of numba on aarch64-linux.
|
|
cc-wrapper: add `zerocallusedregs` hardening flag, add `pkgsExtraHardening` package set
|
|
|
|
this uses the value `used-gpr` which seems to be a commonly
chosen value for general use
|
|
c33c7c3d5fa9 ("clang_11: Fix RISC-V builds for compiler-rt. (#135718)")
already marked tihs as broken for LLVM 11, but didn't apply the same
change to other affected LLVM versions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
compiler-rt includes <linux/unistd.h> on RISC-V. This only seems to
be necessary for useLLVM, but looking at the source code I can't
see any reason for that, so probably in the non-useLLVM case it just
gets propagated in.
|
|
It no longer applies to clang >= 16, let's make the name correspond to
the versions it applies to.
|
|
for hygiene
Run `deadnix . --edit`
`gccForLibs` is an argument used by multi.nix but it's an argument to
cc-wrapper, not to llvmPackages.
`@args` in `llvm/default.nix` was accidentally added in 4badff49fda90fba01684d2f19c31442688252b4
There are no uses of `@` therefore these changes are safe.
|
|
Doing the same thing as was done in the initial adding of `monorepoSrc` to `llvmPackages_15` d231d18e4aa5e1d00f86b4f484f9e4344538e3ea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
release_version is provided with callPackage
|
|
found with fdupes
```
pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/13/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/14/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/10/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/15/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/12/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/9/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/16/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/git/libcxxabi/wasm.patch
pkgs/development/compilers/llvm/11/libcxxabi/wasm.patch
```
|
|
|
|
|