From 8c71431f1414fcddcbf6b41c4d8d76b4f01853fb Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 28 Mar 2024 11:28:13 -0700 Subject: llvmPackages_{12,13,14,15,16,17,18,git}: use common openmp --- pkgs/development/compilers/llvm/12/default.nix | 11 ++++- .../compilers/llvm/12/openmp/default.nix | 48 ---------------------- 2 files changed, 10 insertions(+), 49 deletions(-) delete mode 100644 pkgs/development/compilers/llvm/12/openmp/default.nix (limited to 'pkgs/development/compilers/llvm/12') diff --git a/pkgs/development/compilers/llvm/12/default.nix b/pkgs/development/compilers/llvm/12/default.nix index bd87dc5f34f03..d9b1b7bb83f50 100644 --- a/pkgs/development/compilers/llvm/12/default.nix +++ b/pkgs/development/compilers/llvm/12/default.nix @@ -1,5 +1,6 @@ { lowPrio, newScope, pkgs, lib, stdenv, cmake , preLibcCrossHeaders +, fetchpatch , libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith , buildLlvmTools # tools, but from the previous stage, for cross , targetLlvmLibraries # libraries, but from the next stage, for cross @@ -264,7 +265,15 @@ let stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx; }; - openmp = callPackage ./openmp { + openmp = callPackage ../common/openmp { + src = fetch "openmp" "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0"; + patches = [ + # Fix cross. + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch"; + hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A="; + }) + ]; inherit llvm_meta targetLlvm; }; }); diff --git a/pkgs/development/compilers/llvm/12/openmp/default.nix b/pkgs/development/compilers/llvm/12/openmp/default.nix deleted file mode 100644 index 6040f3d1621a9..0000000000000 --- a/pkgs/development/compilers/llvm/12/openmp/default.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ lib -, stdenv -, llvm_meta -, fetch -, fetchpatch -, cmake -, llvm -, targetLlvm -, perl -, version -}: - -stdenv.mkDerivation rec { - pname = "openmp"; - inherit version; - - src = fetch pname "14dh0r6h2xh747ffgnsl4z08h0ri04azi9vf79cbz7ma1r27kzk0"; - - patches = [ - # Fix cross. - (fetchpatch { - url = "https://github.com/llvm/llvm-project/commit/5e2358c781b85a18d1463fd924d2741d4ae5e42e.patch"; - hash = "sha256-UxIlAifXnexF/MaraPW0Ut6q+sf3e7y1fMdEv1q103A="; - }) - ]; - - patchFlags = [ "-p2" ]; - - nativeBuildInputs = [ cmake perl ]; - buildInputs = [ - (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) - ]; - - meta = llvm_meta // { - homepage = "https://openmp.llvm.org/"; - description = "Support for the OpenMP language"; - longDescription = '' - The OpenMP subproject of LLVM contains the components required to build an - executable OpenMP program that are outside the compiler itself. - Contains the code for the runtime library against which code compiled by - "clang -fopenmp" must be linked before it can run and the library that - supports offload to target devices. - ''; - # "All of the code is dual licensed under the MIT license and the UIUC - # License (a BSD-like license)": - license = with lib.licenses; [ mit ncsa ]; - }; -} -- cgit 1.4.1