Merge pull request #119550 from primeos/llvm-meta
llvmPackages_12: Improve and extend the meta attributes
This commit is contained in:
commit
44dac5f5c6
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
|
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
|
||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
, enableManpages ? false
|
, enableManpages ? false
|
||||||
}:
|
}:
|
||||||
|
@ -82,11 +82,20 @@ let
|
||||||
inherit llvm;
|
inherit llvm;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = llvm_meta // {
|
||||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
homepage = "https://clang.llvm.org/";
|
||||||
homepage = "https://llvm.org/";
|
description = "A C language family frontend for LLVM";
|
||||||
license = lib.licenses.ncsa;
|
longDescription = ''
|
||||||
platforms = lib.platforms.all;
|
The Clang project provides a language front-end and tooling
|
||||||
|
infrastructure for languages in the C language family (C, C++, Objective
|
||||||
|
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
|
||||||
|
It aims to deliver amazingly fast compiles, extremely useful error and
|
||||||
|
warning messages and to provide a platform for building great source
|
||||||
|
level tools. The Clang Static Analyzer and clang-tidy are tools that
|
||||||
|
automatically find bugs in your code, and are great examples of the sort
|
||||||
|
of tools that can be built using the Clang frontend as a library to
|
||||||
|
parse C/C++ code.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages {
|
||||||
pname = "clang-manpages";
|
pname = "clang-manpages";
|
||||||
|
@ -105,6 +114,8 @@ let
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta.description = "man page for Clang ${version}";
|
meta = llvm_meta // {
|
||||||
|
description = "man page for Clang ${version}";
|
||||||
|
};
|
||||||
});
|
});
|
||||||
in self
|
in self
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
|
{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
|
@ -87,4 +87,19 @@ stdenv.mkDerivation rec {
|
||||||
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
|
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
meta = llvm_meta // {
|
||||||
|
homepage = "https://compiler-rt.llvm.org/";
|
||||||
|
description = "Compiler runtime libraries";
|
||||||
|
longDescription = ''
|
||||||
|
The compiler-rt project provides highly tuned implementations of the
|
||||||
|
low-level code generator support routines like "__fixunsdfdi" and other
|
||||||
|
calls generated when a target doesn't have a short sequence of native
|
||||||
|
instructions to implement a core IR operation. It also provides
|
||||||
|
implementations of run-time libraries for dynamic testing tools such as
|
||||||
|
AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
|
||||||
|
'';
|
||||||
|
# "All of the code in the compiler-rt project is dual licensed under the MIT
|
||||||
|
# license and the UIUC License (a BSD-like license)":
|
||||||
|
license = with lib.licenses; [ mit ncsa ];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,12 @@ let
|
||||||
|
|
||||||
clang-tools-extra_src = fetch "clang-tools-extra" "0p3dzr0qa7mar83y66xa5m5apynf6ia0lsdsq6axwnm64ysy0hdd";
|
clang-tools-extra_src = fetch "clang-tools-extra" "0p3dzr0qa7mar83y66xa5m5apynf6ia0lsdsq6axwnm64ysy0hdd";
|
||||||
|
|
||||||
|
llvm_meta = {
|
||||||
|
license = lib.licenses.ncsa;
|
||||||
|
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||||
|
platforms = lib.platforms.all;
|
||||||
|
};
|
||||||
|
|
||||||
tools = lib.makeExtensible (tools: let
|
tools = lib.makeExtensible (tools: let
|
||||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
||||||
mkExtraBuildCommands = cc: ''
|
mkExtraBuildCommands = cc: ''
|
||||||
|
@ -30,13 +36,16 @@ let
|
||||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
|
ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
|
||||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
llvm = callPackage ./llvm { };
|
llvm = callPackage ./llvm {
|
||||||
|
inherit llvm_meta;
|
||||||
|
};
|
||||||
|
|
||||||
clang-unwrapped = callPackage ./clang {
|
clang-unwrapped = callPackage ./clang {
|
||||||
inherit (tools) lld;
|
inherit (tools) lld;
|
||||||
inherit clang-tools-extra_src;
|
inherit clang-tools-extra_src llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
# disabled until recommonmark supports sphinx 3
|
# disabled until recommonmark supports sphinx 3
|
||||||
|
@ -81,10 +90,12 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
lld = callPackage ./lld {
|
lld = callPackage ./lld {
|
||||||
|
inherit llvm_meta;
|
||||||
libunwind = libraries.libunwind;
|
libunwind = libraries.libunwind;
|
||||||
};
|
};
|
||||||
|
|
||||||
lldb = callPackage ./lldb {
|
lldb = callPackage ./lldb {
|
||||||
|
inherit llvm_meta;
|
||||||
inherit (darwin) libobjc bootstrap_cmds;
|
inherit (darwin) libobjc bootstrap_cmds;
|
||||||
inherit (darwin.apple_sdk.libs) xpc;
|
inherit (darwin.apple_sdk.libs) xpc;
|
||||||
inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa;
|
inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa;
|
||||||
|
@ -172,7 +183,7 @@ let
|
||||||
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
||||||
in {
|
in {
|
||||||
|
|
||||||
compiler-rt = callPackage ./compiler-rt ({} //
|
compiler-rt = callPackage ./compiler-rt ({ inherit llvm_meta; } //
|
||||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
|
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
|
||||||
}));
|
}));
|
||||||
|
@ -181,20 +192,20 @@ let
|
||||||
|
|
||||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||||
|
|
||||||
libcxx = callPackage ./libc++ ({} //
|
libcxx = callPackage ./libc++ ({ inherit llvm_meta; } //
|
||||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
libcxxabi = callPackage ./libc++abi ({} //
|
libcxxabi = callPackage ./libc++abi ({ inherit llvm_meta; } //
|
||||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||||
libunwind = libraries.libunwind;
|
libunwind = libraries.libunwind;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
openmp = callPackage ./openmp.nix {};
|
openmp = callPackage ./openmp.nix { inherit llvm_meta; };
|
||||||
|
|
||||||
libunwind = callPackage ./libunwind ({} //
|
libunwind = callPackage ./libunwind ({ inherit llvm_meta; } //
|
||||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
|
{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -40,10 +40,15 @@ stdenv.mkDerivation {
|
||||||
isLLVM = true;
|
isLLVM = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = llvm_meta // {
|
||||||
homepage = "https://libcxx.llvm.org/";
|
homepage = "https://libcxx.llvm.org/";
|
||||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
description = "C++ standard library";
|
||||||
license = with lib.licenses; [ ncsa mit ];
|
longDescription = ''
|
||||||
platforms = lib.platforms.all;
|
libc++ is an implementation of the C++ standard library, targeting C++11,
|
||||||
|
C++14 and above.
|
||||||
|
'';
|
||||||
|
# "All of the code in libc++ is dual licensed under the MIT license and the
|
||||||
|
# UIUC License (a BSD-like license)":
|
||||||
|
license = with lib.licenses; [ mit ncsa ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, cmake, python3, fetch, libcxx, libunwind, llvm, version
|
{ lib, stdenv, llvm_meta, cmake, python3, fetch, libcxx, libunwind, llvm, version
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -57,11 +57,15 @@ stdenv.mkDerivation {
|
||||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = llvm_meta // {
|
||||||
homepage = "https://libcxxabi.llvm.org/";
|
homepage = "https://libcxxabi.llvm.org/";
|
||||||
description = "A new implementation of low level support for a standard C++ library";
|
description = "Provides C++ standard library support";
|
||||||
license = with lib.licenses; [ ncsa mit ];
|
longDescription = ''
|
||||||
maintainers = with lib.maintainers; [ vlstill ];
|
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||||
platforms = lib.platforms.all;
|
'';
|
||||||
|
# "All of the code in libc++abi is dual licensed under the MIT license and
|
||||||
|
# the UIUC License (a BSD-like license)":
|
||||||
|
license = with lib.licenses; [ mit ncsa ];
|
||||||
|
maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, version, fetch, libcxx, llvm, cmake
|
{ lib, stdenv, llvm_meta, version, fetch, libcxx, llvm, cmake
|
||||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -18,4 +18,16 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
|
cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
|
||||||
|
|
||||||
|
meta = llvm_meta // {
|
||||||
|
# Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
|
||||||
|
homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
|
||||||
|
description = "LLVM's unwinder library";
|
||||||
|
longDescription = ''
|
||||||
|
The unwind library provides a family of _Unwind_* functions implementing
|
||||||
|
the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
|
||||||
|
I). It is a dependency of the C++ ABI library, and sometimes is a
|
||||||
|
dependency of other runtimes.
|
||||||
|
'';
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv
|
{ lib, stdenv, llvm_meta
|
||||||
, fetch
|
, fetch
|
||||||
, libunwind
|
, libunwind
|
||||||
, cmake
|
, cmake
|
||||||
|
@ -30,10 +30,16 @@ stdenv.mkDerivation rec {
|
||||||
moveToOutput lib "$dev"
|
moveToOutput lib "$dev"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = llvm_meta // {
|
||||||
description = "The LLVM Linker";
|
homepage = "https://lld.llvm.org/";
|
||||||
homepage = "https://lld.llvm.org/";
|
description = "The LLVM linker";
|
||||||
license = lib.licenses.ncsa;
|
longDescription = ''
|
||||||
platforms = lib.platforms.all;
|
LLD is a linker from the LLVM project that is a drop-in replacement for
|
||||||
|
system linkers and runs much faster than them. It also provides features
|
||||||
|
that are useful for toolchain developers.
|
||||||
|
The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS) and
|
||||||
|
WebAssembly in descending order of completeness. Internally, LLD consists
|
||||||
|
of several different linkers.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv
|
{ lib, stdenv, llvm_meta
|
||||||
, fetch
|
, fetch
|
||||||
, cmake
|
, cmake
|
||||||
, zlib
|
, zlib
|
||||||
|
@ -72,11 +72,15 @@ stdenv.mkDerivation (rec {
|
||||||
ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
|
ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = llvm_meta // {
|
||||||
|
homepage = "https://lldb.llvm.org/";
|
||||||
description = "A next-generation high-performance debugger";
|
description = "A next-generation high-performance debugger";
|
||||||
homepage = "https://lldb.llvm.org";
|
longDescription = ''
|
||||||
license = licenses.ncsa;
|
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||||
platforms = platforms.all;
|
of reusable components which highly leverage existing libraries in the
|
||||||
|
larger LLVM Project, such as the Clang expression parser and LLVM
|
||||||
|
disassembler.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages {
|
||||||
pname = "lldb-manpages";
|
pname = "lldb-manpages";
|
||||||
|
@ -99,5 +103,7 @@ stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta.description = "man pages for LLDB ${version}";
|
meta = llvm_meta // {
|
||||||
|
description = "man pages for LLDB ${version}";
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv
|
{ lib, stdenv, llvm_meta
|
||||||
, fetch
|
, fetch
|
||||||
, cmake
|
, cmake
|
||||||
, python3
|
, python3
|
||||||
|
@ -160,12 +160,23 @@ in stdenv.mkDerivation (rec {
|
||||||
checkTarget = "check-all";
|
checkTarget = "check-all";
|
||||||
|
|
||||||
requiredSystemFeatures = [ "big-parallel" ];
|
requiredSystemFeatures = [ "big-parallel" ];
|
||||||
meta = {
|
meta = llvm_meta // {
|
||||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
homepage = "https://llvm.org/";
|
||||||
homepage = "https://llvm.org/";
|
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||||
license = lib.licenses.ncsa;
|
longDescription = ''
|
||||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
The LLVM Project is a collection of modular and reusable compiler and
|
||||||
platforms = lib.platforms.all;
|
toolchain technologies. Despite its name, LLVM has little to do with
|
||||||
|
traditional virtual machines. The name "LLVM" itself is not an acronym; it
|
||||||
|
is the full name of the project.
|
||||||
|
LLVM began as a research project at the University of Illinois, with the
|
||||||
|
goal of providing a modern, SSA-based compilation strategy capable of
|
||||||
|
supporting both static and dynamic compilation of arbitrary programming
|
||||||
|
languages. Since then, LLVM has grown to be an umbrella project consisting
|
||||||
|
of a number of subprojects, many of which are being used in production by
|
||||||
|
a wide variety of commercial and open source projects as well as being
|
||||||
|
widely used in academic research. Code in the LLVM project is licensed
|
||||||
|
under the "Apache 2.0 License with LLVM exceptions".
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages {
|
||||||
pname = "llvm-manpages";
|
pname = "llvm-manpages";
|
||||||
|
@ -185,5 +196,7 @@ in stdenv.mkDerivation (rec {
|
||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta.description = "man pages for LLVM ${version}";
|
meta = llvm_meta // {
|
||||||
|
description = "man pages for LLVM ${version}";
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
|
, llvm_meta
|
||||||
, fetch
|
, fetch
|
||||||
, cmake
|
, cmake
|
||||||
, llvm
|
, llvm
|
||||||
|
@ -16,10 +17,18 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [ cmake perl ];
|
nativeBuildInputs = [ cmake perl ];
|
||||||
buildInputs = [ llvm ];
|
buildInputs = [ llvm ];
|
||||||
|
|
||||||
meta = {
|
meta = llvm_meta // {
|
||||||
description = "Components required to build an executable OpenMP program";
|
homepage = "https://openmp.llvm.org/";
|
||||||
homepage = "https://openmp.llvm.org/";
|
description = "Support for the OpenMP language";
|
||||||
license = lib.licenses.mit;
|
longDescription = ''
|
||||||
platforms = lib.platforms.all;
|
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 ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue