Commit Graph

143 Commits

Author SHA1 Message Date
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
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
SharzyL
810cef75ba
llvmPackages_*.clangUseLLVM: add libunwind to lib search path 2024-01-13 11:16:58 +08: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
Weijia Wang
eb5334c27d Merge branch 'master' into staging-next 2024-01-03 03:22:40 +01:00
Bernardo Meurer
8e5a5551e8
Merge pull request #273788 from sternenseemann/llvmgold-clang-16-and-above 2023-12-22 20:06:56 -03:00
Weijia Wang
6afc8c2675 lldb_14: fix broken bindings again 2023-12-22 04:13:15 +01: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
sternenseemann
6db6c6df7b llvmPackages_*: update name for LLVMgold patch for clang >= 11
It no longer applies to clang >= 16, let's make the name correspond to
the versions it applies to.
2023-12-12 16:49:07 +01:00
Artturin
b59fd202d7 llvmPackages: Remove dead code
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 4badff49fd

There are no uses of `@` therefore these changes are safe.
2023-11-21 02:05:15 +02:00
Artturin
c1e1a583a0 llvmPackages_{13,14}: Use releaseInfo and monorepoSrc
Doing the same thing as was done in the initial adding of `monorepoSrc` to `llvmPackages_15` d231d18e4a
2023-11-21 01:46:51 +02:00
Artturin
2902f99c57 llvmPackages: Dedupe llvm_meta 2023-11-21 01:46:47 +02:00
Sandro Jäckel
fccf04b620 treewide: replace -DCMAKE_BUILD_TYPE in cmakeFlags with cmakeBuildType 2023-09-08 14:18:26 +00:00
github-actions[bot]
204bfce523
Merge staging-next into staging 2023-09-07 00:02:49 +00:00
Artturi
de42a231a4
Merge pull request #236203 from SharzyL/llvm_no_extend 2023-09-06 23:44:14 +03:00
Artturi
872e54e9e7
Merge pull request #253533 from Artturin/llvmusesuball 2023-09-06 21:17:12 +03:00
Artturi
0d16a6b6a5
Merge pull request #253573 from Artturin/llvmdedup2 2023-09-06 21:15:53 +03:00
Artturin
d7d68a1a04 llvmPackages.lldb: remove unnecessary inherit
release_version is provided with callPackage
2023-09-06 20:23:43 +03:00
Artturin
ea946c7423 llvmPackages.libcxxabi: dedupe wasm.patch
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
```
2023-09-06 19:16:28 +03:00
Artturin
91089054d4 llvmPackages.bintools-unwrapped: deduplicate 2023-09-06 03:59:37 +03:00
Artturin
9809024653 llvmPackages.lldb: use substituteAll 2023-09-06 01:05:32 +03:00
7c6f434c
1e8f4ab411
Merge pull request #191801 from ShamrockLee/clang-python-scan-view
clang-unwrapped: mv {$out,$python}/share/scan-view/*.py
2023-07-18 14:18:49 +00:00
Artturi
289d9cf8a7
Merge pull request #230387 from Artturin/llvmsplit1 2023-06-20 16:43:41 +03:00
SharzyL
39cabe4c89
llvmPackages: remove extend attribute 2023-06-06 13:08:40 +08:00
Artturin
d53d5a8b38 llvmPackages.lldb: deduplicate >10 2023-05-09 19:59:45 +03:00
github-actions[bot]
54295bf976
Merge staging-next into staging 2023-05-08 18:02:09 +00:00
fetsorn
91e7191660 llvm: fix typos
"verion" -> "version"
2023-05-08 21:05:07 +04:00
Alyssa Ross
7a9443a4fe llvm_14: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
2839c94f1e pkgsLLVM.stdenv: use clangNoLibc when libc is null
clangNoLibc always uses LLVM bintools, so it still has the useLLVM
semantics.
2023-04-28 10:01:22 +00:00
Alyssa Ross
3e0cb1ab7d compiler-rt: use -ffreestanding when no libc
This fixes building for x86_64-windows with no libc (for UEFI).
Otherwise, it would try to include a malloc header.
2023-04-28 10:01:22 +00:00
7c6f434c
b66eafcaab
Merge pull request #205176 from lopsided98/compiler-rt-armv6
compiler-rt: fix build on ARMv6
2023-03-13 16:46:04 +00:00
github-actions[bot]
590fb73d67
Merge staging-next into staging 2023-03-11 00:03:08 +00:00
Alyssa Ross
8c70bfb9f2
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
	pkgs/development/libraries/librsvg/default.nix
	pkgs/development/python-modules/r2pipe/default.nix
2023-03-10 18:46:21 +00:00
Alyssa Ross
3816765e47 llvm: add in a missing check dep
Port of 6d0c87602f ("llvmPackages_15.llvm: add in a missing check
dep").

I did not include the sysctl nativeCheckInputs change from that
commit, as it looks like it was included by mistake and was supposed
to be in c7231c0b6d ("llvmPackages_15.llvm: run the tests on macOS").
I've also included the doCheck default from that commit (without the
change to run on non-Linux), as 6d0c87602f just set it to true.
2023-03-10 12:21:12 +00:00
Alyssa Ross
c5f758174b clang: drop the C++ std version -DCMAKE_CXX_FLAG
Port of 404ef6b6c9 ("llvmPackages_15.clang: drop the C++ std version
`-DCMAKE_CXX_FLAG`").  The commit mentioned as removing the need for
the override[1] first appeared in LLVM 10.

[1]: 2724d9e129
2023-03-10 09:36:21 +00:00
Alyssa Ross
b27cf6ace4 llvm_14,llvmPackages_git.llvm: enable polly by default
Port of 2a58596dd2 ("llvmPackages_15.llvm: enable polly by default").

It should be ported all the back to LLVM 12, but I haven't done that
here because going further back than 14 requires fixing patches, and
I'm focused on my goal of getting the delta between LLVM 15 and LLVM
git under control — it's going to be hard enough to accomplish that.
2023-03-10 09:18:14 +00:00
Ben Wolsieffer
98ebcd28e1 compiler-rt: fix build on ARMv6
compiler-rt has accumulated several regressions that prevent it from building
on ARMv6. It is important to note that there are two major versions of ARMv6:
base ARMv6 and ARMv6K. ARMv6K includes several important new instructions,
such as non-word size atomic operations (ldrexd, strexd, etc.) and the yield
instruction. Most ARMv6 CPUs actually implement ARMv6K, including all those used
in Raspberry Pis, but nixpkgs' "raspberryPi" platform targets base ARMv6.

compiler-rt versions 8-14 fail to build on ARMv6 and ARMv6K. compiler-rt 15 (not
yet in nixpkgs) builds on ARMv6K but not ARMv6. This patch fixes versions 9-14
on both ARMv6 variants. The patches don't apply cleanly to version 8, and I
figured it wasn't worth carrying another version of the patches for such an old
version.

A total of five patches are required to get compiler-rt building on ARMv6:
* armv6-mcr-dmb.patch: use `mcr` to provide the equivalent of `dmb` on ARMv6.
  Included in LLVM 15.
* armv6-sync-ops-no-thumb.patch: prevent certain atomic operation functions
  from using Thumb mode. Included in LLVM 15.
* armv6-no-ldrexd-strexd.patch: don't use ldrexd or strexd, which are not
  available in base ARMv6. Submitted upstream by me.
* armv6-scudo-no-yield.patch: use nop instead of yield on ARMv6 in standalone
  scudo. Required by versions >=13, since they enable standalone scudo.
  Submitted upstream by me.
* armv6-scudo-libatomic.patch: link standlone scudo to libatomic on ARMv6 (and
  any other platforms that need it). Not yet submitted because the backport is
  a bit different from the upstream version and I need to test it.
2023-03-08 14:27:35 -05:00
Alyssa Ross
a10d676199
llvm: tighten platforms
LLVM can't be built for all architectures supported by Nixpkgs (s390,
and for some versions m68k and RISC-V).
2023-03-03 13:45:14 +00:00
Rahul Butani
b06ac37f38 llvmPackages*.clang_manpages: drop the sphinx find_package patch
This is a backport of f8cbbdd05b.

LLVM versions >= 5.0.0 already look for sphinx when `LLVM_ENABLE_SPHINX`
is enabled: ea139eccc1
2023-03-02 12:34:33 +00:00
Alyssa Ross
1db7f30d1f lld: explain why we change the stack size on Musl
Suggested-by: Rahul Butani <rrbutani@users.noreply.github.com>
2023-02-28 10:56:53 +00:00
github-actions[bot]
51c18e4be1
Merge staging-next into staging 2023-02-28 06:01:38 +00:00
Robert Hensing
359a46e751 llvm*: Remove outputSpecified workaround where possible
The effect of `.out // { outputSpecified = false; }` in these cases
is to select the default output explicitly, but then make the
selection implicit until `overrideAttrs` is called. Previously
`overrideAttrs` would not preserve output selection, masking the
apparently unnecessary behavior of this workaround.

For `libllvm-polly`, this logic does not apply, as it does not
select the default output.

The `outputSpecified` workaround was introduced in
https://github.com/NixOS/nixpkgs/pull/122554

and was perhaps rushed because of a release deadline, and expected
delays from mass rebuilds.

The change in `overrideAttrs` behavior was added in
5b2f597b11 / https://github.com/NixOS/nixpkgs/pull/211685

and the problem was discovered in https://github.com/NixOS/nixpkgs/pull/218537,
which may contain further information.
2023-02-28 00:34:00 +00:00
Alyssa Ross
eb2eafd2af clang_13,clang_14,clang_git: deduplicate patch
The same patch applies to all Clang versions using it.
2023-02-26 13:40:24 +00:00
github-actions[bot]
3cdd771820
Merge staging-next into staging 2023-02-23 18:01:49 +00:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
Artturin
6f6cc4a22d treewide: use toString on list NIX_CFLAGS_COMPILE
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper
2023-02-22 21:23:04 +02:00