Commit Graph

1314 Commits

Author SHA1 Message Date
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
23375e8231 llvmPackages_15.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
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]
d987b47512
Merge master into staging-next 2023-09-08 06:00:58 +00:00
Rahul Butani
0251e2645a llvmPackages_15.libcxx: fix the generated linker script
See:
 - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432
 - 57c7bb3ec8
 - https://reviews.llvm.org/D133566

We can drop this patch in `llvmPackages_16`.

Fixes #214524.
2023-09-08 05:41:29 +03: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
1d620bec20 llvmPackages.lldb: deduplicate git 2023-09-06 20:23:43 +03:00
Artturin
3b16ddfda7 llvmPackages.clang: dedupe purity.patch 5-8
found with fdupes

```
pkgs/development/compilers/llvm/8/clang/purity.patch
pkgs/development/compilers/llvm/5/clang/purity.patch
pkgs/development/compilers/llvm/6/clang/purity.patch
pkgs/development/compilers/llvm/7/clang/purity.patch
```
2023-09-06 19:16:28 +03:00
Artturin
079fa2f075 llvmPackages.compiler-rt: dedupe codesign.patch 7-12
found with fdupes

```
pkgs/development/compilers/llvm/8/compiler-rt/codesign.patch
pkgs/development/compilers/llvm/10/compiler-rt/codesign.patch
pkgs/development/compilers/llvm/12/compiler-rt/codesign.patch
pkgs/development/compilers/llvm/9/compiler-rt/codesign.patch
pkgs/development/compilers/llvm/7/compiler-rt/codesign.patch
pkgs/development/compilers/llvm/11/compiler-rt/codesign.patch
```
2023-09-06 19:16:28 +03:00
Artturin
ac62f864ca llvmPackages.libcxxabi: dedupe no-threads.patch
found with fdupes

```
pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch
pkgs/development/compilers/llvm/10/libcxxabi/no-threads.patch
pkgs/development/compilers/llvm/9/libcxxabi/no-threads.patch
pkgs/development/compilers/llvm/11/libcxxabi/no-threads.patch
```
2023-09-06 19:16:28 +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
627bb740a9 llvmPackages.bintools-unwrapped: use targetPrefix for variable name like binutils does
and run nixpkgs-fmt
2023-09-06 03:59:38 +03:00
Artturin
91089054d4 llvmPackages.bintools-unwrapped: deduplicate 2023-09-06 03:59:37 +03:00
Artturin
e9bc0852c1 llvmPackages.lldb: hash changing post-deduplication changes
Use ninja for 14 too, fails for <14.
2023-09-06 03:08:18 +03:00
Artturin
9809024653 llvmPackages.lldb: use substituteAll 2023-09-06 01:05:32 +03:00
Raito Bezarius
6d6210ee9b llvmPackages_git.libcxxabi: fix build on Linux and Darwin
The previous fix in db0c2564 broke *-linux.
2023-08-26 12:18:45 +02: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
Raito Bezarius
56bb8b73a6 llvmPackages_15.libcxxabi: fix build on Linux and Darwin
The previous fix in 314584b2 broke *-linux.
2023-08-26 12:18:45 +02:00
Randy Eckenrode
db0c256417
llvmPackages_git.libcxxabi: fix build on Darwin 2023-08-24 18:28:34 -04:00
Randy Eckenrode
adc8950856
llvmPackages_16.libcxxabi: fix build on Darwin 2023-08-24 18:28:25 -04:00
Randy Eckenrode
314584b222
llvmPackages_15.libcxxabi: fix build on Darwin 2023-08-24 18:28:16 -04:00
Peter Waller
044e8c4e44 llvmPackages_git: Port stdenv fix for cxx-headers
Signed-off-by: Peter Waller <p@pwaller.net>
2023-08-22 17:34:16 +01: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
Theodore Ni
174e4f41b4
Merge pull request #247066 from reckenrode/compiler-rt-static
llvmPackages_16.compiler-rt: fix static build on Darwin
2023-08-21 19:36:50 -07: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]
0542af4e29
Merge master into staging-next 2023-08-04 00:02:04 +00:00
Jan Malakhovski
5852f26bdc treewide: noop: refer to src.name or similar in sourceRoot where appropriate, part 1: trivial cases 2023-08-03 16:32:03 +00: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
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
github-actions[bot]
8b9041779d
Merge staging-next into staging 2023-06-20 18:01:51 +00:00
Artturi
289d9cf8a7
Merge pull request #230387 from Artturin/llvmsplit1 2023-06-20 16:43:41 +03:00
Sergei Trofimovich
cc5c495706
Merge pull request #234957 from trofi/llvm-gcc-13-fix
llvm_{10..13}: backport gcc-13 fixes
2023-06-20 08:02:00 +01: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
Sergei Trofimovich
899eccf612 llvm_{10..13}: backport gcc-13 fixes
Without the change `llvm` build fails on `gcc-13` fails as:

    [  0%] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.o
    In file included from llvm/lib/Support/Signals.cpp:14:
    llvm/include/llvm/Support/Signals.h:119:8: error: variable or field 'CleanupOnSignal' declared void
      119 |   void CleanupOnSignal(uintptr_t Context);
          |        ^~~~~~~~~~~~~~~
2023-05-30 09:00:54 +01:00
Kira Bruneau
f44f437676
Merge pull request #232279 from kira-bruneau/llvmPackages_rocm
llvmPackages_rocm.llvm: build on big-parallel
2023-05-16 16:43:23 -04:00
Kira Bruneau
0aee301acb llvmPackages_rocm.llvm: build on big-parallel
All other LLVM packages run on big-parallel, so we should be
consistent when building the ROCm fork.
2023-05-16 14:12:02 -04:00
github-actions[bot]
b5b52a946a
Merge staging-next into staging 2023-05-09 18:02:32 +00:00
Artturin
d53d5a8b38 llvmPackages.lldb: deduplicate >10 2023-05-09 19:59:45 +03:00