Commit Graph

1347 Commits

Author SHA1 Message Date
github-actions[bot]
adec6862c5
Merge master into staging-next 2023-03-24 18:01:06 +00:00
R. Ryantm
e33b761b1d llvmPackages_rocm.llvm: 5.4.3 -> 5.4.4 2023-03-24 07:19:57 +00:00
7c6f434c
b66eafcaab
Merge pull request #205176 from lopsided98/compiler-rt-armv6
compiler-rt: fix build on ARMv6
2023-03-13 16:46:04 +00:00
Alyssa Ross
4ffa52ebdf llvmPackages_git.libcxx: use clang from git instead of the stdenv's compiler
Port of ca59a201ca ("llvmPackages_15.libcxx: use clang 15 instead of
the stdenv's compiler").
2023-03-11 22:44:31 +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
John Ericson
975e73668f
Merge pull request #219356 from alyssais/llvm-platforms
llvm: tighten platforms
2023-03-10 08:33:29 -05: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
c5f758174b clang: drop the C++ std version -DCMAKE_CXX_FLAG
Port of 404ef6b6c9 ("llvmPackages_15.clang: drop the C++ std version
`-DCMAKE_CXX_FLAG`").  The commit mentioned as removing the need for
the override[1] first appeared in LLVM 10.

[1]: 2724d9e129
2023-03-10 09:36:21 +00:00
Alyssa Ross
b27cf6ace4 llvm_14,llvmPackages_git.llvm: enable polly by default
Port of 2a58596dd2 ("llvmPackages_15.llvm: enable polly by default").

It should be ported all the back to LLVM 12, but I haven't done that
here because going further back than 14 requires fixing patches, and
I'm focused on my goal of getting the delta between LLVM 15 and LLVM
git under control — it's going to be hard enough to accomplish that.
2023-03-10 09:18:14 +00:00
Ben Wolsieffer
98ebcd28e1 compiler-rt: fix build on ARMv6
compiler-rt has accumulated several regressions that prevent it from building
on ARMv6. It is important to note that there are two major versions of ARMv6:
base ARMv6 and ARMv6K. ARMv6K includes several important new instructions,
such as non-word size atomic operations (ldrexd, strexd, etc.) and the yield
instruction. Most ARMv6 CPUs actually implement ARMv6K, including all those used
in Raspberry Pis, but nixpkgs' "raspberryPi" platform targets base ARMv6.

compiler-rt versions 8-14 fail to build on ARMv6 and ARMv6K. compiler-rt 15 (not
yet in nixpkgs) builds on ARMv6K but not ARMv6. This patch fixes versions 9-14
on both ARMv6 variants. The patches don't apply cleanly to version 8, and I
figured it wasn't worth carrying another version of the patches for such an old
version.

A total of five patches are required to get compiler-rt building on ARMv6:
* armv6-mcr-dmb.patch: use `mcr` to provide the equivalent of `dmb` on ARMv6.
  Included in LLVM 15.
* armv6-sync-ops-no-thumb.patch: prevent certain atomic operation functions
  from using Thumb mode. Included in LLVM 15.
* armv6-no-ldrexd-strexd.patch: don't use ldrexd or strexd, which are not
  available in base ARMv6. Submitted upstream by me.
* armv6-scudo-no-yield.patch: use nop instead of yield on ARMv6 in standalone
  scudo. Required by versions >=13, since they enable standalone scudo.
  Submitted upstream by me.
* armv6-scudo-libatomic.patch: link standlone scudo to libatomic on ARMv6 (and
  any other platforms that need it). Not yet submitted because the backport is
  a bit different from the upstream version and I need to test it.
2023-03-08 14:27:35 -05: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
Martin Weinelt
0580d85143 Merge remote-tracking branch 'origin/staging-next' into staging 2023-03-03 04:46:31 +01:00
Alyssa Ross
9bfc5871c1 llvmPackages_15.compiler-rt: drop codesign patch
This was added in 00839fea22 ("llvmPackages_15.compiler-rt: fixes for Darwin"),
which says:

> this introduces a codesigning related patch that we can drop once
> #195107 goes through

The referenced PR ("sigtool: 0.1.2 → 0.1.3") has now been merged, so
I'm dropping the patch as instructed.
2023-03-02 12:36:21 +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
Alyssa Ross
ed209e6279 clang_15: mark hardeningUnsupportedFlags fortify3
Port of 74ea4fe24f ("llvm*Packages.clang: mark
hardeningUnsupportedFlags fortify3").
2023-02-28 10:53:33 +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
Alyssa Ross
60a2f64123 llvmPackages_git: switch to using ninja
Port of 912056c71e ("llvmPackages_15: switch to using `ninja`").
2023-02-27 16:11:48 +00:00
Alyssa Ross
fe1c338510 llvmPackages_git: expand the NIX_BUILD_CORES arg passed to lit at configure time
Port of 4d3857d6ed ("llvmPackages_15: expand the `NIX_BUILD_CORES`
arg passed to lit at configure time").
2023-02-27 16:11:48 +00:00
Alyssa Ross
4040a6d131 llvmPackages_git.compiler-rt: fix Glibc build
Copied from LLVM 15.
2023-02-27 10:56:20 +00:00
Alyssa Ross
e731fba414 llvmPackages_git.compiler-rt: fix armv7l patch
Use the same patch as compiler-rt 15.
2023-02-27 10:56:20 +00:00
Alyssa Ross
1e26d33371 clang_15: add nostdlibinc flag
Port of 44165d3657 ("llvmPackages_{14, git}.clang: add nostdlibinc flag")
to Clang 15.  It was originally thought this wasn't needed[1], but it is,
to fix expressions like the following:

	with import ./. {};

	llvmPackages_15.libcxxStdenv.mkDerivation {
	  name = "libcxx-stdenv-c++-test";

	  dontUnpack = true;

	  input = ''
	    #include <cstdlib>

	    int main() {
	        std::abort();
	        return 0;
	    }
	  '';
	  passAsFile = [ "input" ];

	  installPhase = ''
	    $CXX -c -o $out -x c++ $inputPath
	   '';
	}

[1]: https://github.com/NixOS/nixpkgs/pull/194634#issue-1398202534
2023-02-26 13:40:24 +00:00
Alyssa Ross
eb2eafd2af clang_13,clang_14,clang_git: deduplicate patch
The same patch applies to all Clang versions using it.
2023-02-26 13:40:24 +00:00
Jan Tojnar
9bb986284f Merge branch 'staging-next' into staging
# Conflicts:
#	pkgs/development/python-modules/mdp/default.nix
#	pkgs/top-level/python-aliases.nix
2023-02-26 01:13:37 +01:00
Weijia Wang
4333d4f1e6
Merge pull request #215338 from r-ryantm/auto-update/llvmPackages_rocm.llvm
llvmPackages_rocm.llvm: 5.4.2 -> 5.4.3
2023-02-24 20:46:43 +02:00
github-actions[bot]
6a1e9345c0
Merge staging-next into staging 2023-02-24 05:07:48 +00:00
Alyssa Ross
f9afd57302 Revert "llvmPackages_15: update licenses"
This reverts commit 386aba3115.

As I understand it from reading
<https://llvm.org/docs/DeveloperPolicy.html#copyright-license-and-patents>,
the structure of LLVM licensing is as follows:

 - They're in the process of relicensing to Apache-2.0 WITH LLVM-exception,
   but they haven't got permission to relicense all the code yet.
   This means that some of the code can be used under the new license,
   but not all of it, and it's difficult to know which is which.  This
   license is therefore probably not useful yet, until the relicensing
   effort is commit.

 - While the relicensing effort is ongoing, code being contributed to
   LLVM has to have permission to be used under the old and new
   licensing schemes.  Since the new licensing scheme can't be used
   for all code yet, it only makes sense to use LLVM's code under the
   old licensing scheme at the moment.

 - The old licensing scheme is that code for the LLVM components we
   care about is all available under the NCSA license, and some
   components are optionally available under a different license,
   usually the MIT license, instead.

So I think we should go back to just listing NCSA, or NCSA/MIT, and
forget about the new license until it actually becomes useful,
i.e. LLVM's relicensing effort is complete.
2023-02-24 00:06:46 +00:00
github-actions[bot]
3cdd771820
Merge staging-next into staging 2023-02-23 18:01:49 +00:00
Alyssa Ross
7ce8e7c4cf lib.licenses.asl20-llvm: replace llvm-exception
LLVM-exception only makes sense when used with the Apache 2.0 license,
so let's combine them, so it's not possible to forget one of them like
happened with llvm_15.
2023-02-23 17:42:15 +00:00
Alyssa Ross
af0078a3dd llvmPackages_git.bintools: fix eval
Was probably missed because llvmPackages_git is only evaluated as an
alias.

Fixes: cdb39a86e0 ("treewide: use optionalString")
2023-02-23 13:14:08 +01: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
github-actions[bot]
ba877c4755
Merge staging-next into staging 2023-02-19 06:02:10 +00:00
Yureka
e27be43360
llvm_15: reenable libclang_rt.profile-....a build on musl (#217042)
This was lost because of a bad merge
2023-02-19 01:38:31 +01: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
R. Ryantm
ac49f34fe8 llvmPackages_rocm.llvm: 5.4.2 -> 5.4.3 2023-02-08 16:16:28 +00: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
Rahul Butani
d231d18e4a
llvmPackages_15: expose the release information and monorepo source as overridable args
this makes it easier for users to use their own LLVM in nixpkgs
2023-01-27 14:51:38 -08:00
Rahul Butani
8afa321b8a
llvmPackages_15.llvm: add checks for the LLVM version
this is in preparation for the next commit which exposes the release
information and monorepo source as overridable args (which makes it
easier for users to use their own LLVM in nixpkgs)

this commit only adds a check in the `llvm` package's postConfigure that
makes sure the LLVM source provided matches the version we were given;
the actual machinery (functionally just a cosmetic change; causes no
rebuilds) is in the next commit
2023-01-27 14:51:12 -08:00
Rahul Butani
386aba3115
llvmPackages_15: update licenses
Context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r1073157093

All the subprojects seem to be uniformly licensed under NCSA and the
LLVM license now (with the exception of openmp which has an additional
Intel license that doesn't seem to be in SPDX?); see:
 - https://github.com/llvm/llvm-project/blob/llvmorg-15.0.7/compiler-rt/LICENSE.TXT
 - https://github.com/llvm/llvm-project/blob/llvmorg-15.0.7/libcxx/LICENSE.TXT
 - https://github.com/llvm/llvm-project/blob/llvmorg-15.0.7/libcxxabi/LICENSE.TXT
 - https://github.com/llvm/llvm-project/blob/llvmorg-15.0.7/openmp/LICENSE.TXT
2023-01-27 13:29:23 -08:00
Rahul Butani
f8cbbdd05b
llvmPackages_15: misc fixes, notes 2023-01-27 13:29:23 -08:00
Rahul Butani
8f16b4be50
llvmPackages_15.openmp: add a missing darwin check dependency
the tests still don't all pass so `doCheck` is still disabled
2023-01-27 13:29:23 -08:00
Rahul Butani
404ef6b6c9
llvmPackages_15.clang: drop the C++ std version -DCMAKE_CXX_FLAG
Context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r1085220705
2023-01-27 13:29:23 -08:00
Rahul Butani
3436075b2a
llvmPackages_15.llvm: specify some deps explicitly to fix cross-compilation
The two scenarios described within where splicing doesn't handle
selecting the right package for us are observable in the following
(nix repl session):
```
> np = import <nixpkgs> { system = "x86_64-linux"; crossSystem = { config = "aarch64-linux"; }; }

> np.__splicedPackages.hello ? __spliced
true

> np.__splicedPackages.python3Packages.psutil ? __spliced
true

> np.__splicedPackages.python3.pkgs.psutil ? __spliced
false

> (np.__splicedPackages.python3.withPackages (ps: with ps; [psutil])) ? __spliced
false
```

See: #211340
2023-01-27 13:29:23 -08:00
Rahul Butani
5e5ed7d816
llvmPackages_15.llvm: disable some RISC-V ZBP tests on arm32
see this thread for context: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999790443

Co-authored-by: misuzu <bakalolka@gmail.com>
2023-01-27 13:29:23 -08:00
Rahul Butani
eafb8fbd32
llvmPackages_15.llvm: fix the tests on x86_64-darwin
Details within but ultimately there isn't a satisfying resolution for
any of the three test failures we were seeing and all three deserve
further exploration.

For the `sw_vers` macOS version issue in particular, it's possible to
observe the nixpkgs provided `CoreFoundation` vs system `CoreFoundation`
for `x86_64` and `aarch64` like so (on a host running macOS `13.0.1`):

```console
$ nix-shell -p darwin.DarwinTools --system aarch64-darwin --command "sw_vers"
ProductName:    macOS
ProductVersion: 13.0.1
BuildVersion:   22A400

$ nix-shell -p darwin.DarwinTools --system x86_64-darwin --command "sw_vers"
ProductName:    Mac OS X
ProductVersion: 10.16
BuildVersion:   22A400
```

Where `/System/Library/CoreServices/SystemVersion.plist` has:
```console
$ cat /System/Library/CoreServices/SystemVersion.plist | grep ProductVersion
-A 1
	<key>ProductVersion</key>
	<string>13.0.1</string>
```

Further:
```console
$ nix-shell -p darwin.DarwinTools --system aarch64-darwin --command 'otool -L $(which sw_vers)'
/nix/store/nb2q33ak2zif49ndcpc6m823z0vhmy8y-DarwinTools-1/bin/sw_vers:
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1770.255.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.60.1)

$ nix-shell -p darwin.DarwinTools --system x86_64-darwin --command 'otool -L $(which sw_vers)'
/nix/store/88v4kjvgwl71byfpvd0baviiq7l5appc-DarwinTools-1/bin/sw_vers:
	@rpath/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1454.90.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
```

For the `x86_64` `sw_vers` binary we can see rpath:
```console
$ nix-shell -p darwin.DarwinTools --system x86_64-darwin --command 'otool -l $(which sw_vers)' | grep LC_RPATH -A 2 -B 1
Load command 13
          cmd LC_RPATH
      cmdsize 120
         path /nix/store/zvr4wypbgskhhw9cawfn7mmxfa75nh8f-swift-corefoundation-unstable-2018-09-14/Library/Frameworks (offset 12)
```

And we can confirm that the nixpkgs provided `CoreFoundation` is what
ultimately gets loaded:
```console
$ nix-shell -p darwin.DarwinTools --system x86_64-darwin --command 'DYLD_PRINT_LIBRARIES=1 sw_vers'
dyld[16215]: <no uuid> /nix/store/88v4kjvgwl71byfpvd0baviiq7l5appc-DarwinTools-1/bin/sw_vers
dyld[16215]: <no uuid> /nix/store/zvr4wypbgskhhw9cawfn7mmxfa75nh8f-swift-corefoundation-unstable-2018-09-14/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
dyld[16215]: <no uuid> /nix/store/xd2a4xh8kdwq0j67hzgw720npdw5hzkk-ICU-66108/lib/libicucore.A.dylib
<snipped>
```

```bash
nix-diff \
    $(nix path-info nixpkgs#legacyPackages.aarch64-darwin.darwin.DarwinTools --derivation) \
    $(nix path-info nixpkgs#legacyPackages.x86_64-darwin.darwin.DarwinTools --derivation)
```
doesn't show any _obvious_ discrepancies
2023-01-27 13:29:22 -08:00
Rahul Butani
0ee52512f0
llvmPackages_15.llvm: adjust a path, skip an xfail test on darwin 2023-01-27 13:29:22 -08:00
Rahul Butani
c7231c0b6d
llvmPackages_15.llvm: run the tests on macOS
there are a few parts to this:
  - adding darwin specific check deps
  - working around referencing LLVM dylibs during the checkPhase in a
    way that supports darwin
    + previously we just set `$LD_LIBRARY_PATH` and/or made some
      strategic symlinks
    + now we have LLVM's `lit` config set the appropriate env vars as
      needed (as is done for other LLVM subprojects)
    + in retrospect switching to `installCheckPhase` might have been the
      better move..
  - patching `lit` to deal with `$DYLD_LIBRARY_PATH` being purged for
    new "protected" processes

more details within.
2023-01-27 13:29:22 -08:00
Rahul Butani
6d0c87602f
llvmPackages_15.llvm: add in a missing check dep 2023-01-27 13:29:22 -08:00
Rahul Butani
2a58596dd2
llvmPackages_15.llvm: enable polly by default
this comment has a more complete history: https://github.com/NixOS/nixpkgs/pull/194634#discussion_r1064089830

in short: polly was disabled in the llvm 11 -> llvm 12 copy, mostly by
accident

most of the Polly install dirs patch has been upstreamed; one change
remains
2023-01-27 13:29:22 -08:00
Rahul Butani
4d3857d6ed
llvmPackages_15: expand the NIX_BUILD_CORES arg passed to lit at configure time
this previously worked because, when using Make, this variable was
expanded at build time
2023-01-27 13:29:22 -08:00
Rahul Butani
912056c71e
llvmPackages_15: switch to using ninja 2023-01-27 13:29:22 -08:00
Rahul Butani
19d1571ee4
llvmPackages_15.lldb: fix the manpages 2023-01-27 13:29:22 -08:00
Rahul Butani
b4ee532f36
llvmPackages_15.lldb: fix the build on i686
as detailed within, adding `asm/ptrace.h` leads to `asm/ptrace-abi.h`
being included which defines preprocessor symbols that clash with
identifiers used in the LLVM headers (`FS` and `CS` only defined on
i686)
2023-01-27 13:29:22 -08:00
Rahul Butani
1d3ca42323
llvmPackages_15.lldb: fix lldb on x86_64 macOS
See:
https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
2023-01-27 13:29:22 -08:00
Rahul Butani
d7299071d4
llvmPackages_15.compiler-rt: gate the libxcrypt dep on plat.libc == "glibc"
This restores this check to what it originally was in #196909 (see:
https://github.com/NixOS/nixpkgs/pull/196909#discussion_r1000536298) and
lets `compiler-rt` eval successfully when trying to compile the
`llvmPackages_15` set for mingw targets (i.e. a platform that *is* GNU
but does *not* use glibc).

---

It's not clear to me what the `haveLibc` check is doing here (platforms
that seem to use glibc like `x86_64-linux` and have
`plat.libc == "glibc"` have `haveLibc = false` because `stdenv.cc.libc`
is `null`).
2023-01-27 13:29:21 -08:00
Rahul Butani
f91fad438b
llvmPackages_15.compiler-rt: update the armv7l patch
see the discussion here for context:
https://github.com/NixOS/nixpkgs/pull/194634#discussion_r999829893
2023-01-27 13:29:21 -08:00
Rahul Butani
09b8886d5e
llvmPackages_15.compiler-rt: apply #186575 to llvmPackages_15 2023-01-27 13:29:21 -08:00
Rahul Butani
00839fea22
llvmPackages_15.compiler-rt: fixes for Darwin
this introduces a codesigning related patch that we can drop once #195107
goes through

see: https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272116014
2023-01-27 13:29:21 -08:00
Rahul Butani
501a9e1b4c
llvmPackages_15.libcxxabi: fix cycles that arise when stdenv is the LLVM stdenv 2023-01-27 13:29:21 -08:00
Rahul Butani
ca59a201ca
llvmPackages_15.libcxx: use clang 15 instead of the stdenv's compiler
libc++ has switched to using `__attribute__((using_if_exists))` to handle
incomplete libc implementations; see: a9c9183ca4

These essentially require a modern C++ compiler (clang gained support in
LLVM 13: 369c648399,
gcc appears to not have support yet: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=105584).

Previously this was not an issue for us (despite the transition happening
around LLVM 13) but something about the changes to the libc++/libc++-abi
build has made it so that on platforms with incomplete libc impls (i.e.
Darwin is missing `quick_exit`/`at_quick_exit`) we error during the `libcxx-abi`
build when the stdenv's (older, not supporting `using_if_exists`) compiler
tries to import libc symbols that aren't present.

The libc++ docs suggest we use a modern compiler to build libc++ anyways
(https://releases.llvm.org/15.0.0/projects/libcxx/docs/index.html#platform-and-compiler-support)
so this commit uses stdenv's containing the package set's clang to build
libcxx/libcxx-abi.

This is similar to how libc++ bootstrapping builds (https://releases.llvm.org/15.0.0/projects/libcxx/docs/BuildingLibcxx.html#bootstrapping-build)
work.
2023-01-27 13:29:21 -08:00
Rahul Butani
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-01-27 13:29:21 -08:00
Rahul Butani
3b6d98d2b0
llvmPackages_15.compiler_rt: apply #196909 to LLVM 15
`llvmPackages_15` originates from `llvmPackages_git` which does
not include this change
2023-01-27 13:29:21 -08:00
Rahul Butani
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-01-27 13:29:21 -08:00
Rahul Butani
9bd92679c2
llvmPackages_15: apply some patches from llvmPackages_14, part 2
See https://github.com/NixOS/nixpkgs/pull/194634#issue-1398202534 for
details.

PRs:
  - #211401
  - #211161
  - #206742
  - #211687
2023-01-27 13:29:21 -08:00
Rahul Butani
81ef82a029
llvmPackages_15: apply some patches from llvmPackages_14
See #194634 for details.

PRs:
  - #191372
  - #190936
  - #82131
  - #199844
  - #197674
  - #184408
  - #193004
2023-01-27 13:29:20 -08:00
Rahul Butani
201ef33028
llvmPackages_15: copy from llvmPackages_git 2023-01-27 13:29:20 -08: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
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Alyssa Ross
f5e63a0e9e bintools: add isGNU and isLLVM attributes 2023-01-20 18:35:25 +01:00
Frederik Rietdijk
7cfe983f0b
Merge pull request #206995 from Madouura/pr/rocm-related
rocm-related: implement more derivations
2023-01-19 13:58:52 +01:00
Madoura
18c88296d0
rocm-related: 5.4.1 → 5.4.2
hip-common: 5.4.1 → 5.4.2

hipblas: 5.4.1 → 5.4.2

hipcc: 5.4.1 → 5.4.2

hip: 5.4.1 → 5.4.2

hipfft: 5.4.1 → 5.4.2

hipcub: 5.4.1 → 5.4.2

hipify: 5.4.1 → 5.4.2

hipfort: 5.4.1 → 5.4.2

clang-ocl: 5.4.1 → 5.4.2

hipsolver: 5.4.1 → 5.4.2

llvmPackages_rocm.llvm: 5.4.1 → 5.4.2

migraphx: 5.4.1 → 5.4.2

miopen: 5.4.1 → 5.4.2

rdc: 5.4.1 → 5.4.2

rccl: 5.4.1 → 5.4.2

rocblas: 5.4.1 → 5.4.2

miopengemm: 5.4.1 → 5.4.2

hipsparse: 5.4.1 → 5.4.2

rocdbgapi: 5.4.1 → 5.4.2

rocfft: 5.4.1 → 5.4.2

rocgdb: 5.4.1 → 5.4.2

rocclr: 5.4.1 → 5.4.2

rocalution: 5.4.1 → 5.4.2

rocm-device-libs: 5.4.1 → 5.4.2

rocm-opencl-runtime: 5.4.1 → 5.4.2

rocm-cmake: 5.4.1 → 5.4.2

rocm-thunk: 5.4.1 → 5.4.2

rocminfo: 5.4.1 → 5.4.2

rocmlir: 5.4.0 → 5.4.1

rocm-comgr: 5.4.1 → 5.4.2

rocprofiler: 5.4.1 → 5.4.2

rocr-debug-agent: 5.4.1 → 5.4.2

rocrand: 5.4.1 → 5.4.2

rocsolver: 5.4.1 → 5.4.2

roctracer: 5.4.1 → 5.4.2

rocm-smi: 5.4.1 → 5.4.2

rocwmma: 5.4.1 → 5.4.2

rocprim: 5.4.1 → 5.4.2

rocsparse: 5.4.1 → 5.4.2

rocthrust: 5.4.1 → 5.4.2

tensile: 5.4.1 → 5.4.2
2023-01-18 16:59:22 -06: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
github-actions[bot]
e2839320bb
Merge staging-next into staging 2023-01-03 12:01:44 +00:00
Dmitry Kalinkin
de3d57875d llvmPackages_9.lldb: fix darwin build
Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
2023-01-03 01:36:48 -05: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
74616a18ab llvmPackages_14.lldb: fix broken lua and python3 site-packages install dir 2022-12-26 21:51:27 +01:00
psondej
ebf3779600 llvmPackages_14.lldb: enable installCheckPhase, add message 2022-12-26 21:50:58 +01:00
psondej
4ac8aa736e llvmPackages_13.lldb: enable installCheckPhase, add message 2022-12-26 19:55:02 +01:00
psondej
6346b158ec llvmPackages_12.lldb: enable installCheckPhase, add message 2022-12-26 19:54:55 +01:00
psondej
e4d24b7187 llvmPackages_11.lldb: enable installCheckPhase, add message 2022-12-26 19:54:46 +01:00
psondej
44554bd941 llvmPackages_10.lldb: enable installCheckPhase, add message 2022-12-26 19:54:32 +01:00
psondej
0a968846e1 llvmPackages_9.lldb: enable installCheckPhase, add message 2022-12-26 19:54:20 +01:00
psondej
80d77c3d04 llvmPackages_8.lldb: enable installCheckPhase, add message 2022-12-26 19:54:07 +01:00
Jan Tojnar
72c37eddec Merge branch 'staging-next' into staging 2022-12-25 01:30:47 +01:00
Artturi
3061b3b209
Merge pull request #205355 from alyssais/llvm-libpfm 2022-12-21 20:29:17 +02:00
Madoura
9e0472e206
rocm-related: 5.4.0 → 5.4.1
clang-ocl: 5.4.0 → 5.4.1

hipsparse: 5.4.0 → 5.4.1

composable_kernel: unstable-2022-12-08 → unstable-2022-12-15

llvmPackages_rocm.llvm: 5.4.0 → 5.4.1

miopen: 5.4.0 → 5.4.1

miopengemm: 5.4.0 → 5.4.1

rccl: 5.4.0 → 5.4.1

rocalution: 5.4.0 → 5.4.1

hipcub: 5.4.0 → 5.4.1

rocclr: 5.4.0 → 5.4.1

rocfft: 5.4.0 → 5.4.1

rocm-cmake: 5.4.0 → 5.4.1

rocm-comgr: 5.4.0 → 5.4.1

rocm-device-libs: 5.4.0 → 5.4.1

hip: 5.4.0 → 5.4.1

rocblas: 5.4.0 → 5.4.1

rocm-runtime: 5.4.0 → 5.4.1

rocm-opencl-runtime: 5.4.0 → 5.4.1

rocm-thunk: 5.4.0 → 5.4.1

rocprim: 5.4.0 → 5.4.1

rocm-smi: 5.4.0 → 5.4.1

rocminfo: 5.4.0 → 5.4.1

rocsolver: 5.4.0 → 5.4.1

rocrand: 5.4.0 → 5.4.1

rocthrust: 5.4.0 → 5.4.1

rocprofiler: 5.4.0 → 5.4.1

rocwmma: 5.4.0 → 5.4.1

roctracer: 5.4.0 → 5.4.1

rocsparse: 5.4.0 → 5.4.1

tensile: 5.4.0 → 5.4.1
2022-12-18 12:39:58 -06:00
Madoura
f6e28e2058
hip: rewrite and separate
hip-common: init at 5.4.0

hipcc: init at 5.4.1
2022-12-18 12:39:57 -06:00
Madoura
0ee533a8e0
rocm-llvm: rewrite and separate 2022-12-18 12:39:56 -06:00
Rick van Schijndel
9833d56c24 treewide: mark packages broken that never built on PLATFORM
Done with the help of https://github.com/Mindavi/nixpkgs-mark-broken
Tool is still WIP but this is one of the first results.

I manually audited the results and removed some results that were not valid.

Note that some of these packages maybe should have more constrained platforms set
instead of broken set, but I think not being perfectly correct is better than
just keep trying to build all these things and never succeeding.

Some observations:

- Some darwin builds require XCode tools
- aarch64-linux builds sometimes suffer from using gcc9
  - gcc9 is getting older and misses some new libraries/features
- Sometimes tools try to do system detection or expect some explicit settings for
  platforms that are not x86_64-linux
2022-12-13 21:40:12 +01:00
Bernardo Meurer
fc6c79f771
Merge pull request #204378 from Madouura/pr/rocm-related
Fixes https://github.com/NixOS/nixpkgs/issues/203949
2022-12-12 15:55:21 -03:00
Madoura
75d7299df1
Revert "rocm-llvm: enable clang-tools-extra for clang-tidy"
This reverts commit c998cad49d.
2022-12-10 16:53:12 -06:00
Madoura
9b98f8433a
rocm-related: create and use a generic updater script 2022-12-10 13:51:09 -06: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
Madoura
33a5eb7be1
rocm-related: 5.3.3 → 5.4.0
clang-ocl: 5.3.3 → 5.4.0

hip: 5.3.3 → 5.4.0

hipsparse: 5.3.3 → 5.4.0

miopengemm: 5.3.3 → 5.4.0

hipcub: 5.3.3 → 5.4.0

rccl: 5.3.3 → 5.4.0

rocblas: 5.3.3 → 5.4.0

rocfft: 5.3.3 → 5.4.0

miopen: 5.3.3 → 5.4.0

rocm-comgr: 5.3.3 → 5.4.0

rocclr: 5.3.3 → 5.4.0

rocm-device-libs: 5.3.3 → 5.4.0

rocm-cmake: 5.3.3 → 5.4.0

rocm-runtime: 5.3.3 → 5.4.0

rocm-smi: 5.3.3 → 5.4.0

rocm-thunk: 5.3.3 → 5.4.0

rocm-opencl-runtime: 5.3.3 → 5.4.0

llvmPackages_rocm.llvm: 5.3.3 → 5.4.0

rocminfo: 5.3.3 → 5.4.0

rocmlir: 5.3.3 → 5.4.0

rocprim: 5.3.3 → 5.4.0

rocwmma: 5.3.3 → 5.4.0

rocrand: 5.3.3 → 5.4.0

rocsparse: 5.3.3 → 5.4.0

rocthrust: 5.3.3 → 5.4.0

tensile: 5.3.3 → 5.4.0

rocm-llvm: remove obsolete patch

hip: remove obsolete substituteInPlace

rocmlir: fixup build inputs and cmakeFlags

miopen: add nlohmann_json
2022-12-04 10:33:07 -06:00
github-actions[bot]
e6be0713d4
Merge master into staging-next 2022-11-29 00:02:37 +00:00
Vladimír Čunát
9ab35fe3ad
Merge #201268: libcxx: link correct libcxxabi version
...into staging
2022-11-28 10:00:21 +01:00
Madoura
3ced8179cd
rocm-related: optional GITHUB_TOKEN for update script
hip: optional GITHUB_TOKEN for update script

rocm-llvm: optional GITHUB_TOKEN for update script

clang-ocl: optional GITHUB_TOKEN for update script

hipcub: optional GITHUB_TOKEN for update script

hipsparse: optional GITHUB_TOKEN for update script

miopen: optional GITHUB_TOKEN for update script

miopengemm: optional GITHUB_TOKEN for update script

rccl: optional GITHUB_TOKEN for update script

rocblas: optional GITHUB_TOKEN for update script

rocclr: optional GITHUB_TOKEN for update script

rocfft: optional GITHUB_TOKEN for update script

rocm-comgr: optional GITHUB_TOKEN for update script

rocm-device-libs: optional GITHUB_TOKEN for update script

rocm-opencl-runtime: optional GITHUB_TOKEN for update script

rocm-runtime: optional GITHUB_TOKEN for update script

rocm-thunk: optional GITHUB_TOKEN for update script

rocmlir: optional GITHUB_TOKEN for update script

rocprim: optional GITHUB_TOKEN for update script

rocrand: optional GITHUB_TOKEN for update script

rocsparse: optional GITHUB_TOKEN for update script

rocthrust: optional GITHUB_TOKEN for update script

rocwmma: optional GITHUB_TOKEN for update script

tensile: optional GITHUB_TOKEN for update script

rocm-cmake: optional GITHUB_TOKEN for update script

rocminfo: optional GITHUB_TOKEN for update script

rocm-smi: optional GITHUB_TOKEN for update script
2022-11-28 02:25:56 -06:00
github-actions[bot]
38af11b9ce
Merge staging-next into staging 2022-11-27 18:01:39 +00:00
Martin Weinelt
d9a4005ed0
Merge pull request #202476 from Madouura/pr/miopen 2022-11-27 15:07:11 +01:00
github-actions[bot]
e5a45ed6d9
Merge staging-next into staging 2022-11-25 18:02:16 +00:00
Madoura
6bb3a9baee
rocm-related: use finalAttrs
hip: use finalAttrs

rocm-llvm: use finalAttrs

clang-ocl: use finalAttrs

composable_kernel: use finalAttrs

hipcub: use finalAttrs

hipsparse: use finalAttrs

miopengemm: use finalAttrs

rccl: use finalAttrs

rocblas: use finalAttrs

rocclr: use finalAttrs

rocfft: use finalAttrs

rocm-comgr: use finalAttrs

rocm-device-libs: use finalAttrs

rocm-opencl-runtime: use finalAttrs

rocm-runtime: use finalAttrs

rocm-thunk: use finalAttrs

rocmlir: use finalAttrs

rocprim: use finalAttrs

rocsparse: use finalAttrs

rocthrust: use finalAttrs

rocm-cmake: use finalAttrs

rocminfo: use finalAttrs

rocm-smi: use finalAttrs
2022-11-24 01:23:03 -06:00
Madoura
0190a12af5
rocm-related: change maintainers to rocm team + old
rocclr: change maintainers to rocm team + old

rocm-comgr: change maintainers to rocm team + old

rocm-device-libs: change maintainers to rocm team + old

rocm-opencl-runtime: change maintainers to rocm team + old

rocm-runtime: change maintainers to rocm team + old

rocm-thunk: change maintainers to rocm team + old

rocminfo: change maintainers to rocm team + old

rocm-smi: change maintainers to rocm team + old

rocm-llvm: change maintainers to rocm team + old

hip: change maintainers to rocm team + old
2022-11-24 01:19:57 -06:00
Madoura
6eefaa031c
rocm-related: 5.3.1 → 5.3.3
rocm-smi: 5.3.1 → 5.3.3

rocm-cmake: 5.3.1 → 5.3.3

rocm-thunk: 5.3.1 → 5.3.3

rocm-runtime: 5.3.1 → 5.3.3

rocm-opencl-runtime: 5.3.1 → 5.3.3

rocm-device-libs: 5.3.1 → 5.3.3

rocm-comgr: 5.3.1 → 5.3.3

rocclr: 5.3.1 → 5.3.3

rocminfo: 5.3.1 → 5.3.3

llvmPackages_rocm.llvm: 5.3.1 → 5.3.3

hip: 5.3.1 → 5.3.3

hipcub: 2.12.0-5.3.1 → 2.12.0-5.3.3

rocsparse: 2.3.2-5.3.1 → 2.3.2-5.3.3

hipsparse: 2.3.1-5.3.1 → 2.3.1-5.3.3

rccl: 2.12.10-5.3.1 → 2.12.10-5.3.3

rocfft: 1.0.18-5.3.1 → 1.0.18-5.3.3

tensile: 4.34.0-5.3.1 → 4.34.0-5.3.3

rocblas: 2.45.0-5.3.1 → 2.45.0-5.3.3

miopengemm: 5.3.1 → 5.3.3

clang-ocl: 5.3.1 → 5.3.3

rocthrust: 2.16.0-5.3.1 → 2.16.0-5.3.3

rocprim: 2.11.0-5.3.1 → 2.11.1-5.3.3

rocmlir: 5.3.1 → 5.3.3
2022-11-24 01:19:47 -06:00
Madoura
c998cad49d
rocm-llvm: enable clang-tools-extra for clang-tidy 2022-11-23 01:48:41 -06: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
github-actions[bot]
90d0a0faec
Merge master into staging-next 2022-11-14 06:01:15 +00:00
John Ericson
cd27a5b436
Merge pull request #82131 from Ericson2314/bsd-cross
FreeBSD packages: Init at 13.1
2022-11-13 21:35:17 -05:00
Alyssa Ross
c3f3baddaa
Revert "llvmPackages_11: Add $rsrc/lib to default cflags"
This reverts commit 2000ae5429.

This was intended as a fix for i686 cross compilation, but it has had
other unforeseen consequences, such as breaking rust-bindgen.
2022-11-10 12:07:41 +00:00
Shamrock Lee
93b5ec0084 clang-unwrapped: mv {$out,$python}/share/scan-view/*.py
This fixes "${clang-unwrapped.python}/bin/scan-view"
by providing the relative dependency
"${clang-unwrapped.python}/share/scan-view/ScanView.py"
2022-11-08 07:04:37 +08:00
github-actions[bot]
e51ba60580
Merge master into staging-next 2022-11-07 00:03:30 +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
Vladimír Čunát
b33eacb377
Merge #196909: stdenvBootstrapTools: fix cycle on aarch64-darwin
...into staging
2022-11-05 16:08:27 +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
Madoura
d93f2dbfe1
llvm-rocm: 5.3.0 -> 5.3.1 2022-11-04 08:19:31 -05:00
squalus
4b07aeae16 openmp: fix cross compile 2022-10-24 23:47:27 -07:00
7c6f434c
2c943d3c95
Merge pull request #196008 from peperunas/llvm-i686
llvmPackages_11: Fix cross-compilation for i686
2022-10-22 12:04:38 +00:00
7c6f434c
f673dc99af
Merge pull request #196023 from peperunas/llvmPackages_10-i686
llvmPackages_10.compiler-rt: Add support for i686
2022-10-22 12:04:02 +00:00
Stéphan Kochen
e0c70d5e0f stdenvBootstrapTools: fix cycle on aarch64-darwin 2022-10-20 16:55:00 +02:00
Giulio De Pasquale
e89499406d llvmPackages.compiler-rt: Backported X86 support
patch from LLVM11
2022-10-14 19:07:26 +02:00
Giulio De Pasquale
ab7241de71 llvmPackages_10.compiler-rt: Add i486, i586, i686
to X86 family. Link crtbeginS.o and crtendS.o Expose ix86 family builtins.
2022-10-14 19:03:06 +02:00
Giulio De Pasquale
2000ae5429 llvmPackages_11: Add $rsrc/lib to default cflags 2022-10-14 18:46:22 +02:00
Giulio De Pasquale
e1b98ac282 llvmPackages_11.compiler-rt: Link crtbeginS.o and crtendS.o 2022-10-14 18:43:21 +02:00
Giulio De Pasquale
5989c9d76c llvmPackages_11.compiler-rt: Add i486, i586, i686 to X86 family. Expose ix86 family builtins.
Co-Authored-By: John Ericson <git@JohnEricson.me>
2022-10-14 18:35:40 +02:00
github-actions[bot]
7df9a7a84c
Merge staging-next into staging 2022-10-13 18:07:50 +00:00
Bernardo Meurer
2196a95e68
Merge pull request #195403 from Flakebi/rocm 2022-10-13 14:56:18 -03:00
Artturi
e66d2fd89d
Merge pull request #194256 from Artturin/treewides2 2022-10-13 00:08:01 +03:00
github-actions[bot]
5d957f3dba
Merge staging-next into staging 2022-10-11 00:05:26 +00:00
Sebastian Neubauer
72aaaa782a llvmPackages_rocm.llvm: 5.2.3 → 5.3.0 2022-10-10 21:35:27 +02: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
Martin Weinelt
842a2c2399
llvmPackages_rocm.llvm: fix build with libxcrypt 2022-10-09 18:14:32 +02:00
Martin Weinelt
716a31527a
llvmPackages_10.compiler-rt: fix build with libxcrypt 2022-10-09 18:14:32 +02:00
Martin Weinelt
efd944cb72
llvmPackages_12.compiler-rt: fix build with libxcrypt 2022-10-09 18:14:30 +02:00
Martin Weinelt
f64f770801
llvmPackages_13.compiler-rt: fix build with libxcrypt 2022-10-09 18:13:28 +02:00
Franz Pletz
057ae3d0f1
llvmPackage_14.compiler-rt: fix build with libxcrypt 2022-10-09 18:10:31 +02:00
Franz Pletz
495e6501b6
llvmPackages_11.compiler-rt: fix build with libxcrypt 2022-10-09 18:09:37 +02:00
Rahul Butani
d20c8697eb
llvmPackages_{13,14}.lldb: fix build on x86 macOS
See: https://github.com/NixOS/nixpkgs/pull/194634#issuecomment-1272129132
2022-10-08 21:40:04 -05:00
github-actions[bot]
a6e5efa5f4
Merge staging-next into staging 2022-10-06 00:05:14 +00:00
7c6f434c
711191ca62
Merge pull request #186575 from stephank/fix/compiler-rt-builtins
compiler-rt: build builtins on darwin
2022-10-05 18:48:36 +00:00
7c6f434c
1723d25c72
Merge pull request #190908 from a12l/lldb-lua
lldb: Add Lua support
2022-10-05 18:46:02 +00:00
7c6f434c
d89b2002b3
Merge pull request #193636 from crabtw/staging
llvmPackages_{14, git}.clang: add nostdlibinc flag
2022-10-05 18:45:01 +00: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
Jyun-Yan You
44165d3657 llvmPackages_{14, git}.clang: add nostdlibinc flag
Fix header search paths as #153963
2022-09-30 09:33:05 +08:00
Albin Otterhäll
f0938ab85f lldb: add support for Lua bindings in LLDB-git 2022-09-27 01:19:26 +02:00
Albin Otterhäll
86d743a958 lldb: add support for Lua bindings in LLDB 14 2022-09-27 01:19:26 +02:00
Shamrock Lee
8afdfd9e64 clang: specify meta.mainProgram 2022-09-23 01:55:21 +08:00
Martin Weinelt
5d4267b0f2 Merge remote-tracking branch 'origin/master' into staging-next 2022-09-20 12:25:19 +02:00
Yureka
6485a02fb3 llvm 14 lld: build with 2M stack size to fix firefox lto 2022-09-20 08:04:26 +02:00
Yureka
94cad6ec1a llvm 14 compiler-rt: enable libclang_rt.profile-....a build 2022-09-20 08:04:26 +02:00
github-actions[bot]
0b07cb1528
Merge staging-next into staging 2022-09-13 12:02:05 +00:00
Alyssa Ross
723a5645b5 pkgsStatic.llvm_14: fix build 2022-09-13 08:24:17 +00: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
Martin Weinelt
249398ffa8 Merge remote-tracking branch 'origin/staging-next' into staging 2022-08-25 00:32:27 +02:00
Stéphan Kochen
fb91bfc380 compiler-rt: build builtins on darwin
The missing xcrun meant builtins were missing from darwin. This
apparently wasn't an issue until now, but is in projects using
`@available` checks. (The ARM64 hack was apparently the previous
solution to fixing broken SDK detection.)
2022-08-24 08:45:14 +02:00
Bernardo Meurer
d5cd07efab
Merge pull request #187851 from Flakebi/rocm
rocm: 5.2.1 → 5.2.3
2022-08-23 16:10:08 -03:00
Sebastian Neubauer
2987efca09 llvmPackages_rocm.llvm: 5.2.1 → 5.2.3 2022-08-22 10:14:16 +00:00
John Ericson
22a98bf523 llvmPackages_git.libcxxabi: Replace vendored patch with fetch
https://reviews.llvm.org/D132298 is now landed, so we can fetch the
commit instead.
2022-08-21 08:34:19 -04:00
doyougnu
376625d40f llvmPackages_git: 2022-01-07 -> 2022-25-07, add README
The new LLVM commit is just before the LLVM 15 fork off.

The readme describing upgrade process so it is easier for others to do.

Co-Authored-By: Dylan Green <Dylan.Green@Obsidian.Systems>
Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
2022-08-20 12:43:52 -04:00
github-actions[bot]
784a588a10
Merge staging-next into staging 2022-08-19 00:04:04 +00:00
John Ericson
d6636a5de6 llvmPackages_14.compiler-rt: fix aarch32 patch
This is just the same fix we did for LLVM 13 in
265ba73a78 applied to LLVM 14.
2022-08-18 22:09:17 +00:00
John Ericson
fd36ac32c0 Revert "clang_14: drop out-of-date armv7l patch"
This reverts commit f69c82f8ea.
2022-08-18 22:08:12 +00: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
Sebastian Neubauer
ec590fdd24 llvmPackages_rocm: compile as one derivation
This is the supported way rocm is tested.
It makes packaging in nix a *lot* easier (see the code size).

An important change is the dontLink detection in the clang/clang++
wrapper script: When compiling with --cuda-device-only,
the linker must not be set, otherwise e.g. the blender kernels fail to
compile.
2022-08-16 19:20:55 +02:00
Sebastian Neubauer
35be36c724 llvmPackages_rocm.llvm: 5.1.1 → 5.2.1 2022-08-16 18:20:56 +02:00
John Ericson
bf39e32272 compiler-rt: Fix "bare metal" case boolean logic
It is possible to both be bare metal and have a libc (newlib).

This libc doesn't provide very much --- not enough for CMake to think
the C toolchain works. We therefore adjust our logic so we hit the "bare
metal" case with or without libc.

The "use LLVM" bootstrap is intentionally not affected.
2022-08-01 12:18:54 -04:00
Luiz Ribeiro
c743308438 llvm14: Skip broken tests on riscv 2022-07-16 22:50:41 -05:00
Ivan Kozik
34c77f1e8d llvmPackages_14: 14.0.1 -> 14.0.6 2022-07-07 19:34:17 +00:00
Vladimír Čunát
43f9c191bf
Merge #110571: treewide: migrate to -fno-common
...into staging
2022-07-07 10:06:38 +02:00
Gaelan Steele
5b47eb13ac gcc, clang11: don't force -fcommon on GCC 10 or clang11
GCC 10 sets -fno-common by default. This broke some packages, so
when moving to GCC 10 we initially disabled this behavior. This
commit reverts that, bringing us closer to the standard and
upstream.

Co-authored-by: Sergei Trofimovich <slyich@gmail.com>
2022-07-06 08:37:00 +01: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
misuzu
f69c82f8ea clang_14: drop out-of-date armv7l patch 2022-06-20 15:37:47 +03:00
Sandro
646c74dd66
Merge pull request #176591 from misuzu/llvm-armv7l
llvmPackages/libllvm: disable failing tests on armv7l
2022-06-10 02:00:14 +02:00
John Ericson
942da65b07 llvmPackages_14: Fix remaining broken gnu-install-dirs patches 2022-06-08 16:43:04 +00:00
misuzu
f8c1774e25 llvm_11: disable tools/gold/X86/split-dwarf.ll test on armv7l 2022-06-06 20:33:50 +03:00
misuzu
67df7777e7 llvm_12: disable failing tests on armv7l 2022-06-06 20:33:49 +03:00
misuzu
b1b9ceaa95 llvm_13: disable tools/gold/X86/split-dwarf.ll test on armv7l 2022-06-06 20:33:49 +03:00
misuzu
d7848386e5 llvmPackages/libllvm: disable failing tests on armv7l 2022-06-05 09:54:18 +03:00