Commit Graph

216 Commits

Author SHA1 Message Date
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
Randy Eckenrode
856eb81d1f
llvmPackages_{7,8,9}.{llvm-polly,libllvm-polly}: fix build with clang 16
Same fix as https://github.com/NixOS/nixpkgs/pull/265967.
2023-11-25 16:31:12 -05: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
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
0d16a6b6a5
Merge pull request #253573 from Artturin/llvmdedup2 2023-09-06 21:15:53 +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
91089054d4 llvmPackages.bintools-unwrapped: deduplicate 2023-09-06 03:59:37 +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
SharzyL
39cabe4c89
llvmPackages: remove extend attribute 2023-06-06 13:08:40 +08: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
d93bd8e23d llvm_8: 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
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
0fd04a5918 llvmPackages.compiler-rt: enable libclang_rt.profile-....a build
Port of 94cad6ec1a ("llvm 14 compiler-rt: enable
libclang_rt.profile-....a build").
2023-03-10 12:57:55 +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
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
Alyssa Ross
6cc523ca28 lld: build with 2M stack size
Port of 6485a02fb3 ("llvm 14 lld: build with 2M stack size to fix
firefox lto").
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
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
Robert Scott
0eedcfc3f4
Merge pull request #212498 from risicle/ris-fortify3
hardening flags: add `FORTIFY_SOURCE=3` support
2023-02-16 21:19:30 +00:00
Felix Buehler
cdb39a86e0 treewide: use optionalString 2023-02-13 21:52:34 +01:00
github-actions[bot]
33919d25f0
Merge master into staging-next 2023-02-04 12:01:24 +00:00
7c6f434c
01b91d15f2
Merge pull request #207863 from patryk4815/fix-lldb
lldb_14: fix broken python3 site-packages and lua5_3
2023-02-04 08:22:08 +00:00
Sergei Trofimovich
b9a9dfc3d4 binutils: consolidate plugin-api.h support in a single
I got the plugin API support at least once incorrect. Instead of
copying the deifnition let's consolidate it within binutils itself.

While at it forward-ported changes to llvm_{13,14,15}.
The change is a no-op from rebuild perspective.
2023-01-30 22:23:36 +00:00
Sergei Trofimovich
0ba9da441d
Merge pull request #211126 from trofi/binutils-update
binutils: 2.39 -> 2.40
2023-01-29 09:50:57 +00:00
Robert Scott
74ea4fe24f llvm*Packages.clang: mark hardeningUnsupportedFlags fortify3
it's very unclear what the status of FORTIFY_SOURCE=3 support
in clang is
2023-01-24 21:52:11 +00:00
Alyssa Ross
2ae30c9f45 llvmPackages: use libcxxrt on FreeBSD
FreeBSD doesn't use LLVM's cxxabi implementation, for backwards
compatibility reasons.  Software expects the libcxxrt API when
building on FreeBSD.  This fixes the build of
pkgsCross.x86_64-freebsd.boost.
2023-01-24 21:18:39 +00:00
Alyssa Ross
ee036ed5a4 llvmPackages: don't exclude FreeBSD from -lunwind
The exception for FreeBSD was added in 0afe9d1f70 ("freebsd packages:
Init at 13.1"), but it seems to have been erroneous, as e.g. ncurses
fails to build:

	x86_64-unknown-freebsd13-clang++  -o demo ../obj_s/demo.o -L../lib -lncurses++w -L../lib -lformw -lmenuw -lpanelw -lncursesw   -lutil     -DHAVE_CONFIG_H -DBUILDING_NCURSES_CXX -I../c++ -I. -I../include  -DNDEBUG -O2  -fPIC -DPIC
	x86_64-unknown-freebsd13-ld: error: undefined symbol: _Unwind_Resume
	>>> referenced by demo.cc
	>>>               ../obj_s/demo.o:(TestApplication::run())
	>>> referenced by demo.cc
	>>>               ../obj_s/demo.o:(_GLOBAL__sub_I_demo.cc)
	>>> referenced by demo.cc
	>>>               ../obj_s/demo.o:(NCursesUserItem<UserData>::NCursesUserItem(char const*, char const*, UserData const*))
	>>> referenced 46 more times
	clang-12: error: linker command failed with exit code 1 (use -v to see invocation)

This is fixed by undoing the change, adding -lunwind on FreeBSD.
2023-01-24 21:18:39 +00:00
sternenseemann
eb4d3bc796 lib.teams.llvm: create
As a first stop towards getting a bit more organized for #171047, add a
maintainer team and add myself and John Ericson as new members. Michael
Raskin asked to be removed.

A second step could be creating a github team additionally.
2023-01-22 01:28:16 +01:00
Alyssa Ross
f5e63a0e9e bintools: add isGNU and isLLVM attributes 2023-01-20 18:35:25 +01:00
Sergei Trofimovich
8f947e417f pkgsCross.wasi32.pkgsBuildTarget.llvm_{{5,12},git}: disable gold plugin on wasi
In https://github.com/NixOS/nixpkgs/pull/211126 I simplified `binutils`
and `libbfd` derivations to follow upstream binutils build system
closer. As a result of `./configure --target=wasm32-unknown-wasi`
`binutils` does not install plugin headers by default.

This causes `pkgsCross.wasi32.llvm_12` (used by `firefox`) to fail the
build as:

    [ 81%] Building CXX object tools/gold/CMakeFiles/LLVMgold.dir/gold-plugin.cpp.o
    /build/llvm/tools/gold/gold-plugin.cpp:38:10: fatal error:
        plugin-api.h: No such file or directory
       38 | #include <plugin-api.h>
          |          ^~~~~~~~~~~~~~

The change accomodates this constraint to disable plugin support for
`wasi` targets.
2023-01-18 22:04:41 +00:00
Alyssa Ross
a5e1363258 llvmPackages.bintools: remove as -> llvm-as symlink
"llvm-as is an LLVM IR -> LLVM bitcode assembler not a system
assembler"[1], and therefore should not be linked as "as".

The "as" symlink was removed in 46e5ea5af6 ("llvm*: remove symlinks
to llvm-diff, llvm-as and associated LLVM IR utilities."), but that
was partially reverted by b331c72f03 ("llvm: setup some symlinks for
compatibility with binutils"), which restored a bunch of symlinks that
were incorrectly removed, but also incorrectly restored "as".  This
was pointed out[2] at the time but apparently never fixed.

[1]: https://github.com/NixOS/nixpkgs/issues/93523#issue-661663683
[2]: b331c72f03 (commitcomment-40981705)
2023-01-18 11:36:45 +00:00
Alyssa Ross
3d1e039332 llvmPackages.bintools-unwrapped: add missing symlinks
We were missing symlinks for some programs e.g. strings, which caused
e.g. pkgsLLVM.x264 to fail to build.

Here, I have filled in all the symlinks that LLVM would create if
built with the LLVM_INSTALL_BINUTILS_SYMLINKS option.  Where an
existing symlink's target has changed, it's to avoid a double
indirection e.g. strip -> llvm-strip -> llvm-objcopy has because just
strip -> llvm-objcopy.

There's also the related problem that we are creating a as -> llvm-as
symlink, which doesn't make sense, but I'll remove that in a
subsequent commit so that if it somehow breaks something it's easy to
revert just that change.

Fixes: https://github.com/NixOS/nixpkgs/pull/210983
2023-01-18 11:36:45 +00:00
Dmitry Kalinkin
a8f6f12879 llvmPackages_8.lldb: fix darwin build
Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
2023-01-03 01:36:48 -05:00
psondej
80d77c3d04 llvmPackages_8.lldb: enable installCheckPhase, add message 2022-12-26 19:54:07 +01:00