aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/compilers/llvm/3.9/clang
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/3.9/clang')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/3.9/clang/0001-Fix-compilation-w-gcc9.patch63
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/3.9/clang/default.nix85
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/3.9/clang/purity.patch16
3 files changed, 0 insertions, 164 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/0001-Fix-compilation-w-gcc9.patch b/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/0001-Fix-compilation-w-gcc9.patch
deleted file mode 100644
index 1058cd03176..00000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/0001-Fix-compilation-w-gcc9.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 7225c7754cc3431d05df367c60f309f27586f188 Mon Sep 17 00:00:00 2001
-From: Maximilian Bosch <maximilian@mbosch.me>
-Date: Mon, 30 Dec 2019 01:42:52 +0100
-Subject: [PATCH] Fix compilation w/gcc9
-
-Build broken with the following errors:
-
-```
-clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
-clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6078:55: error: lambda parameter 'CGF' previously declared as a capture
-clang> 6078 | &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
-clang> | ~~~~~~~~~~~~~~~~~^~~
-clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
-clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6126:53: error: lambda parameter 'CGF' previously declared as a capture
-clang> 6126 | &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
-clang> | ~~~~~~~~~~~~~~~~~^~~
-clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp: In lambda function:
-clang> /build/clang/lib/CodeGen/CGOpenMPRuntime.cpp:6191:56: error: lambda parameter 'CGF' previously declared as a capture
-clang> 6191 | auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
-clang> | ~~~~~~~~~~~~~~~~~^~~
-```
-
-This was due to a bug about name-collisions fixed in GCC 9.0[1].
-
-[1] http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2211
----
- lib/CodeGen/CGOpenMPRuntime.cpp | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp
-index 6a0edbe..96c281c 100644
---- a/lib/CodeGen/CGOpenMPRuntime.cpp
-+++ b/lib/CodeGen/CGOpenMPRuntime.cpp
-@@ -6073,7 +6073,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(CodeGenFunction &CGF,
- // Generate the code for the opening of the data environment. Capture all the
- // arguments of the runtime call by reference because they are used in the
- // closing of the region.
-- auto &&BeginThenGen = [&D, &CGF, &BasePointersArray, &PointersArray,
-+ auto &&BeginThenGen = [&D, &BasePointersArray, &PointersArray,
- &SizesArray, &MapTypesArray, Device,
- &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
- // Fill up the arrays with all the mapped variables.
-@@ -6121,7 +6121,7 @@ void CGOpenMPRuntime::emitTargetDataCalls(CodeGenFunction &CGF,
- };
-
- // Generate code for the closing of the data region.
-- auto &&EndThenGen = [&CGF, &BasePointersArray, &PointersArray, &SizesArray,
-+ auto &&EndThenGen = [&BasePointersArray, &PointersArray, &SizesArray,
- &MapTypesArray, Device,
- &NumOfPtrs](CodeGenFunction &CGF, PrePostActionTy &) {
- assert(BasePointersArray && PointersArray && SizesArray && MapTypesArray &&
-@@ -6188,7 +6188,7 @@ void CGOpenMPRuntime::emitTargetDataStandAloneCall(
- "Expecting either target enter, exit data, or update directives.");
-
- // Generate the code for the opening of the data environment.
-- auto &&ThenGen = [&D, &CGF, Device](CodeGenFunction &CGF, PrePostActionTy &) {
-+ auto &&ThenGen = [&D, Device](CodeGenFunction &CGF, PrePostActionTy &) {
- // Fill up the arrays with all the mapped variables.
- MappableExprsHandler::MapValuesArrayTy BasePointers;
- MappableExprsHandler::MapValuesArrayTy Pointers;
---
-2.23.1
-
diff --git a/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/default.nix
deleted file mode 100644
index 1666b3d842d..00000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/default.nix
+++ /dev/null
@@ -1,85 +0,0 @@
-{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python }:
-
-let
- gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
- self = stdenv.mkDerivation {
- pname = "clang";
- inherit version;
-
- src = fetch "cfe" "0qsyyb40iwifhhlx9a3drf8z6ni6zwyk3bvh0kx2gs6yjsxwxi76";
-
- unpackPhase = ''
- unpackFile $src
- mv cfe-${version}.src clang
- sourceRoot=$PWD/clang
- unpackFile ${clang-tools-extra_src}
- mv clang-tools-extra-* $sourceRoot/tools/extra
- '';
-
- nativeBuildInputs = [ cmake ];
-
- buildInputs = [ libxml2 llvm python ];
-
- cmakeFlags = [
- "-DCMAKE_CXX_FLAGS=-std=c++11"
- ] ++
- # Maybe with compiler-rt this won't be needed?
- (stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++
- (stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");
-
- patches = [
- ./purity.patch
- ./0001-Fix-compilation-w-gcc9.patch
- ];
-
- postPatch = ''
- sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp
- sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
- '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
- sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/Tools.cpp
- '';
-
- outputs = [ "out" "lib" "python" ];
-
- # Clang expects to find LLVMgold in its own prefix
- # Clang expects to find sanitizer libraries in its own prefix
- postInstall = ''
- if [ -e ${llvm}/lib/LLVMgold.so ]; then
- ln -sv ${llvm}/lib/LLVMgold.so $out/lib
- fi
-
- ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
- ln -sv $out/bin/clang $out/bin/cpp
-
- # Move libclang to 'lib' output
- moveToOutput "lib/libclang.*" "$lib"
- substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
- --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang."
-
- mkdir -p $python/bin $python/share/clang/
- mv $out/bin/{git-clang-format,scan-view} $python/bin
- if [ -e $out/bin/set-xcode-analyzer ]; then
- mv $out/bin/set-xcode-analyzer $python/bin
- fi
- mv $out/share/clang/*.py $python/share/clang
-
- rm $out/bin/c-index-test
- '';
-
- enableParallelBuilding = true;
-
- passthru = {
- isClang = true;
- inherit llvm;
- } // stdenv.lib.optionalAttrs stdenv.isLinux {
- inherit gcc;
- };
-
- meta = {
- description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
- homepage = http://llvm.org/;
- license = stdenv.lib.licenses.ncsa;
- platforms = stdenv.lib.platforms.all;
- };
- };
-in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/purity.patch
deleted file mode 100644
index f5fb4c73af4..00000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/3.9/clang/purity.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/lib/Driver/Tools.cpp 2016-08-25 15:48:05.187553443 +0200
-+++ b/lib/Driver/Tools.cpp 2016-08-25 15:48:47.534468882 +0200
-@@ -9420,13 +9420,6 @@
- if (!Args.hasArg(options::OPT_static)) {
- if (Args.hasArg(options::OPT_rdynamic))
- CmdArgs.push_back("-export-dynamic");
--
-- if (!Args.hasArg(options::OPT_shared)) {
-- const std::string Loader =
-- D.DyldPrefix + ToolChain.getDynamicLinker(Args);
-- CmdArgs.push_back("-dynamic-linker");
-- CmdArgs.push_back(Args.MakeArgString(Loader));
-- }
- }
-
- CmdArgs.push_back("-o");