Commit Graph

32 Commits

Author SHA1 Message Date
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
Sebastian Neubauer
a0b66ad30e rocm-llvm: 5.0.2 -> 5.1.1 2022-05-05 18:36:00 +02:00
Anthony Cowley
eb20eae90f
llvmPackages_rocm: 4.5.2 -> 5.0.2 (#165362)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-03-27 20:35:14 +02:00
InternetUnexplorer
9c8eda7f38 llvmPackages_rocm.llvm: don't build shared libs
This seems to fix the notorious "CommandLine Error: Option 'xxxxx'
registered more than once!" error in applications that use both Mesa and
ROCm.

Since Mesa is built with llvmPackages_latest and ROCm stuff is built
with llvmPackages_rocm, applications that use both (such as Blender) end
up with two different `libLLVM*.so`s loaded, which breaks things.

This seems like a straightforward way to fix the problem, and since the
ROCm stack seems to be the only thing in Nixpkgs that uses
llvmPackages_rocm this hopefully shouldn't break anything.

While there might be another way to fix this problem that doesn't
require disabling the shared libraries, I haven't been able to find it
yet, and since this issue seems to affect a lot of people I think it
might make sense to merge this fix for now and revisit it later if a
better solution is found.

This also removes a small patch to rocm-comgr since there are no longer
LLVM shared libraries for it to link against.
2022-03-11 11:33:56 -08:00
7c6f434c
58a27ea378
Merge pull request #148367 from r-burns/llvm-config-static
llvmPackages_*.llvm: fix llvm-config-native with static libs
2021-12-24 10:25:03 +00:00
Neubauer, Sebastian
de8041b44e llvmPackages_rocm.llvm: 4.3.1 → 4.5.2
Fix compiler-rt build and use ninja for faster builds.
2021-12-15 16:57:22 +01:00
Ryan Burns
544707d6a4 llvmPackages_*.llvm: fix llvm-config-native with static libs
Since both static and shared libs are installed to the same `lib`
output, we override the ActiveLibDir unconditionally.

Fixes `llvm-config-native --link-static --libs`
2021-12-02 19:21:21 -08:00
Anders Kaseorg
e12f4db556 treewide: Fix unsafe concatenation of $LD_LIBRARY_PATH, round 2
Naive concatenation of $LD_LIBRARY_PATH can result in an empty
colon-delimited segment; this tells glibc to load libraries from the
current directory, which is definitely wrong, and may be a security
vulnerability if the current directory is untrusted.  (See #67234, for
example.)  Fix this throughout the tree.

Followup to #76804.  Fixes #144646.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-11-04 16:15:05 -07:00
Bernardo Meurer
45be479255
llvmPackages_rocm.compiler-rt: replace dead patch with clone 2021-10-05 19:17:59 -07:00
Josh Hoffer
2549800a1a compiler-rt: cont. remove <cyclades.h> from libsanitizer
See commit 199b7c505b for the
original issue.

This patch is from the upstream rocm llvm repo:
https://reviews.llvm.org/rG884040db086936107ec81656aa5b4c607235fb9a
2021-09-29 22:28:16 -06:00
Daniël de Kok
6f2ce2a65e treewide: remove danieldk as maintainer from a set of packages
I currently do not have much time to work on nixpkgs. Remove
myself as a maintainer from a bunch of packages to avoid that
people are waiting on me for a review.
2021-09-12 14:42:12 +00:00
Sebastian Neubauer
61a2864b18 llvmPackages_rocm: add update script 2021-09-09 15:42:07 +02:00
Bernardo Meurer
e3b026fdba
llvmPackages_rocm: 4.1.0 -> 4.3.1 2021-09-02 13:04:11 -07:00
Bernardo Meurer
e4459e59a2
llvmPackages_rocm: add compiler-rt
Co-Authored-By: acowley <acowley@users.noreply.github.com>
2021-09-02 12:21:44 -07:00
Frederik Rietdijk
e95ca01176 llvmPackages_rocm: use python3 2021-07-27 20:37:06 +02:00
Daniël de Kok
017aa88470 Remove danieldk as a maintainer for some packages
- AMD GPU packages: AMD removed support for the RX5x0 GPUs from ROCm, so
  I cannot test these packages anymore.
- A small number of GUI packages: I switched back to macOS on the
  desktop for work reasons, so I cannot easily test these.
- broot: I took over maintainership from someone else, but do not really
  use broot.
2021-07-03 12:14:20 +02:00
Andrew Childs
7869d16545 llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.

The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.

Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.

----

Other misc notes, highly incomplete

- lvm-config-native and llvm-config are put in `dev` because they are
  tools just for build time.

- Clang no longer has an lld dep. That was introduced in
  db29857eb3, but if clang needs help
  finding lld when it is used we should just pass it flags / put in the
  resource dir. Providing it at build time increases critical path
  length for no good reason.

----

A note on `nativeCC`:

`stdenv` takes tools from the previous stage, so:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`

while:

1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2021-04-30 05:41:00 +00:00
Jan Tojnar
b3c854b60b
Merge branch 'staging-next' into staging 2021-03-26 07:53:44 +01:00
Daniël de Kok
84023d85cb llvmPackages_rocm: 4.0.1 -> 4.1.0 2021-03-24 08:43:58 +01:00
John Ericson
19a974945b llvmPackages: Organize files
Always do pkg/default.nix not pkg.nix; use directories to avoid
prefixing patches and other files.
2021-03-24 05:02:50 +00:00
Ben Siraphob
98f26993f2 treewide: remove stdenv where not needed 2021-03-04 19:54:50 +07:00
Daniël de Kok
fa846bef8a llvmPackages_rocm: 4.0.0 -> 4.0.1
Release notes:

https://rocmdocs.amd.com/en/latest/Current_Release_Notes/Current-Release-Notes.html#amd-rocm-release-notes-v4-0-1
2021-01-29 16:43:22 +01:00
Ryan Burns
44c46905b9 llvmPackages_rocm.clang: add isClang and llvm passthru
Matches generic clang compilers, and fixes isClang inspection, which
0710308402 depends on for the
`--gcc-toolchain` flag to be set up properly.

Fixes rocm-comgr
2021-01-26 02:32:59 -08:00
John Ericson
0710308402 clang, cc-wrapper: Move --gcc-toolchain logic into CC wrapper
Take 2, after #94582 had to be reverted.

This reverts commit ac03cfa3c5.
2021-01-24 15:49:32 -05:00
Ben Siraphob
acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
Daniël de Kok
d0492e8f71 llvmPackages_rocm: 3.10.0 -> 4.0.0 2020-12-18 08:21:12 +01:00
Daniël de Kok
cea2e29961 llvmPackages_rocm: 3.9.0 -> 3.10.0 2020-11-30 18:47:48 +01:00
Daniël de Kok
adcf19774c llvmPackages_rocm: 3.8.0 -> 3.9.0
Also fix lld path in the installed CMake files.
2020-11-03 08:47:50 +01:00
Daniël de Kok
2db575ecae llvmPackages_rocm: 3.7.0 -> 3.8.0 2020-09-18 20:43:47 +02:00
Daniël de Kok
89567e2064 llvmPackages_rocm: 3.5.1 -> 3.7.0 2020-08-21 08:50:40 +02:00
Daniël de Kok
e492cd92a9 llvmPackages_rocm: init at 3.5.1 2020-07-13 19:58:44 +02:00