Commit Graph

1353 Commits

Author SHA1 Message Date
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
Adam Joseph
62794bf2bb wrapClangMulti: link include/c++ into gcc_multi_sysroot
The phoney gcc that we construct for multilib was missing the
`$out/include/c++` directory which `cc-wrapper` needs to pass as an
`-isystem` to `clang`.

Closes #221891
2023-05-09 00:16:24 -07:00
Adam Joseph
c02c5f0860 wrapClangMulti: set gcc_multi_sysroot.langCC
The phoney gcc that we construct for multilib was missing the
`langCC` attribute, which `cc-wrapper` needs in order to decide
whether or not to add gcc's `libstdc++` headers as an `-isystem` for
`clang`.
2023-05-09 00:16:24 -07:00
Adam Joseph
0e9ef0a07d cc-wrapper: when merging gcc32 and gcc64, merge libgcc as well
Our gcc_multi and glibc_multi expressions merge together a
32-bit-targeted and 64-bit-targeted gcc.  However they do not thread
through the passthru.libgcc from these merged gccs.

This commit corrects that.

It also extends passthru.libgcc to allow a *list* rather than just a
single outpath.

Resolves part of #221891 (at least getting it back to the error
message it gave before).
2023-05-09 00:16:24 -07: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
github-actions[bot]
cfd87655c8
Merge staging-next into staging 2023-05-05 18:01:52 +00:00
github-actions[bot]
c0860aa88a
Merge master into staging-next 2023-05-05 18:01:12 +00:00
Domen Kožar
6cf7bb9998
Merge pull request #225197 from stephank/feat/swift58
swift: 5.7.3 -> 5.8
2023-05-05 13:58:07 +01:00
github-actions[bot]
519b94e7dd
Merge staging-next into staging 2023-05-04 12:02:09 +00:00
github-actions[bot]
bf19e21376
Merge master into staging-next 2023-05-04 12:01:18 +00: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
github-actions[bot]
ffc1ef23bc
Merge staging-next into staging 2023-05-04 00:03:03 +00:00
github-actions[bot]
9546b65417
Merge master into staging-next 2023-05-04 00:02:30 +00:00
Michael Weiss
b8960cd250
Merge pull request #223282 from RaitoBezarius/llvmPackages_16
llvmPackages_16: init
2023-05-03 23:56:51 +02:00
Alyssa Ross
ad10899abf llvm_5: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
12d4b4ad2f llvm_6: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
f6b5061108 llvm_7: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
d93bd8e23d llvm_8: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
768007c210 llvm_9: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
fe65411847 llvm_10: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
2a859f5366 llvm_11: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
45093ead78 llvm_12: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
0bcf8ae82b llvm_13: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
7a9443a4fe llvm_14: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
776ba7a410 llvm_15: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Alyssa Ross
83d1459330 llvmPackages_git.llvm: backport patch for musl 1.2.4 2023-05-03 09:37:13 +00:00
Stéphan Kochen
c96a05a293 llvmPackages_15.compiler-rt: fix missing builtins
Darwin-specific builtins were present on x86-64-darwin, but not on
aarch64-darwin. This is the same issue as #186575, but while the fixes
were correctly applied to LLVM 15, we were still disabling the build of
builtins on aarch64-darwin. Likely just a confusion.
2023-04-30 15:03:19 +02:00
github-actions[bot]
b4cc17e044
Merge staging-next into staging 2023-04-30 06:01:51 +00:00
github-actions[bot]
a996545f31
Merge master into staging-next 2023-04-30 06:01:07 +00:00
Sandro
39da9b3c34
Merge pull request #225281 from networkException/deprecate-omahaproxy 2023-04-30 02:20:37 +02: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
networkException
7b9110eba4
llvm: use versionhistory.googleapis.com over omahaproxy.appspot.com
Version information previously available at omahaproxy.appspot.com will
have to be retrieved from versionhistory.googleapis.com in the future.

See https://groups.google.com/a/chromium.org/g/chromium-dev/c/uH-nFrOLWtE/m/PhUj_inyAQAJ
See https://github.com/ungoogled-software/ungoogled-chromium/pull/2260
2023-04-21 21:36:35 +02:00
github-actions[bot]
3fb2e4810a
Merge staging-next into staging 2023-04-20 00:02:45 +00:00
github-actions[bot]
e3d1e50acd
Merge master into staging-next 2023-04-20 00:02:04 +00:00
Ryan Lahfa
df7e6764f2
Merge pull request #222903 from rrbutani/fix/llvm-git-openmp-cross
llvmPackages_git.openmp: apply #197674 (fix cross compile)
2023-04-20 00:45:07 +02:00
Ryan Lahfa
01a6895df7
Merge pull request #222902 from rrbutani/fix/llvm-git-disable-libpfm
llvmPackages_git: apply #205355 (disable libpfm on non-Linux)
2023-04-20 00:44:32 +02:00
Ryan Lahfa
89e48962e3
Merge pull request #223255 from NixOS/llvmPackages_git.libcxx-tests
llvmPackages_git.libcxx: LLVM15 changes and libcxxrt on FreeBSD
2023-04-20 00:43:28 +02:00
Adam Joseph
2e77eb8190 clang_15: fix build!=(host==target) cross compilation
clang_15 appears to not cross compile in the build!=(host==target)
case due to two problems, which this commit fixes:

- It trips -Wmaybe-uninitialized on recent gcc, but only in the
  build!=host case (likely due to #ifdefs)

- Two more buildPlatform tools have been added:
  clang-tidy-confusable-chars-gen and clang-pseudo-gen

Co-authored-by: Rahul Butani <rrbutani@users.noreply.github.com>
2023-04-19 01:06:08 +00:00
github-actions[bot]
a851087ffa
Merge staging-next into staging 2023-04-18 00:02:42 +00:00
Rahul Butani
98182aec04 llvmPackages_git: unstable-2022-26-07 → 15.0.7
bumping `llvmPackages_git` to match `llvmPackages_15`; this will let us
continuing bringing `llvmPackages_git` to parity with `llvmPackages_15`
without needing to invest time and effort into getting the current
llvmPackages_git's commit's test suite to pass under all the platforms,
etc.

this will also allow us to begin diffing derivations between
`llvmPackages_15` and `llvmPackages_git` as a way of tracking down
remaining differences between the package sets
2023-04-17 20:10:41 +00:00
Rahul Butani
a77eef2bb9 llvmPackages_git: expose the release information and monorepo source as overridable args
backport of d231d18e4a from #194634
(llvmPackages_15)
2023-04-17 20:10:41 +00:00
Rahul Butani
4917dc751c llvmPackages_git.llvm: add checks for the LLVM version
this is a backport of 8afa321b8a
from #194634 (llvmPackages_15)
2023-04-17 20:10:41 +00:00
Vladimír Čunát
f2186222c6
Merge #225846: cc-wrapper: deunify clang/gcc handling of -B
...into staging
2023-04-16 09:59:54 +02:00
Ryan Lahfa
dde4134fae
Merge pull request #223256 from NixOS/llvmPackages_git.compiler-rt
llvmPackages_git.compiler-rt: disable iPhone simulator
2023-04-15 19:49:08 +02:00
Adam Joseph
6f8a69ee31 Revert "llvmPackages_13.compiler-rt-libc: also apply tmp hack"
This reverts commit 9bf18e069e.
2023-04-12 10:26:24 -07:00
Adam Joseph
15e2a735f8 Revert "cc-wrapper: add optional temporary hack for -B"
This reverts commit ac3acd956f.
2023-04-12 10:26:23 -07:00
Vladimír Čunát
9bf18e069e
llvmPackages_13.compiler-rt-libc: also apply tmp hack
This part got forgotten in commit ac3acd956f.
2023-04-12 11:26:19 +02:00
Vladimír Čunát
ac3acd956f
cc-wrapper: add optional temporary hack for -B
This fixes parts in llvmPackages_{13,rocm}
e.g. build .clang for testing.
Longterm mass-rebuild fix should come in PR #225846
2023-04-12 09:37:24 +02:00
Raito Bezarius
2c627d9c70 llvmPackages_16: init 2023-04-10 10:47:45 +02:00
Someone Serge
378c0c6983
python3Packages.openai-triton: init at 2.0.0 2023-04-08 02:46:54 +03:00
Rahul Butani
6707fa4056 llvmPackages_git.compiler-rt: fixes for Darwin
Partial port of 00839fea22
("llvmPackages_15.compiler-rt: fixes for Darwin")

see: https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272116014
2023-04-05 17:29:36 +02:00
Raito Bezarius
92bf933890 llvmPackages_git.libcxx: remove preInstall phase for Darwin
This has not been added for `llvmPackages_15.libcxx`, therefore, we do not need
it anymore.
2023-04-05 17:27:24 +02:00
Rahul Butani
5fbf2cd1a0 llvmPackages_git: apply #211230 to llvmPackages_git
Port of 4fabcf4945 ("llvmPackages_15:
apply #211230 to llvmPackages_15").

See the comments here for context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r1089389188

Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
2023-04-05 17:26:52 +02:00
Rahul Butani
2e453ee51b llvmPackages_git.libcxxabi: fix cycles that arise when stdenv is the LLVM stdenv
Port of 8db72e3b7e
("llvmPackages_15.libcxxabi: fix cycles that arise when `stdenv` is the
LLVM stdenv").
2023-04-05 17:26:20 +02:00
Rahul Butani
18d9f16d0a llvmPackages_git.libcxx: updates from LLVM15
Port of bc4dbee115 ("llvmPackages_15:
updates for LLVM 15").

None of the patches required any touch-up; the only change of note is:
  - due to changes in the libc++/libc++abi build
    (https://reviews.llvm.org/D120719 and https://reviews.llvm.org/D131037)
    we have to add an extra build option to the libc++ header only
    build that sidesteps bits of the libc++ build config that assume
    libc++-abi is present in the build:
    4f827318e3/libcxx/src/CMakeLists.txt (L255-L256)

Rather than maintaining a precise set of build options that let us dodge
referencing libc++-abi variables in the libc++ header only build, we set
`LIBCXX_CXX_ABI` to `none`, as suggested by @lovesegfault.

More discussion about this here: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r990267037

Co-authored-by: Bernardo Meurer <bernardo@meurer.org>
2023-04-05 17:25:12 +02:00
Rahul Butani
61b348f0c6
llvmPackages_git.openmp: apply #197674 (fix cross compile)
this was backported to `llvmPackages_15` in
81ef82a029
2023-04-03 10:36:54 -05:00
Rahul Butani
75fed51e18
llvmPackages_git: apply #205355 (disable libpfm on non-Linux)
this was applied to `llvmPackages_15` in 81ef82a029
(though I appear to have forgotten to mention it in the commit message...)
2023-04-03 10:33:05 -05:00