Commit Graph

191 Commits

Author SHA1 Message Date
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
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
Alyssa Ross
126229f810
llvm: disable libpfm on all non-Linux platforms
libpfm is Linux-specific, it should be disabled on e.g. FreeBSD as
well as Darwin.
2022-12-09 19:08:16 +00:00
Martin Weinelt
fe8eef1ae4 Merge remote-tracking branch 'origin/master' into staging-next 2022-12-04 22:06:42 +01:00
Sandro
cb170c2cfc
Merge pull request #193004 from ShamrockLee/clang-mainprogram 2022-12-04 20:01:46 +01:00
Vladimír Čunát
9ab35fe3ad
Merge #201268: libcxx: link correct libcxxabi version
...into staging
2022-11-28 10:00:21 +01:00
github-actions[bot]
e31b8a36d7
Merge staging-next into staging 2022-11-23 00:02:46 +00:00
Josh Channings
2252245f92 llvm: Find otool bin from targetPrefix
This is to fix the stdenvBootstrapTools issue where otool & others are
not available in PATH, but only under the targetPrefix.
2022-11-22 21:37:47 +00:00
Artturi
006c56abc4
Merge pull request #197674 from squalus/openmp-cross
openmp: fix cross compile
2022-11-22 23:29:54 +02:00
Josh Channings
252ea6511d libcxxabi: Skip dylib fixups for version symlinks
Apart from being a no-op, this seems to cause the install to make a
copy, rather than keeping the symlinks intact.
2022-11-22 19:22:18 +00:00
Josh Channings
67f11a2185 libcxx: Link libc++.dylib to matching libc++abi.dylib
Same adjustment as made for libc++abi in #185766, for the same reason:
the unamended dylib links to the libc++abi in the build stdenv, which
is the wrong version.

Tested on Darwin with LLVM 14 stdenv, but the phase is added to all
versions, including 11 - so this will cause a mass rebuild.

See: https://github.com/NixOS/nixpkgs/pull/185766
2022-11-22 19:22:18 +00:00
7c6f434c
5559f2b772
Merge pull request #199844 from vincentbernat/fix/git-clang-format
llvmpackages: patch shebangs for python subpackages
2022-11-15 21:41:58 +00:00
Vincent Bernat
ad5aecbb6b llvmpackages: patch shebangs for python subpackages
Notably, "git-clang-format" fails with:

    /usr/bin/env: ‘python’: No such file or directory
2022-11-06 12:56:47 +01:00
John Ericson
0afe9d1f70 freebsd packages: Init at 13.1
Always set `SRCTOP`, set it with abs path

llvmPackages: Bump minimum version for FreeBSD

llvmPackages_*, libgcc, compiler_rt: Hack in enough libs that one can compiler C

freebsd.compat: Rename some things to work around cc-wrapper change

0bea4a194f / #191724 in particular
2022-11-04 16:50:26 -04:00
squalus
4b07aeae16 openmp: fix cross compile 2022-10-24 23:47:27 -07:00
Artturin
7e49471316 treewide: optional -> optionals where the argument is a list
the argument to optional should not be list
2022-10-10 15:40:21 +03:00
toonn
6a132cf2f3
Merge pull request #185766 from stephank/fix/libcxxabi
libcxxabi: remove link with build libcxxabi
2022-10-05 12:58:32 +02:00
Shamrock Lee
8afdfd9e64 clang: specify meta.mainProgram 2022-09-23 01:55:21 +08:00
Bernardo Meurer
ee33222938
Merge pull request #188540 from OPNA2608/fix/llvm-parallel-tests
llvm*: Fix core usage & remove progress bar in tests
2022-09-07 12:29:53 -03:00
OPNA2608
bd332c848c llvm*: Don't show progress bar on tests
Since the progress bar results in large output that is broken due to the use of
ncurses and we already use the flag that gives verbose output on test failures,
let's just disable the progress bar.
2022-09-03 18:38:44 +02:00
OPNA2608
6c6f4a9724 llvm*: Fix core usage in tests
lit (LLVM Integrated Tester) [0] by default uses as many threads as the build host
has cores, ignoring the user's core settings for the build.
This passes the configured core count on to lit, along with LLVM's default
settings for it which we otherwise override in the process [1].

[0]: https://www.llvm.org/docs/CommandGuide/lit.html
[1]: 329fda39c5/llvm/CMakeLists.txt (L559-L565)
2022-09-03 17:20:46 +02:00
Stéphan Kochen
96e4a0f05c libcxxabi: remove link with build libcxxabi 2022-08-26 17:02:11 +02:00
John Ericson
dbc5a792a2 llvmPackages*.libunwind: Don't redo install phase from scratch
I can't think of any good reason it was the way it was before. I think
CMake can be made to install the headers too, but this is a fine first
step.
2022-08-18 00:10:08 -04:00
sternenseemann
0083a683d7 Revert "llvmPackages: do not include static archives when shared…"
Reverts #162607 / 1748887ff2.

Reason for revert: This change caused llvm-config{,-native} to be unable
to find static archives bundled with LLVM, as has been [reported]. Ever
since #152944 using moveToOutput in LLVM is _evil_ because llvm-config
obtains it knowledge about the installation locations from the CMake
configure step.

Consequently a change like #162607 will need to be implemented by making
LLVM itself install the static archives to the correct location or by
adding yet another patch which updates llvm-config's knowledge of the
location. The latter is not desireable in my opinion, though, since it
is just asking for this sort of trouble: Before #152944 we had an
outputs.patch that did this sort of things which broke spectacularly in
edge cases.

Fixes #148117.

[reported]: https://github.com/NixOS/nixpkgs/issues/148117#issuecomment-1158245576
2022-07-05 15:03:12 +02:00
Rick van Schijndel
0b45cae8a3
treewide: pkgs/development/compilers: mark broken for darwin 2022-05-30 13:41:09 +02:00
Lassulus
a1780e4b7d
Merge pull request #162607 from waldheinz/libllvm-drop-static
llvmPackages/libllvm: do not include static archives when shared is r…
2022-04-08 19:39:18 +01:00