llvmPackages: Fix more inconsistencies
The main thing was using `llvm_meta` in all versions. Secondarily: - libunwindx7: Forgot to split outputs - libcxx{,abi} 12: Forgot to apply output-splitting patches. - simplify `useLLVM` stdenv-switching logic. - openmp always gets its own directory
This commit is contained in:
parent
37194a325d
commit
e830db4320
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
@ -96,11 +96,20 @@ let
|
||||
inherit libllvm;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://clang.llvm.org/";
|
||||
description = "A C language family frontend for LLVM";
|
||||
longDescription = ''
|
||||
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 {
|
||||
pname = "clang-manpages";
|
||||
@ -119,6 +128,8 @@ let
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man page for Clang ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man page for Clang ${version}";
|
||||
};
|
||||
});
|
||||
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
|
||||
|
||||
@ -89,4 +89,20 @@ stdenv.mkDerivation {
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.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 ];
|
||||
};
|
||||
}
|
||||
|
@ -17,6 +17,12 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "06n1yp638rh24xdxv9v2df0qajxbjz4w59b7dd4ky36drwmpi4yh";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
mkExtraBuildCommands0 = cc: ''
|
||||
@ -32,14 +38,16 @@ let
|
||||
|
||||
in {
|
||||
|
||||
libllvm = callPackage ./llvm { };
|
||||
libllvm = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# `llvm` historically had the binaries. When choosing an output explicitly,
|
||||
# we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
|
||||
llvm = tools.libllvm.out // { outputUnspecified = true; };
|
||||
|
||||
libclang = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
inherit clang-tools-extra_src llvm_meta;
|
||||
};
|
||||
|
||||
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
|
||||
@ -83,9 +91,13 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld {};
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {};
|
||||
lldb = callPackage ./lldb {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# Below, is the LLVM bootstrapping logic. It handles building a
|
||||
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
||||
@ -181,12 +193,14 @@ let
|
||||
in {
|
||||
|
||||
compiler-rt-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRtWithLibc
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
compiler-rt-no-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt
|
||||
else stdenv;
|
||||
@ -201,23 +215,30 @@ let
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
libunwind = libraries.libunwind;
|
||||
}));
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libunwind = callPackage ./libunwind ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libunwind = callPackage ./libunwind {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -17,7 +17,9 @@ stdenv.mkDerivation {
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
# Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
|
||||
@ -47,10 +49,15 @@ stdenv.mkDerivation {
|
||||
isLLVM = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxx.llvm.org/";
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "C++ standard library";
|
||||
longDescription = ''
|
||||
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, fetch, libcxx, libunwind, llvm, version
|
||||
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -63,11 +63,15 @@ stdenv.mkDerivation {
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxxabi.llvm.org/";
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
maintainers = with lib.maintainers; [ vlstill ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "Provides C++ standard library support";
|
||||
longDescription = ''
|
||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||
'';
|
||||
# "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, cmake, fetchpatch
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -17,4 +17,16 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
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
|
||||
, buildLlvmTools
|
||||
, fetch
|
||||
, cmake
|
||||
@ -28,10 +28,16 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
description = "The LLVM Linker";
|
||||
homepage = "https://lld.llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
longDescription = ''
|
||||
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
|
||||
, cmake
|
||||
, zlib
|
||||
@ -76,11 +76,15 @@ stdenv.mkDerivation (rec {
|
||||
ln -s $out/bin/llvm-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";
|
||||
homepage = "https://lldb.llvm.org";
|
||||
license = licenses.ncsa;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
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 {
|
||||
pname = "lldb-manpages";
|
||||
@ -104,5 +108,7 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
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
|
||||
, pkgsBuildBuild
|
||||
, fetch
|
||||
, cmake
|
||||
@ -172,12 +172,23 @@ in stdenv.mkDerivation (rec {
|
||||
checkTarget = "check-all";
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||
longDescription = ''
|
||||
The LLVM Project is a collection of modular and reusable compiler and
|
||||
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 {
|
||||
pname = "llvm-manpages";
|
||||
@ -199,5 +210,7 @@ in stdenv.mkDerivation (rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man pages for LLVM ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man pages for LLVM ${version}";
|
||||
};
|
||||
})
|
||||
|
@ -1,25 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
meta = {
|
||||
description = "Components required to build an executable OpenMP program";
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
34
pkgs/development/compilers/llvm/10/openmp/default.nix
Normal file
34
pkgs/development/compilers/llvm/10/openmp/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
@ -95,11 +95,20 @@ let
|
||||
inherit libllvm;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://clang.llvm.org/";
|
||||
description = "A C language family frontend for LLVM";
|
||||
longDescription = ''
|
||||
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 {
|
||||
pname = "clang-manpages";
|
||||
@ -118,6 +127,8 @@ let
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man page for Clang ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man page for Clang ${version}";
|
||||
};
|
||||
});
|
||||
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
|
||||
|
||||
@ -92,4 +92,20 @@ stdenv.mkDerivation {
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.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 ];
|
||||
};
|
||||
}
|
||||
|
@ -19,6 +19,12 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "18n1w1hkv931xzq02b34wglbv6zd6sd0r5kb8piwvag7klj7qw3n";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
mkExtraBuildCommands0 = cc: ''
|
||||
@ -34,14 +40,16 @@ let
|
||||
|
||||
in {
|
||||
|
||||
libllvm = callPackage ./llvm { };
|
||||
libllvm = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# `llvm` historically had the binaries. When choosing an output explicitly,
|
||||
# we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
|
||||
llvm = tools.libllvm.out // { outputUnspecified = true; };
|
||||
|
||||
libclang = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
inherit clang-tools-extra_src llvm_meta;
|
||||
};
|
||||
|
||||
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
|
||||
@ -84,9 +92,13 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld {};
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {};
|
||||
lldb = callPackage ./lldb {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# Below, is the LLVM bootstrapping logic. It handles building a
|
||||
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
||||
@ -182,12 +194,14 @@ let
|
||||
in {
|
||||
|
||||
compiler-rt-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRtWithLibc
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
compiler-rt-no-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt
|
||||
else stdenv;
|
||||
@ -202,23 +216,30 @@ let
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
libunwind = libraries.libunwind;
|
||||
}));
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libunwind = callPackage ./libunwind ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libunwind = callPackage ./libunwind {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
|
||||
{ lib, stdenv, llvm_meta, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -25,7 +25,9 @@ stdenv.mkDerivation {
|
||||
stripLen = 1;
|
||||
})
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
patchShebangs utils/cat_files.py
|
||||
@ -50,10 +52,15 @@ stdenv.mkDerivation {
|
||||
isLLVM = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxx.llvm.org/";
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "C++ standard library";
|
||||
longDescription = ''
|
||||
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, fetch, libcxx, libunwind, llvm, version
|
||||
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -64,11 +64,15 @@ stdenv.mkDerivation {
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxxabi.llvm.org/";
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
maintainers = with lib.maintainers; [ vlstill ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "Provides C++ standard library support";
|
||||
longDescription = ''
|
||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||
'';
|
||||
# "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, cmake, fetchpatch
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -17,4 +17,16 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
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
|
||||
, buildLlvmTools
|
||||
, fetch
|
||||
, cmake
|
||||
@ -28,10 +28,16 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
description = "The LLVM Linker";
|
||||
homepage = "https://lld.llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
longDescription = ''
|
||||
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
|
||||
, cmake
|
||||
, zlib
|
||||
@ -76,11 +76,15 @@ stdenv.mkDerivation (rec {
|
||||
ln -s $out/bin/llvm-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";
|
||||
homepage = "https://lldb.llvm.org";
|
||||
license = licenses.ncsa;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
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 {
|
||||
pname = "lldb-manpages";
|
||||
@ -104,5 +108,7 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
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
|
||||
, pkgsBuildBuild
|
||||
, fetch
|
||||
, cmake
|
||||
@ -174,12 +174,23 @@ in stdenv.mkDerivation (rec {
|
||||
checkTarget = "check-all";
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||
longDescription = ''
|
||||
The LLVM Project is a collection of modular and reusable compiler and
|
||||
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 {
|
||||
pname = "llvm-manpages";
|
||||
@ -201,5 +212,7 @@ in stdenv.mkDerivation (rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man pages for LLVM ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man pages for LLVM ${version}";
|
||||
};
|
||||
})
|
||||
|
@ -1,35 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
|
||||
|
||||
patches = [
|
||||
# Fix compilation on aarch64-darwin, remove after the next release.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
|
||||
sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
meta = {
|
||||
description = "Components required to build an executable OpenMP program";
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
44
pkgs/development/compilers/llvm/11/openmp/default.nix
Normal file
44
pkgs/development/compilers/llvm/11/openmp/default.nix
Normal file
@ -0,0 +1,44 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
|
||||
|
||||
patches = [
|
||||
# Fix compilation on aarch64-darwin, remove after the next release.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
|
||||
sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
|
||||
stripLen = 1;
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -96,7 +96,6 @@ let
|
||||
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
libunwind = libraries.libunwind;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {
|
||||
@ -222,24 +221,31 @@ let
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx ({ inherit llvm_meta; } //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi ({ inherit llvm_meta; } //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
libunwind = libraries.libunwind;
|
||||
}));
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libunwind = callPackage ./libunwind ({
|
||||
libunwind = callPackage ./libunwind {
|
||||
inherit llvm_meta;
|
||||
inherit (buildLlvmTools) llvm;
|
||||
} // lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
});
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp { inherit llvm_meta; };
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -15,7 +15,13 @@ stdenv.mkDerivation {
|
||||
mv llvm-* llvm
|
||||
'';
|
||||
|
||||
patches = lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
patchShebangs utils/cat_files.py
|
||||
|
100
pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch
Normal file
100
pkgs/development/compilers/llvm/12/libcxx/gnu-install-dirs.patch
Normal file
@ -0,0 +1,100 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 9bf1a02f0908..612cd4aab76c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -28,6 +28,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
|
||||
project(libcxx CXX C)
|
||||
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
set(PACKAGE_NAME libcxx)
|
||||
set(PACKAGE_VERSION 12.0.0)
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
@@ -402,7 +404,7 @@ endif ()
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
|
||||
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
if(LIBCXX_LIBDIR_SUBDIR)
|
||||
string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
|
||||
string(APPEND LIBCXX_INSTALL_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
|
||||
@@ -410,11 +412,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
|
||||
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
|
||||
set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR})
|
||||
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
|
||||
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
|
||||
else()
|
||||
set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
|
||||
set(LIBCXX_HEADER_DIR ${CMAKE_BINARY_DIR})
|
||||
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
|
||||
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}")
|
||||
diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
|
||||
index 5d2764e870e9..bb1ec5de6ca2 100644
|
||||
--- a/cmake/Modules/HandleLibCXXABI.cmake
|
||||
+++ b/cmake/Modules/HandleLibCXXABI.cmake
|
||||
@@ -63,7 +63,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
|
||||
|
||||
if (LIBCXX_INSTALL_HEADERS)
|
||||
install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
|
||||
- DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dstdir}
|
||||
+ DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}
|
||||
COMPONENT cxx-headers
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
)
|
||||
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
|
||||
index 29a317b8ae9a..4747263cfd1b 100644
|
||||
--- a/include/CMakeLists.txt
|
||||
+++ b/include/CMakeLists.txt
|
||||
@@ -252,7 +252,7 @@ if (LIBCXX_INSTALL_HEADERS)
|
||||
foreach(file ${files})
|
||||
get_filename_component(dir ${file} DIRECTORY)
|
||||
install(FILES ${file}
|
||||
- DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1/${dir}
|
||||
+ DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dir}
|
||||
COMPONENT cxx-headers
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
)
|
||||
@@ -260,7 +260,7 @@ if (LIBCXX_INSTALL_HEADERS)
|
||||
|
||||
# Install the generated header as __config.
|
||||
install(FILES ${LIBCXX_BINARY_DIR}/__generated_config
|
||||
- DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}include/c++/v1
|
||||
+ DESTINATION ${LIBCXX_INSTALL_HEADER_PREFIX}${CMAKE_INSTALL_INCLUDEDIR}/c++/v1
|
||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||
RENAME __config
|
||||
COMPONENT cxx-headers)
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 9965104cb5b2..9b55dbb1d822 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -352,21 +352,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY)
|
||||
install(TARGETS cxx_shared
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
- RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
+ RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
if (LIBCXX_INSTALL_STATIC_LIBRARY)
|
||||
install(TARGETS cxx_static
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
- RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
+ RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
|
||||
install(TARGETS cxx_experimental
|
||||
LIBRARY DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
ARCHIVE DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
|
||||
- RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}bin COMPONENT cxx)
|
||||
+ RUNTIME DESTINATION ${LIBCXX_INSTALL_PREFIX}${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
|
||||
endif()
|
||||
|
||||
# NOTE: This install command must go after the cxx install command otherwise
|
@ -8,18 +8,7 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetch "libcxxabi" "1cbmzspwjlr8f6sp73pw6ivf4dpg6rpc61by0q1m2zca2k6yif3a";
|
||||
|
||||
nativeBuildInputs = [ cmake python3 ];
|
||||
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
||||
|
||||
cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isWasm [
|
||||
"-DLIBCXXABI_ENABLE_THREADS=OFF"
|
||||
"-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
|
||||
] ++ lib.optionals (!enableShared) [
|
||||
"-DLIBCXXABI_ENABLE_SHARED=OFF"
|
||||
];
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxx.src}
|
||||
@ -34,6 +23,23 @@ stdenv.mkDerivation {
|
||||
patch -p1 -d llvm -i ${./wasm.patch}
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake python3 ];
|
||||
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
|
||||
|
||||
cmakeFlags = lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||
"-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isWasm [
|
||||
"-DLIBCXXABI_ENABLE_THREADS=OFF"
|
||||
"-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
|
||||
] ++ lib.optionals (!enableShared) [
|
||||
"-DLIBCXXABI_ENABLE_SHARED=OFF"
|
||||
];
|
||||
|
||||
installPhase = if stdenv.isDarwin
|
||||
then ''
|
||||
for file in lib/*.dylib; do
|
||||
|
@ -0,0 +1,34 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 426c855288fc..a9812a994f53 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
|
||||
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
|
||||
project(libcxxabi CXX C)
|
||||
|
||||
+ include(GNUInstallDirs)
|
||||
+
|
||||
set(PACKAGE_NAME libcxxabi)
|
||||
set(PACKAGE_VERSION 11.0.0)
|
||||
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
|
||||
@@ -180,17 +182,17 @@ set(CMAKE_MODULE_PATH
|
||||
|
||||
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
|
||||
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++)
|
||||
if(LIBCXX_LIBDIR_SUBDIR)
|
||||
string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
|
||||
string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
|
||||
endif()
|
||||
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
|
||||
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
|
||||
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
|
||||
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
|
||||
else()
|
||||
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
|
||||
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
|
||||
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
|
||||
endif()
|
||||
|
||||
set(LIBCXXABI_INSTALL_PREFIX "" CACHE STRING "Define libc++abi destination prefix.")
|
@ -18,6 +18,13 @@ stdenv.mkDerivation rec {
|
||||
./gnu-install-dirs.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace MachO/CMakeLists.txt --replace \
|
||||
'(''${LLVM_MAIN_SRC_DIR}/' '('
|
||||
mkdir -p libunwind/include
|
||||
tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
buildInputs = [ libllvm libxml2 ];
|
||||
|
||||
@ -29,13 +36,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace MachO/CMakeLists.txt --replace \
|
||||
'(''${LLVM_MAIN_SRC_DIR}/' '('
|
||||
mkdir -p libunwind/include
|
||||
tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
|
||||
'';
|
||||
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
||||
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
|
||||
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.
|
||||
'';
|
||||
|
@ -205,6 +205,8 @@ in stdenv.mkDerivation (rec {
|
||||
make docs-llvm-man
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [];
|
||||
|
||||
installPhase = ''
|
||||
make -C docs install
|
||||
'';
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
@ -88,11 +88,20 @@ let
|
||||
inherit libllvm;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://clang.llvm.org/";
|
||||
description = "A C language family frontend for LLVM";
|
||||
longDescription = ''
|
||||
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 {
|
||||
pname = "clang-manpages";
|
||||
@ -111,6 +120,8 @@ let
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man page for Clang ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man page for Clang ${version}";
|
||||
};
|
||||
});
|
||||
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
|
||||
|
||||
@ -86,4 +86,19 @@ stdenv.mkDerivation {
|
||||
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/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 ];
|
||||
};
|
||||
}
|
||||
|
@ -16,30 +16,41 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "018b3fiwah8f8br5i26qmzh6sjvzchpn358sn8v079m49f2jldm3";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
mkExtraBuildCommands = cc: ''
|
||||
rsrc="$out/resource-root"
|
||||
mkdir "$rsrc"
|
||||
ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
'';
|
||||
|
||||
in {
|
||||
|
||||
libllvm = callPackage ./llvm { };
|
||||
libllvm = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# `llvm` historically had the binaries. When choosing an output explicitly,
|
||||
# we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
|
||||
llvm = tools.libllvm.out // { outputUnspecified = true; };
|
||||
|
||||
libllvm-polly = callPackage ./llvm { enablePolly = true; };
|
||||
libllvm-polly = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
enablePolly = true;
|
||||
};
|
||||
|
||||
llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
|
||||
|
||||
libclang = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
inherit clang-tools-extra_src llvm_meta;
|
||||
};
|
||||
|
||||
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
|
||||
@ -76,26 +87,38 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld {};
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {};
|
||||
lldb = callPackage ./lldb {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
libraries = lib.makeExtensible (libraries: let
|
||||
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
||||
in {
|
||||
|
||||
compiler-rt = callPackage ./compiler-rt {};
|
||||
compiler-rt = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
stdenv = overrideCC stdenv buildLlvmTools.clang;
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx {};
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi {};
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "libcxx";
|
||||
@ -45,10 +45,15 @@ stdenv.mkDerivation {
|
||||
isLLVM = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxx.llvm.org/";
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
platforms = lib.platforms.unix;
|
||||
description = "C++ standard library";
|
||||
longDescription = ''
|
||||
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, fetch, libcxx, libunwind, llvm, version }:
|
||||
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "libcxxabi";
|
||||
@ -47,11 +47,15 @@ stdenv.mkDerivation {
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxxabi.llvm.org/";
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
maintainers = with lib.maintainers; [ vlstill ];
|
||||
platforms = lib.platforms.unix;
|
||||
description = "Provides C++ standard library support";
|
||||
longDescription = ''
|
||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||
'';
|
||||
# "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
|
||||
{ lib, stdenv, llvm_meta
|
||||
, buildLlvmTools
|
||||
, fetch
|
||||
, cmake
|
||||
@ -6,7 +6,7 @@
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lld";
|
||||
inherit version;
|
||||
|
||||
@ -27,11 +27,16 @@ stdenv.mkDerivation {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
description = "The LLVM Linker";
|
||||
homepage = "https://lld.llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
badPlatforms = [ "x86_64-darwin" ];
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
longDescription = ''
|
||||
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), and Mach-O (macOS)
|
||||
in descending order of completeness. Internally, LLD consists
|
||||
of several different linkers.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, cmake
|
||||
@ -73,10 +73,14 @@ stdenv.mkDerivation rec {
|
||||
cp ../docs/lldb.1 $out/share/man/man1/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lldb.llvm.org/";
|
||||
description = "A next-generation high-performance debugger";
|
||||
homepage = "https://llvm.org/";
|
||||
license = licenses.ncsa;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
of reusable components which highly leverage existing libraries in the
|
||||
larger LLVM Project, such as the Clang expression parser and LLVM
|
||||
disassembler.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, pkgsBuildBuild
|
||||
, fetch
|
||||
, fetchpatch
|
||||
@ -173,12 +173,23 @@ stdenv.mkDerivation ({
|
||||
checkTarget = "check-all";
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||
longDescription = ''
|
||||
The LLVM Project is a collection of modular and reusable compiler and
|
||||
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 {
|
||||
pname = "llvm-manpages";
|
||||
@ -197,5 +208,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man pages for LLVM ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man pages for LLVM ${version}";
|
||||
};
|
||||
})
|
||||
|
@ -1,25 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "0p2n52676wlq6y9q99n5pivq6pvvda1p994r69fxj206ahn59jir";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
meta = {
|
||||
description = "Components required to build an executable OpenMP program";
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
34
pkgs/development/compilers/llvm/5/openmp/default.nix
Normal file
34
pkgs/development/compilers/llvm/5/openmp/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "0p2n52676wlq6y9q99n5pivq6pvvda1p994r69fxj206ahn59jir";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
@ -88,11 +88,20 @@ let
|
||||
inherit libllvm;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://clang.llvm.org/";
|
||||
description = "A C language family frontend for LLVM";
|
||||
longDescription = ''
|
||||
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 {
|
||||
pname = "clang-manpages";
|
||||
@ -111,6 +120,8 @@ let
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man page for Clang ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man page for Clang ${version}";
|
||||
};
|
||||
});
|
||||
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
|
||||
|
||||
@ -88,4 +88,19 @@ stdenv.mkDerivation {
|
||||
ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/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 ];
|
||||
};
|
||||
}
|
||||
|
@ -16,30 +16,41 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "1w8ml7fyn4vyxmy59n2qm4r1k1kgwgwkaldp6m45fdv4g0kkfbhd";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
mkExtraBuildCommands = cc: ''
|
||||
rsrc="$out/resource-root"
|
||||
mkdir "$rsrc"
|
||||
ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
|
||||
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
|
||||
'';
|
||||
|
||||
in {
|
||||
|
||||
libllvm = callPackage ./llvm { };
|
||||
libllvm = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# `llvm` historically had the binaries. When choosing an output explicitly,
|
||||
# we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
|
||||
llvm = tools.libllvm.out // { outputUnspecified = true; };
|
||||
|
||||
libllvm-polly = callPackage ./llvm { enablePolly = true; };
|
||||
libllvm-polly = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
enablePolly = true;
|
||||
};
|
||||
|
||||
llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
|
||||
|
||||
libclang = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
inherit clang-tools-extra_src llvm_meta;
|
||||
};
|
||||
|
||||
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
|
||||
@ -77,26 +88,38 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld {};
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {};
|
||||
lldb = callPackage ./lldb {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
libraries = lib.makeExtensible (libraries: let
|
||||
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
|
||||
in {
|
||||
|
||||
compiler-rt = callPackage ./compiler-rt {};
|
||||
compiler-rt = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
stdenv = overrideCC stdenv buildLlvmTools.clang;
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx {};
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi {};
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "libcxx";
|
||||
@ -45,10 +45,15 @@ stdenv.mkDerivation {
|
||||
isLLVM = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxx.llvm.org/";
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
platforms = lib.platforms.unix;
|
||||
description = "C++ standard library";
|
||||
longDescription = ''
|
||||
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, fetch, libcxx, libunwind, llvm, version }:
|
||||
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "libcxxabi";
|
||||
@ -47,11 +47,15 @@ stdenv.mkDerivation {
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxxabi.llvm.org/";
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
maintainers = with lib.maintainers; [ vlstill ];
|
||||
platforms = lib.platforms.unix;
|
||||
description = "Provides C++ standard library support";
|
||||
longDescription = ''
|
||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||
'';
|
||||
# "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
|
||||
{ lib, stdenv, llvm_meta
|
||||
, buildLlvmTools
|
||||
, fetch
|
||||
, cmake
|
||||
@ -7,11 +7,11 @@
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lld";
|
||||
inherit version;
|
||||
|
||||
src = fetch "lld" "04afcfq2h7ysyqxxhyhb7ig4p0vdw7mi63kh8mffl74j0rc781p7";
|
||||
src = fetch pname "04afcfq2h7ysyqxxhyhb7ig4p0vdw7mi63kh8mffl74j0rc781p7";
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
@ -28,10 +28,16 @@ stdenv.mkDerivation {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
description = "The LLVM Linker";
|
||||
homepage = "https://lld.llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
longDescription = ''
|
||||
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), and Mach-O (macOS)
|
||||
in descending order of completeness. Internally, LLD consists
|
||||
of several different linkers.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, fetch
|
||||
, fetchpatch
|
||||
, cmake
|
||||
@ -73,10 +73,14 @@ stdenv.mkDerivation rec {
|
||||
cp ../docs/lldb.1 $out/share/man/man1/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lldb.llvm.org/";
|
||||
description = "A next-generation high-performance debugger";
|
||||
homepage = "https://llvm.org/";
|
||||
license = licenses.ncsa;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
of reusable components which highly leverage existing libraries in the
|
||||
larger LLVM Project, such as the Clang expression parser and LLVM
|
||||
disassembler.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, pkgsBuildBuild
|
||||
, fetch
|
||||
, cmake
|
||||
@ -167,12 +167,23 @@ stdenv.mkDerivation ({
|
||||
checkTarget = "check-all";
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||
longDescription = ''
|
||||
The LLVM Project is a collection of modular and reusable compiler and
|
||||
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 {
|
||||
pname = "llvm-manpages";
|
||||
@ -191,5 +202,7 @@ stdenv.mkDerivation ({
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man pages for LLVM ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man pages for LLVM ${version}";
|
||||
};
|
||||
})
|
||||
|
@ -1,25 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "0nhwfba9c351r16zgyjyfwdayr98nairky3c2f0b2lc360mwmbv6";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
meta = {
|
||||
description = "Components required to build an executable OpenMP program";
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
34
pkgs/development/compilers/llvm/6/openmp/default.nix
Normal file
34
pkgs/development/compilers/llvm/6/openmp/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "0nhwfba9c351r16zgyjyfwdayr98nairky3c2f0b2lc360mwmbv6";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
@ -100,11 +100,20 @@ let
|
||||
inherit libllvm;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://clang.llvm.org/";
|
||||
description = "A C language family frontend for LLVM";
|
||||
longDescription = ''
|
||||
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 {
|
||||
pname = "clang-manpages";
|
||||
@ -123,6 +132,8 @@ let
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man page for Clang ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man page for Clang ${version}";
|
||||
};
|
||||
});
|
||||
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
|
||||
|
||||
@ -90,4 +90,20 @@ stdenv.mkDerivation {
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.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 ];
|
||||
};
|
||||
}
|
||||
|
@ -17,6 +17,12 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "0lb4kdh7j2fhfz8kd6iv5df7m3pikiryk1vvwsf87spc90n09q0w";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
mkExtraBuildCommands0 = cc: ''
|
||||
@ -31,23 +37,29 @@ let
|
||||
|
||||
in {
|
||||
|
||||
libllvm = callPackage ./llvm { };
|
||||
libllvm = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# `llvm` historically had the binaries. When choosing an output explicitly,
|
||||
# we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
|
||||
llvm = tools.libllvm.out // { outputUnspecified = true; };
|
||||
|
||||
libllvm-polly = callPackage ./llvm { enablePolly = true; };
|
||||
libllvm-polly = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
enablePolly = true;
|
||||
};
|
||||
|
||||
llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
|
||||
|
||||
libclang = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
inherit clang-tools-extra_src llvm_meta;
|
||||
};
|
||||
|
||||
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
|
||||
|
||||
clang-polly-unwrapped = callPackage ./clang {
|
||||
inherit llvm_meta;
|
||||
inherit clang-tools-extra_src;
|
||||
libllvm = tools.libllvm-polly;
|
||||
enablePolly = true;
|
||||
@ -85,9 +97,13 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld {};
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {};
|
||||
lldb = callPackage ./lldb {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# Below, is the LLVM bootstrapping logic. It handles building a
|
||||
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
||||
@ -183,12 +199,14 @@ let
|
||||
in {
|
||||
|
||||
compiler-rt-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRtWithLibc
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
compiler-rt-no-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt
|
||||
else stdenv;
|
||||
@ -203,24 +221,31 @@ let
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
libunwind = libraries.libunwind;
|
||||
}));
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libunwind = callPackage ./libunwind ({
|
||||
libunwind = callPackage ./libunwind {
|
||||
inherit llvm_meta;
|
||||
inherit (buildLlvmTools) llvm;
|
||||
} // lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
});
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -17,7 +17,9 @@ stdenv.mkDerivation {
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
|
||||
@ -34,7 +36,7 @@ stdenv.mkDerivation {
|
||||
++ lib.optional stdenv.hostPlatform.isMusl python3
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||
|
||||
buildInputs = [ libcxxabi ] ;
|
||||
buildInputs = [ libcxxabi ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
|
||||
@ -48,10 +50,15 @@ stdenv.mkDerivation {
|
||||
isLLVM = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxx.llvm.org/";
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
platforms = lib.platforms.unix;
|
||||
description = "C++ standard library";
|
||||
longDescription = ''
|
||||
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, fetch, libcxx, libunwind, llvm, version
|
||||
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
|
||||
, standalone ? stdenv.hostPlatform.useLLVM or false
|
||||
, withLibunwind ? !stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm
|
||||
# on musl the shared objects don't build
|
||||
@ -58,11 +58,15 @@ stdenv.mkDerivation {
|
||||
${lib.optionalString enableShared "ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1"}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxxabi.llvm.org/";
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
maintainers = with lib.maintainers; [ vlstill ];
|
||||
platforms = lib.platforms.unix;
|
||||
description = "Provides C++ standard library support";
|
||||
longDescription = ''
|
||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||
'';
|
||||
# "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,12 +1,12 @@
|
||||
{ lib, stdenv, version, fetch, fetchpatch, cmake, llvm
|
||||
{ lib, stdenv, llvm_meta, version, fetch, fetchpatch, cmake, llvm
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libunwind";
|
||||
inherit version;
|
||||
|
||||
src = fetch "libunwind" "035dsxs10nyiqd00q07yycvmkjl01yz4jdlrjvmch8klxg4pyjhp";
|
||||
src = fetch pname "035dsxs10nyiqd00q07yycvmkjl01yz4jdlrjvmch8klxg4pyjhp";
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${llvm.src}
|
||||
@ -29,6 +29,8 @@ stdenv.mkDerivation {
|
||||
})
|
||||
];
|
||||
|
||||
outputs = [ "out" "dev" ];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = lib.optionals (!enableShared) [
|
||||
@ -36,4 +38,16 @@ stdenv.mkDerivation {
|
||||
] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
|
||||
"-DLLVM_ENABLE_LIBCXX=ON"
|
||||
];
|
||||
|
||||
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
|
||||
, buildLlvmTools
|
||||
, fetch
|
||||
, cmake
|
||||
@ -7,11 +7,11 @@
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lld";
|
||||
inherit version;
|
||||
|
||||
src = fetch "lld" "0rsqb7zcnij5r5ipfhr129j7skr5n9pyr388kjpqwh091952f3x1";
|
||||
src = fetch pname "0rsqb7zcnij5r5ipfhr129j7skr5n9pyr388kjpqwh091952f3x1";
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
@ -28,10 +28,16 @@ stdenv.mkDerivation {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
description = "The LLVM Linker";
|
||||
homepage = "https://lld.llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
longDescription = ''
|
||||
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), and Mach-O (macOS)
|
||||
in descending order of completeness. Internally, LLD consists
|
||||
of several different linkers.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, fetch
|
||||
, cmake
|
||||
, zlib
|
||||
@ -76,10 +76,14 @@ stdenv.mkDerivation rec {
|
||||
cp ../docs/lldb.1 $out/share/man/man1/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lldb.llvm.org/";
|
||||
description = "A next-generation high-performance debugger";
|
||||
homepage = "https://llvm.org/";
|
||||
license = licenses.ncsa;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
of reusable components which highly leverage existing libraries in the
|
||||
larger LLVM Project, such as the Clang expression parser and LLVM
|
||||
disassembler.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, pkgsBuildBuild
|
||||
, fetch
|
||||
, fetchpatch
|
||||
@ -184,12 +184,23 @@ in stdenv.mkDerivation ({
|
||||
checkTarget = "check-all";
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||
longDescription = ''
|
||||
The LLVM Project is a collection of modular and reusable compiler and
|
||||
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 {
|
||||
pname = "llvm-manpages";
|
||||
@ -211,5 +222,7 @@ in stdenv.mkDerivation ({
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man pages for LLVM ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man pages for LLVM ${version}";
|
||||
};
|
||||
})
|
||||
|
@ -1,25 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "1dg53wzsci2kra8lh1y0chh60h2l8h1by93br5spzvzlxshkmrqy";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
meta = {
|
||||
description = "Components required to build an executable OpenMP program";
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
34
pkgs/development/compilers/llvm/7/openmp/default.nix
Normal file
34
pkgs/development/compilers/llvm/7/openmp/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "1dg53wzsci2kra8lh1y0chh60h2l8h1by93br5spzvzlxshkmrqy";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
@ -107,11 +107,20 @@ let
|
||||
inherit libllvm;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://clang.llvm.org/";
|
||||
description = "A C language family frontend for LLVM";
|
||||
longDescription = ''
|
||||
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 {
|
||||
pname = "clang-manpages";
|
||||
@ -130,6 +139,8 @@ let
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man page for Clang ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man page for Clang ${version}";
|
||||
};
|
||||
});
|
||||
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
|
||||
|
||||
@ -90,4 +90,20 @@ stdenv.mkDerivation {
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.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 ];
|
||||
};
|
||||
}
|
||||
|
@ -17,6 +17,12 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
mkExtraBuildCommands0 = cc: ''
|
||||
@ -31,23 +37,29 @@ let
|
||||
|
||||
in {
|
||||
|
||||
libllvm = callPackage ./llvm { };
|
||||
libllvm = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# `llvm` historically had the binaries. When choosing an output explicitly,
|
||||
# we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
|
||||
llvm = tools.libllvm.out // { outputUnspecified = true; };
|
||||
|
||||
libllvm-polly = callPackage ./llvm { enablePolly = true; };
|
||||
libllvm-polly = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
enablePolly = true;
|
||||
};
|
||||
|
||||
llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
|
||||
|
||||
libclang = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
inherit clang-tools-extra_src llvm_meta;
|
||||
};
|
||||
|
||||
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
|
||||
|
||||
clang-polly-unwrapped = callPackage ./clang {
|
||||
inherit llvm_meta;
|
||||
inherit clang-tools-extra_src;
|
||||
libllvm = tools.libllvm-polly;
|
||||
enablePolly = true;
|
||||
@ -86,9 +98,13 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld {};
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {};
|
||||
lldb = callPackage ./lldb {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# Below, is the LLVM bootstrapping logic. It handles building a
|
||||
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
||||
@ -184,12 +200,14 @@ let
|
||||
in {
|
||||
|
||||
compiler-rt-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRtWithLibc
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
compiler-rt-no-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt
|
||||
else stdenv;
|
||||
@ -204,23 +222,30 @@ let
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
libunwind = libraries.libunwind;
|
||||
}));
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libunwind = callPackage ./libunwind ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libunwind = callPackage ./libunwind {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -17,7 +17,9 @@ stdenv.mkDerivation {
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
|
||||
@ -51,10 +53,15 @@ stdenv.mkDerivation {
|
||||
isLLVM = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxx.llvm.org/";
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "C++ standard library";
|
||||
longDescription = ''
|
||||
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, fetch, libcxx, libunwind, llvm, version
|
||||
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -63,11 +63,15 @@ stdenv.mkDerivation {
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxxabi.llvm.org/";
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
maintainers = with lib.maintainers; [ vlstill ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "Provides C++ standard library support";
|
||||
longDescription = ''
|
||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||
'';
|
||||
# "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, cmake, fetchpatch
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -25,4 +25,16 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
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
|
||||
, buildLlvmTools
|
||||
, fetch
|
||||
, cmake
|
||||
@ -7,11 +7,11 @@
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lld";
|
||||
inherit version;
|
||||
|
||||
src = fetch "lld" "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz";
|
||||
src = fetch pname "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz";
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
@ -28,10 +28,16 @@ stdenv.mkDerivation {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
description = "The LLVM Linker";
|
||||
homepage = "https://lld.llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
longDescription = ''
|
||||
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
|
||||
, cmake
|
||||
, zlib
|
||||
@ -70,10 +70,14 @@ stdenv.mkDerivation rec {
|
||||
ln -s $out/bin/llvm-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";
|
||||
homepage = "https://llvm.org/";
|
||||
license = licenses.ncsa;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
of reusable components which highly leverage existing libraries in the
|
||||
larger LLVM Project, such as the Clang expression parser and LLVM
|
||||
disassembler.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, pkgsBuildBuild
|
||||
, fetch
|
||||
, fetchpatch
|
||||
@ -168,12 +168,23 @@ in stdenv.mkDerivation ({
|
||||
checkTarget = "check-all";
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||
longDescription = ''
|
||||
The LLVM Project is a collection of modular and reusable compiler and
|
||||
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 {
|
||||
pname = "llvm-manpages";
|
||||
@ -195,5 +206,7 @@ in stdenv.mkDerivation ({
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man pages for LLVM ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man pages for LLVM ${version}";
|
||||
};
|
||||
})
|
||||
|
@ -1,25 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
meta = {
|
||||
description = "Components required to build an executable OpenMP program";
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
34
pkgs/development/compilers/llvm/8/openmp/default.nix
Normal file
34
pkgs/development/compilers/llvm/8/openmp/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
||||
, buildLlvmTools
|
||||
, fixDarwinDylibNames
|
||||
, enableManpages ? false
|
||||
@ -102,11 +102,20 @@ let
|
||||
inherit libllvm;
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://clang.llvm.org/";
|
||||
description = "A C language family frontend for LLVM";
|
||||
longDescription = ''
|
||||
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 {
|
||||
pname = "clang-manpages";
|
||||
@ -125,6 +134,8 @@ let
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man page for Clang ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man page for Clang ${version}";
|
||||
};
|
||||
});
|
||||
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
|
||||
|
||||
@ -89,4 +89,20 @@ stdenv.mkDerivation {
|
||||
ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.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 ];
|
||||
};
|
||||
}
|
||||
|
@ -17,6 +17,12 @@ let
|
||||
|
||||
clang-tools-extra_src = fetch "clang-tools-extra" "01vgzd4k1q93nfs8gyl83mjlc4x0qsgfqw32lacbjzdxg0mdfvxj";
|
||||
|
||||
llvm_meta = {
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
tools = lib.makeExtensible (tools: let
|
||||
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch buildLlvmTools; });
|
||||
mkExtraBuildCommands0 = cc: ''
|
||||
@ -31,23 +37,29 @@ let
|
||||
|
||||
in {
|
||||
|
||||
libllvm = callPackage ./llvm { };
|
||||
libllvm = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# `llvm` historically had the binaries. When choosing an output explicitly,
|
||||
# we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
|
||||
llvm = tools.libllvm.out // { outputUnspecified = true; };
|
||||
|
||||
libllvm-polly = callPackage ./llvm { enablePolly = true; };
|
||||
libllvm-polly = callPackage ./llvm {
|
||||
inherit llvm_meta;
|
||||
enablePolly = true;
|
||||
};
|
||||
|
||||
llvm-polly = tools.libllvm-polly.lib // { outputUnspecified = true; };
|
||||
|
||||
libclang = callPackage ./clang {
|
||||
inherit clang-tools-extra_src;
|
||||
inherit clang-tools-extra_src llvm_meta;
|
||||
};
|
||||
|
||||
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
|
||||
|
||||
clang-polly-unwrapped = callPackage ./clang {
|
||||
inherit llvm_meta;
|
||||
inherit clang-tools-extra_src;
|
||||
libllvm = tools.libllvm-polly;
|
||||
enablePolly = true;
|
||||
@ -86,9 +98,13 @@ let
|
||||
extraBuildCommands = mkExtraBuildCommands cc;
|
||||
};
|
||||
|
||||
lld = callPackage ./lld {};
|
||||
lld = callPackage ./lld {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
lldb = callPackage ./lldb {};
|
||||
lldb = callPackage ./lldb {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
|
||||
# Below, is the LLVM bootstrapping logic. It handles building a
|
||||
# fully LLVM toolchain from scratch. No GCC toolchain should be
|
||||
@ -184,12 +200,14 @@ let
|
||||
in {
|
||||
|
||||
compiler-rt-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRtWithLibc
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
compiler-rt-no-libc = callPackage ./compiler-rt {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt
|
||||
else stdenv;
|
||||
@ -204,23 +222,30 @@ let
|
||||
|
||||
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
|
||||
|
||||
libcxx = callPackage ./libcxx ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libcxx = callPackage ./libcxx {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libcxxabi = callPackage ./libcxxabi ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
libunwind = libraries.libunwind;
|
||||
}));
|
||||
libcxxabi = callPackage ./libcxxabi {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
libunwind = callPackage ./libunwind ({} //
|
||||
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
|
||||
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
|
||||
}));
|
||||
libunwind = callPackage ./libunwind {
|
||||
inherit llvm_meta;
|
||||
stdenv = if stdenv.hostPlatform.useLLVM or false
|
||||
then overrideCC stdenv buildLlvmTools.lldClangNoLibcxx
|
||||
else stdenv;
|
||||
};
|
||||
|
||||
openmp = callPackage ./openmp.nix {};
|
||||
openmp = callPackage ./openmp {
|
||||
inherit llvm_meta;
|
||||
};
|
||||
});
|
||||
|
||||
in { inherit tools libraries; } // libraries // tools
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -17,7 +17,9 @@ stdenv.mkDerivation {
|
||||
|
||||
patches = [
|
||||
./gnu-install-dirs.patch
|
||||
] ++ lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
|
||||
] ++ lib.optionals stdenv.hostPlatform.isMusl [
|
||||
../../libcxx-0001-musl-hacks.patch
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
# Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
|
||||
@ -47,10 +49,15 @@ stdenv.mkDerivation {
|
||||
isLLVM = true;
|
||||
};
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxx.llvm.org/";
|
||||
description = "A new implementation of the C++ standard library, targeting C++11";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "C++ standard library";
|
||||
longDescription = ''
|
||||
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, fetch, libcxx, libunwind, llvm, version
|
||||
{ lib, stdenv, llvm_meta, cmake, fetch, libcxx, libunwind, llvm, version
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -63,11 +63,15 @@ stdenv.mkDerivation {
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
||||
meta = {
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://libcxxabi.llvm.org/";
|
||||
description = "A new implementation of low level support for a standard C++ library";
|
||||
license = with lib.licenses; [ ncsa mit ];
|
||||
maintainers = with lib.maintainers; [ vlstill ];
|
||||
platforms = lib.platforms.all;
|
||||
description = "Provides C++ standard library support";
|
||||
longDescription = ''
|
||||
libc++abi is a new implementation of low level support for a standard C++ library.
|
||||
'';
|
||||
# "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, cmake, fetchpatch
|
||||
{ lib, stdenv, llvm_meta, version, fetch, cmake, fetchpatch
|
||||
, enableShared ? !stdenv.hostPlatform.isStatic
|
||||
}:
|
||||
|
||||
@ -17,4 +17,16 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
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
|
||||
, buildLlvmTools
|
||||
, fetch
|
||||
, cmake
|
||||
@ -28,10 +28,16 @@ stdenv.mkDerivation rec {
|
||||
|
||||
outputs = [ "out" "lib" "dev" ];
|
||||
|
||||
meta = {
|
||||
description = "The LLVM Linker";
|
||||
homepage = "https://lld.llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://lld.llvm.org/";
|
||||
description = "The LLVM linker";
|
||||
longDescription = ''
|
||||
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
|
||||
, cmake
|
||||
, zlib
|
||||
@ -70,10 +70,14 @@ stdenv.mkDerivation rec {
|
||||
ln -s $out/bin/llvm-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";
|
||||
homepage = "https://llvm.org/";
|
||||
license = licenses.ncsa;
|
||||
platforms = platforms.all;
|
||||
longDescription = ''
|
||||
LLDB is a next generation, high-performance debugger. It is built as a set
|
||||
of reusable components which highly leverage existing libraries in the
|
||||
larger LLVM Project, such as the Clang expression parser and LLVM
|
||||
disassembler.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ lib, stdenv
|
||||
{ lib, stdenv, llvm_meta
|
||||
, pkgsBuildBuild
|
||||
, fetch
|
||||
, cmake
|
||||
@ -179,12 +179,23 @@ in stdenv.mkDerivation (rec {
|
||||
checkTarget = "check-all";
|
||||
|
||||
requiredSystemFeatures = [ "big-parallel" ];
|
||||
meta = {
|
||||
description = "Collection of modular and reusable compiler and toolchain technologies";
|
||||
homepage = "https://llvm.org/";
|
||||
license = lib.licenses.ncsa;
|
||||
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill ];
|
||||
platforms = lib.platforms.all;
|
||||
meta = llvm_meta // {
|
||||
homepage = "https://llvm.org/";
|
||||
description = "A collection of modular and reusable compiler and toolchain technologies";
|
||||
longDescription = ''
|
||||
The LLVM Project is a collection of modular and reusable compiler and
|
||||
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 {
|
||||
pname = "llvm-manpages";
|
||||
@ -206,5 +217,7 @@ in stdenv.mkDerivation (rec {
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta.description = "man pages for LLVM ${version}";
|
||||
meta = llvm_meta // {
|
||||
description = "man pages for LLVM ${version}";
|
||||
};
|
||||
})
|
||||
|
@ -1,25 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
meta = {
|
||||
description = "Components required to build an executable OpenMP program";
|
||||
homepage = "https://openmp.llvm.org/";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
34
pkgs/development/compilers/llvm/9/openmp/default.nix
Normal file
34
pkgs/development/compilers/llvm/9/openmp/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, llvm_meta
|
||||
, fetch
|
||||
, cmake
|
||||
, llvm
|
||||
, perl
|
||||
, version
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "openmp";
|
||||
inherit version;
|
||||
|
||||
src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w";
|
||||
|
||||
nativeBuildInputs = [ cmake perl ];
|
||||
buildInputs = [ llvm ];
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user