about summary refs log tree commit diff
path: root/pkgs/development/compilers/llvm
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2019-03-19 00:45:00 -0400
committerMatthew Bauer <mjbauer95@gmail.com>2019-04-26 21:54:58 -0400
commitc08fe0f8b17b9315abea531fcebc586219c6dd0e (patch)
tree65a1c601cd4e9b8d591537ef32cfe2e249e5ebf7 /pkgs/development/compilers/llvm
parent1b5021771b5d0e7ca675f96fda2d3e5775c14230 (diff)
downloadnixlib-c08fe0f8b17b9315abea531fcebc586219c6dd0e.tar
nixlib-c08fe0f8b17b9315abea531fcebc586219c6dd0e.tar.gz
nixlib-c08fe0f8b17b9315abea531fcebc586219c6dd0e.tar.bz2
nixlib-c08fe0f8b17b9315abea531fcebc586219c6dd0e.tar.lz
nixlib-c08fe0f8b17b9315abea531fcebc586219c6dd0e.tar.xz
nixlib-c08fe0f8b17b9315abea531fcebc586219c6dd0e.tar.zst
nixlib-c08fe0f8b17b9315abea531fcebc586219c6dd0e.zip
llvm8: remove compiler-rt gettime patch
This was removed in llvm 7 but not for llvm 8.
Diffstat (limited to 'pkgs/development/compilers/llvm')
-rw-r--r--pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch74
-rw-r--r--pkgs/development/compilers/llvm/8/compiler-rt.nix3
2 files changed, 1 insertions, 76 deletions
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch b/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch
deleted file mode 100644
index f9323ed95c05..000000000000
--- a/pkgs/development/compilers/llvm/8/compiler-rt-clock_gettime.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-commit f00c7bccf7955b7dfbb4859fd9019e9eb3349f2d
-Author: Tobias Mayer <tobim@fastmail.fm>
-Date:   Wed Feb 13 12:44:17 2019 +0100
-
-    Provide clock_gettime for xray on macos < 10.12
-
-diff --git a/lib/xray/xray_basic_logging.cc b/lib/xray/xray_basic_logging.cc
-index a46c151af..38aea6932 100644
---- a/lib/xray/xray_basic_logging.cc
-+++ b/lib/xray/xray_basic_logging.cc
-@@ -36,6 +36,29 @@
- #include "xray_tsc.h"
- #include "xray_utils.h"
- 
-+#if __MACH__
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+enum clockid_t {
-+    CLOCK_MONOTONIC = REALTIME_CLOCK,
-+    CLOCK_REALTIME = REALTIME_CLOCK
-+};
-+
-+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
-+  if (ts != NULL) {
-+      clock_serv_t cclock;
-+      mach_timespec_t mts;
-+      host_get_clock_service(mach_host_self(), clock_id, &cclock);
-+      clock_get_time(cclock, &mts);
-+      mach_port_deallocate(mach_task_self(), cclock);
-+      ts->tv_sec = mts.tv_sec;
-+      ts->tv_nsec = mts.tv_nsec;
-+      return 0;
-+  }
-+  return -1;
-+}
-+#endif
-+
- namespace __xray {
- 
- SpinMutex LogMutex;
-diff --git a/lib/xray/xray_fdr_logging.cc b/lib/xray/xray_fdr_logging.cc
-index 4b308b27f..1d044c8fd 100644
---- a/lib/xray/xray_fdr_logging.cc
-+++ b/lib/xray/xray_fdr_logging.cc
-@@ -38,6 +38,29 @@
- #include "xray_tsc.h"
- #include "xray_utils.h"
- 
-+#if __MACH__
-+#include <mach/clock.h>
-+#include <mach/mach.h>
-+enum clockid_t {
-+    CLOCK_MONOTONIC = REALTIME_CLOCK,
-+    CLOCK_REALTIME = REALTIME_CLOCK
-+};
-+
-+int clock_gettime(clockid_t clock_id, struct timespec *ts) {
-+  if (ts != NULL) {
-+      clock_serv_t cclock;
-+      mach_timespec_t mts;
-+      host_get_clock_service(mach_host_self(), clock_id, &cclock);
-+      clock_get_time(cclock, &mts);
-+      mach_port_deallocate(mach_task_self(), cclock);
-+      ts->tv_sec = mts.tv_sec;
-+      ts->tv_nsec = mts.tv_nsec;
-+      return 0;
-+  }
-+  return -1;
-+}
-+#endif
-+
- namespace __xray {
- 
- atomic_sint32_t LoggingStatus = {XRayLogInitStatus::XRAY_LOG_UNINITIALIZED};
diff --git a/pkgs/development/compilers/llvm/8/compiler-rt.nix b/pkgs/development/compilers/llvm/8/compiler-rt.nix
index 47c8b7bd59f5..97033d7c8745 100644
--- a/pkgs/development/compilers/llvm/8/compiler-rt.nix
+++ b/pkgs/development/compilers/llvm/8/compiler-rt.nix
@@ -32,8 +32,7 @@ stdenv.mkDerivation rec {
   patches = [
     ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
   ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
-    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch
-    ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin ./compiler-rt-clock_gettime.patch;
+    ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ./crtbegin-and-end.patch;
 
   # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
   # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra