Commit Graph

51 Commits

Author SHA1 Message Date
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
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
Artturi
1ea40b20f1
Merge pull request #268812 from Artturin/llvmdedup3 2023-11-23 21:00:27 +02:00
Artturin
8b68c650d8 llvmPackages_16.libclc: fix cross eval
libclc was moved in to the set in 223afab31f
2023-11-22 21:50:36 +02: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
e6751897e0 llvmPackages: Dedupe monorepoSrc 2023-11-21 01:46:51 +02:00
Artturin
5ac86a99e7 llvmPackages: Dedupe releaseInfo 2023-11-21 01:46:51 +02:00
Artturin
2902f99c57 llvmPackages: Dedupe llvm_meta 2023-11-21 01:46:47 +02:00
Martin Weinelt
c17ba56fe9
Merge pull request #266321 from lilyinstarlight/fix/llvm-16-wasi
[staging-next] llvmPackages: 12 -> 16 on wasm
2023-11-09 16:07:25 +01:00
Lily Foster
e58eaa0ee9
llvmPackages_{15,16}: fix libcxxabi -fno-exceptions build for wasm 2023-11-08 13:51:49 -05:00
Alyssa Ross
772a2502f1
llvmPackages_16.compiler-rt: fix FreeBSD build
The clang_rt.crt* files are only built on Linux (see the
COMPILER_RT_HAS_CRT CMake variable).
2023-11-07 10:01:10 +01:00
Vladimír Čunát
1046dc0255
Merge #263876: pkgsCross.wasi32.stdenv: fix build with LLVM 16
...into staging-next
2023-10-30 07:15:14 +01:00
K900
e6cbaa94f9 libclc: absorb into llvmPackages(16) 2023-10-28 15:26:11 +03:00
Randy Eckenrode
9b77925762
llvmPackages_16.libcxxabi: fix wasi32 build 2023-10-27 18:37:52 -04:00
Randy Eckenrode
485ae91fbf
llvmPackages_16.libcxx: fix wasi32 build 2023-10-27 18:37:51 -04:00
Randy Eckenrode
71a741517a
llvmPackages_16.compiler-rt: fix wasi32 build 2023-10-27 18:24:36 -04:00
Ryan Lahfa
8092b36db1
Merge pull request #260267 from willcohen/emscripten-3.1.47 2023-10-22 00:22:48 +01:00
Will Cohen
509feb2e9b llvmPackages_16.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
https://github.com/emscripten-core/emscripten/issues/20097.
2023-10-10 13:16:50 -04:00
Vladimír Čunát
6d408ebbe5
Merge #255706: llvmPackages_{15,16}.llvm: skip googletest-timeout lit test
...into staging
2023-09-28 08:53:52 +02:00
Artturi
6f27ba80ea
Merge pull request #255488 from natto1784/libcxxabi 2023-09-20 09:12:51 +03:00
Amneesh Singh
accafc0ed3
cc-wrapper: add libcxxabi include flag for LLVM
Removed workaround from llvm 16.

Fixes including cxxabi.h on llvm >=15 libcxxStdenv.

```c
int main() {}
```

```
/nix/store/qwnvng0cbyx0bijm654jpmpl0516hfhx-libcxxabi-15.0.7-dev/include/cxxabi.h:20:10: fatal error: '__cxxabi_config.h' file not found
```

Before llvm 15 this used to work because `libcxx` copied the headers
from `cxxabi` to it's own `include`, which was then picked up by the
line above this one

Alternative fix would be to copy all files from `${cxxabi.dev}/include/c++/v1` to `${cxxabi.dev}/include` so the cc-wrapper setup hook would pick them up, but that would depend on in cxxabi being in buildInputs.

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
2023-09-18 06:43:32 +05:30
Robert Scott
29d1e0ccbf llvmPackages_16.llvm: skip googletest-timeout lit test
timing-based tests can cause trouble on loaded or slow machines
2023-09-17 17:24:42 +01: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
Raito Bezarius
e5e3e6e4d6 llvmPackages_16.libcxxabi: fix build on Linux and Darwin
The previous fix in adc89508 broke *-linux.
2023-08-26 12:18:45 +02:00
Randy Eckenrode
adc8950856
llvmPackages_16.libcxxabi: fix build on Darwin 2023-08-24 18:28:25 -04:00
Peter Waller
6ba1b5b0b3 llvmPackages_15, llvmPackages_16: Make the pkgsLLVM.stdenv work
What changed:

* Fixed crtbeginS.o and crtendS.o missing
  (they may or may not be called crt{begin_end},{,_shared}.

* Fixed implicit function declaration causing build errors for various
  builds by supplying -Wno-implicit-function-declaration.

* Fixed __cxxabi_config.h missing, by adding -I${cxxabi}/include/c++/v1
  in the wrapper.

* Fixed libcxx failing to build due to missing libunwind symbols by
  including libunwind as a buildInput, and setting
  -DLIBCXX_ADDITIONAL_LIBRARIES=unwind for stdenv.hostPlatform.useLLVM == true.

* libcxxabi wants to find libunwind at libunwind_shared.so, so symlink
  it there in libunwind.

* llvmPackages_16.libcxxabi: Pass -nostdlib via CMAKE_*_LINKER_FLAGS

  Without this flag, the link of libcxxabi.so tries to pull in libgcc and
  friends, from the clang compiler driver.

* Drop unneeded musl hack patch from libcxx.

* Pass -Wno-error=implicit-function-declaration only to compiler-rt

  See LLVM forum discussion:

  https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213

  In summary, LLVM 16 made implicit function declaration an error. This
  happens a lot in configure scripts which can break things.

* llvmPackages_16: !isDarwin: Supply -DLIBCXX_ABI_USE_LLVM_UNWINDER=On

  Otherwise it fails with various undefined references to _Unwind_*
  functions: (full list: _Unwind_DeleteException _Unwind_GetIP
  _Unwind_GetLanguageSpecificData _Unwind_GetRegionStart
  _Unwind_RaiseException _Unwind_Resume _Unwind_SetGR _Unwind_SetIP).

* 16.libcxxabi: Only pass -nostdlib for useLLVM and Darwin builds

What was tested:

* x86_64-linux, aarch64-linux, the stdenv builds.
  * Additionally I was able to get nix to build, with an overlay to fix
    a couple of minor issues in downstream packages (overlay supplied in
    PR #246577.

* aarch64-darwin fails spuriously in a single LLVM test
  strip-preserve-atime.test checking atime timestamps.

* The same for pkgsLLVM with llvmPackages = llvmPackages_15.

Signed-off-by: Peter Waller <p@pwaller.net>
2023-08-22 17:33:24 +01:00
Randy Eckenrode
761aa9bf9f
llvmPackages_16.compiler-rt: fix static build on Darwin
This fixes two issues on Darwin to allow pkgsStatic to work with LLVM 16

* It fixes an infinite recursion where Darwin was using a regular stdenv
  to build compiler-rt instead of one without compiler-rt; and
* It disables sanitizers that won’t build statically and makes sure the
  build can find the cross-lipo.
2023-08-21 21:51:35 -04:00
github-actions[bot]
eda8cc3756
Merge master into staging-next 2023-06-24 00:02:43 +00:00
Artturi
d9a2741d79
Merge pull request #238597 from avnik/avnik/clang-fix-crosscompilation 2023-06-23 21:59:29 +03:00
Alexander V. Nikolaev
cef1efea15
clang: fix crosscompilation for 16.x 2023-06-23 13:38:12 +03:00
Ryan Lahfa
b81d4f064e
Merge pull request #235624 from willcohen/emscripten-wasm2c 2023-06-22 17:49:31 +02:00
Artturi
289d9cf8a7
Merge pull request #230387 from Artturin/llvmsplit1 2023-06-20 16:43:41 +03:00
Will Cohen
251c55700d llvmPackages_16: 16.0.1 -> 16.0.6 2023-06-18 19:35:45 -04:00
SharzyL
39cabe4c89
llvmPackages: remove extend attribute 2023-06-06 13:08:40 +08:00
Randy Eckenrode
85a7771af6 llvmPackages_16.compiler-rt: fix missing builtins
Based on c96a05a293 but for LLVM 16.
2023-06-02 08:35:43 +00:00
Artturin
d53d5a8b38 llvmPackages.lldb: deduplicate >10 2023-05-09 19:59:45 +03:00
Weijia Wang
dbea9194da
Merge pull request #229833 from wegank/llvm-darwin-hotfix
llvmPackages_16.llvm: fix postPatch on darwin
2023-05-04 13:03:42 +03:00
Weijia Wang
fd155c2a94 llvmPackages_16.llvm: avoid calling roundevenf on darwin 2023-05-04 12:59:57 +03:00
Weijia Wang
3c7fba2b0f llvmPackages_16.llvm: fix postPatch on darwin 2023-05-04 12:59:53 +03:00
misuzu
d4c2564bb6 llvmPackages_16.llvm: fix build on armv7l-linux 2023-05-04 08:55:00 +03:00