about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers/llvm/8
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/llvm/8')
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/bintools/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/default.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch16
9 files changed, 4 insertions, 129 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/bintools/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/bintools/default.nix
deleted file mode 100644
index 38002439c205..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/8/bintools/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ lib, runCommand, stdenv, llvm, lld, version }:
-
-let
-  prefix = lib.optionalString (stdenv.hostPlatform != stdenv.targetPlatform) "${stdenv.targetPlatform.config}-";
-in runCommand "llvm-binutils-${version}" {
-  preferLocalBuild = true;
-  passthru = {
-    isLLVM = true;
-  };
-} ''
-   mkdir -p $out/bin
-   for prog in ${lld}/bin/*; do
-     ln -s $prog $out/bin/${prefix}$(basename $prog)
-   done
-   for prog in ${llvm}/bin/*; do
-     ln -sf $prog $out/bin/${prefix}$(basename $prog)
-   done
-
-   ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
-   ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}dlltool
-   ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ranlib
-   ln -s ${llvm}/bin/llvm-cxxfilt $out/bin/${prefix}c++filt
-   ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
-   ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
-   ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
-   ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}strip
-   ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
-   ln -s ${llvm}/bin/llvm-readobj $out/bin/${prefix}readelf
-   ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
-   ln -s ${llvm}/bin/llvm-strings $out/bin/${prefix}strings
-   ln -s ${llvm}/bin/llvm-symbolizer $out/bin/${prefix}addr2line
-
-   ln -s ${lld}/bin/lld $out/bin/${prefix}ld
-''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix
index 0d0af5ab6aa6..994f9bd967c4 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix
@@ -45,7 +45,7 @@ let
     ];
 
     patches = [
-      ./purity.patch
+      ../../common/clang/5-8-purity.patch
       ./xpc.patch
       # Backport for -static-pie, which the latter touches, and which is nice in
       # its own right.
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch
deleted file mode 100644
index b30d0d0b5d5b..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Thu, 18 May 2017 11:56:12 -0500
-Subject: [PATCH] "purity" patch for 5.0
-
----
- lib/Driver/ToolChains/Gnu.cpp | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
-index fe3c0191bb..c6a482bece 100644
---- a/lib/Driver/ToolChains/Gnu.cpp
-+++ b/lib/Driver/ToolChains/Gnu.cpp
-@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
-   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");
--- 
-2.11.0
-
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/codesign.patch
deleted file mode 100644
index 3cc12b94b200..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/codesign.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
-From: Will Dietz <w@wdtz.org>
-Date: Tue, 19 Sep 2017 13:13:06 -0500
-Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
- needs it
-
----
- cmake/Modules/AddCompilerRT.cmake |  8 ------
- test/asan/CMakeLists.txt          | 52 ---------------------------------------
- test/tsan/CMakeLists.txt          | 47 -----------------------------------
- 3 files changed, 107 deletions(-)
-
-diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
-index bc5fb9ff7..b64eb4246 100644
---- a/cmake/Modules/AddCompilerRT.cmake
-+++ b/cmake/Modules/AddCompilerRT.cmake
-@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
-         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
-         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
-       endif()
--      if(APPLE)
--        # Ad-hoc sign the dylibs
--        add_custom_command(TARGET ${libname}
--          POST_BUILD  
--          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
--          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
--        )
--      endif()
-     endif()
-     install(TARGETS ${libname}
-       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
-2.14.1
-
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix
index 80f70ac64a0f..26cb5aa30617 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt/default.nix
@@ -56,7 +56,7 @@ stdenv.mkDerivation {
   patches = [
     # https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce
     ../../common/compiler-rt/glibc.patch
-    ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ../../common/compiler-rt/7-12-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
     ./gnu-install-dirs.patch
     ../../common/compiler-rt/libsanitizer-no-cyclades-9.patch
   ] ++ lib.optional (useLLVM) ./crtbegin-and-end.patch
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/default.nix
index c24c84754e32..5beb8afb2ee9 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/8/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/default.nix
@@ -150,7 +150,7 @@ let
     # doesn’t support like LLVM. Probably we should move to some other
     # file.
 
-    bintools-unwrapped = callPackage ./bintools {};
+    bintools-unwrapped = callPackage ../common/bintools.nix { };
 
     bintoolsNoLibc = wrapBintoolsWith {
       bintools = tools.bintools-unwrapped;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/default.nix
index ebf8a5c702ee..885d85b8c3e7 100644
--- a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/default.nix
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/default.nix
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
   '';
 
   patches = [
-    ./no-threads.patch
+    ../../common/libcxxabi/no-threads.patch
     ./gnu-install-dirs.patch
   ];
 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch
deleted file mode 100644
index 787f3e16500e..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/no-threads.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 4138acf..41b4763 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS)
-                         " is also set to ON.")
-   endif()
-   add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
-+  add_definitions(-D_LIBCPP_HAS_NO_THREADS)
- endif()
- 
- if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch
deleted file mode 100644
index 4ebfe46aa813..000000000000
--- a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi/wasm.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
-index 15497d405e0..33f7f18193a 100644
---- a/cmake/modules/HandleLLVMOptions.cmake
-+++ b/cmake/modules/HandleLLVMOptions.cmake
-@@ -127,7 +127,10 @@ else(WIN32)
-       set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
-     endif()
-   else(FUCHSIA OR UNIX)
--    MESSAGE(SEND_ERROR "Unable to determine platform")
-+    if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi")
-+    else()
-+      MESSAGE(SEND_ERROR "Unable to determine platform")
-+    endif()
-   endif(FUCHSIA OR UNIX)
- endif(WIN32)
-