Commit Graph

41 Commits

Author SHA1 Message Date
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
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
Tristan Ross
ae92b08fd4
llvmPackages_{12,13,14,15,16,17,18,git}: use common libunwind 2024-04-11 22:54:11 -07:00
edef
725bb4e48c lib: add xor
This gets clumsily reimplemented in various places, to no useful end.
2024-04-04 19:46:58 +00:00
a-n-n-a-l-e-e
365bae4c5a
Merge pull request #295358 from SharzyL/llvm17_libunwind
llvmPackages_17.clangUseLLVM: apply omitted #220520
2024-03-27 13:34:59 -07:00
annalee
5b1b33f069
llvmPackages_{12,13,14,15,16,17,git}.libcxx: add LIBCXXABI_USE_COMPILER_RT=ON
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
2024-03-21 09:11:27 +00:00
Martin Weinelt
3321e63b12
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/sphinx-autobuild/default.nix
2024-03-19 04:00:32 +01:00
stuebinm
ff1a94e523 treewide: add meta.mainProgram to packages with a single binary
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.
2024-03-19 03:14:51 +01:00
SharzyL
555c7d1ba1
llvmPackages_17.clangUseLLVM: apply #220520 2024-03-13 00:10:59 +08:00
a-n-n-a-l-e-e
ce789e7e35
llvmPackages_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi 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
2024-03-11 03:53:37 -07:00
Philip Taron
7201396492
llvm: stop running strip-preserve-atime.test
This test fails in the presence of anti-virus software or other
intrusion-detection software that modifies the atime when run.

See nixos/nixpkgs#284056 and llvm/llvm-project#82372.
2024-03-07 06:18:50 -08:00
Weijia Wang
276b313a2b llvmPackages_git.mlir: init 2024-02-23 05:47:53 +01:00
Weijia Wang
bd1607202d
llvmPackages: move patches to proper folders (#287092)
* 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
2024-02-23 05:14:36 +01:00
John Ericson
350aae6d9b
Merge pull request #280572 from lxsameer/mlir-17
Add MLIR package to llvm 17
2024-02-22 09:41:57 -05:00
Sameer Rahmani
da2ccc5719
Update pkgs/development/compilers/llvm/17/mlir/default.nix
Co-authored-by: John Ericson <git@JohnEricson.me>
2024-02-22 10:23:17 +00:00
Sameer Rahmani
777f8c6a12
Update pkgs/development/compilers/llvm/17/mlir/default.nix
Co-authored-by: John Ericson <git@JohnEricson.me>
2024-02-22 10:22:51 +00:00
Sameer Rahmani
262ed9bd90
llvm: Add the mlir package to llvm 17 2024-02-21 14:21:02 +00:00
github-actions[bot]
8e7913be95
Merge master into staging-next 2024-02-06 00:02:21 +00:00
Weijia Wang
c086ed0613 llvmPackages_17: unbreak on x86_64-darwin 2024-01-29 16:42:08 +01:00
Robert Scott
be19273a30
Merge pull request #274089 from risicle/ris-zerocallusedregs
cc-wrapper: add `zerocallusedregs` hardening flag, add `pkgsExtraHardening` package set
2024-01-21 13:33:06 +00:00
Robert Scott
506ec38e7f cc-wrapper, clang: use new mechanism to selectively unsupport zerocallusedregs
this allows a compiler derivation to provide a
hardeningUnsupportedFlagsByTargetPlatform passthru attr
that will be called with the targetPlatform to determine
the unsupported hardening flags for that platform.

we can do this because even though a clang compiler is
multi-target by nature, cc-wrapper effectively fixes the
target platform at wrapping time. otherwise we'd have to
sniff the intended target at runtime, which wouldn't
be fun at all.

the advantage of using a new attribute instead of
allowing hardeningUnsupportedFlags to optionally be a
function is that hardeningUnsupportedFlags retains its
simple overriding pattern for simple cases (i.e.
  `(prev.hardeningUnsupportedFlags or []) ++ [ "foo" ]`
) which will continue to work as long as the bottom-most
function of hardeningUnsupportedFlagsByTargetPlatform
falls back to hardeningUnsupportedFlags.
2024-01-21 11:16:07 +00:00
github-actions[bot]
4dea63e421
Merge master into staging-next 2024-01-20 18:01:02 +00:00
Robert Scott
40868719b0 cc-wrapper: add zerocallusedregs hardening flag
this uses the value `used-gpr` which seems to be a commonly
chosen value for general use
2024-01-20 13:48:33 +00:00
Alyssa Ross
c1e6f66dc5 llvmPackages.compiler-rt: mark broken for RISC-V GCC
c33c7c3d5f ("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.
2024-01-20 13:21:24 +01:00
Ryan Lahfa
cc34adbe66
Merge pull request #280126 from lxsameer/staging
llvm: Avoid cross compiling if the build platform can execute host binaries
2024-01-12 19:25:35 +01:00
a-n-n-a-l-e-e
2ec46240ae
llvmPackages_{15,16,17,git}.libcxx: fix darwin link flags (#278945)
This change applies the upstream PR
https://github.com/llvm/llvm-project/pull/77218 so the same link flags
on darwin are used as when LIBCXX_CXX_ABI=libcxxabi. Specifically, this
adds
"-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp"
which prevents libcxx from segfaulting on darwin
2024-01-12 08:45:41 -06:00
Sameer Rahmani
a0b4b85bfa
llvm: Avoid cross compiling if the build platform can execute host binaries 2024-01-11 11:00:31 +00:00
Vladimír Čunát
8a839514de
Merge branch 'master' into staging-next 2024-01-04 15:07:44 +01:00
Semion Nadezhdin
622a03c198 llvmPackages_{14,15,16,17,git}.lldb: unify lua and python path patch 2024-01-04 11:00:25 +01:00
Bernardo Meurer
8e5a5551e8
Merge pull request #273788 from sternenseemann/llvmgold-clang-16-and-above 2023-12-22 20:06:56 -03:00
Alyssa Ross
333088006c pkgsLLVM.llvmPackages.compiler-rt: fix for RISC-V
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.
2023-12-19 11:34:37 +01:00
Ryan Lahfa
b8c38597c9
Merge pull request #269904 from willcohen/emscripten-3.1.48 2023-12-13 19:40:24 +01:00
sternenseemann
3e8355df84 llvmPackages_{16,17,git}: reenable LLVMgold plugin
See https://github.com/nixos/nixpkgs/issues/123361 for context regarding
the clang patch.

Seems like the https://github.com/llvm/llvm-project/issues/61350 crash
no longer occurs in the test suite and we can reenable the gold plugin
by default.
2023-12-12 17:36:20 +01:00
Weijia Wang
f6da64f8db llvmPackages_17.libclc: init 2023-12-12 02:28:36 +01:00
Will Cohen
a4daad0caa llvmPackages_17.lld: backport table-base patch
Starting with emscripten-3.1.46, this flag to LLVM is needed.

This is a backport of
93adcb770b.patch,
with additional review at https://reviews.llvm.org/D158892 and
emscripten-core/emscripten#20097.
2023-12-11 11:48:50 -05:00
Weijia Wang
99fa28912a llvmPackages_17: 17.0.2 -> 17.0.6 2023-12-08 16:14:54 +01:00
Tristan Ross
d6d5c8a14e
llvmPackages_17: init 2023-12-07 16:28:06 -08:00