about summary refs log tree commit diff
path: root/pkgs/development/compilers
diff options
context:
space:
mode:
authorThomas Mader <thomas.mader@gmail.com>2018-01-06 14:02:23 +0100
committerThomas Mader <thomas.mader@gmail.com>2018-01-10 20:08:26 +0100
commit1aff67ce19afaf61e8f5296ee8e925f3f54adc8c (patch)
treed9cec9ffbd465958652e455060f7d1cde2d6354e /pkgs/development/compilers
parenta9d066a990928b00f3e3578c0d324e465f05f1cd (diff)
downloadnixlib-1aff67ce19afaf61e8f5296ee8e925f3f54adc8c.tar
nixlib-1aff67ce19afaf61e8f5296ee8e925f3f54adc8c.tar.gz
nixlib-1aff67ce19afaf61e8f5296ee8e925f3f54adc8c.tar.bz2
nixlib-1aff67ce19afaf61e8f5296ee8e925f3f54adc8c.tar.lz
nixlib-1aff67ce19afaf61e8f5296ee8e925f3f54adc8c.tar.xz
nixlib-1aff67ce19afaf61e8f5296ee8e925f3f54adc8c.tar.zst
nixlib-1aff67ce19afaf61e8f5296ee8e925f3f54adc8c.zip
ldc: 1.5.0 -> 1.7.0
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r--pkgs/development/compilers/ldc/default.nix28
1 files changed, 9 insertions, 19 deletions
diff --git a/pkgs/development/compilers/ldc/default.nix b/pkgs/development/compilers/ldc/default.nix
index 73d798bb66fd..d11df241e2af 100644
--- a/pkgs/development/compilers/ldc/default.nix
+++ b/pkgs/development/compilers/ldc/default.nix
@@ -2,8 +2,8 @@
 , python, libconfig, lit, gdb, unzip, darwin, bash
 , callPackage
 , bootstrapVersion ? false
-, version ? "1.5.0"
-, ldcSha256 ? "1150sgns03vplni2wd4afk3rgw3rap8rsiipspw0rzxgki5rlr83"
+, version ? "1.7.0"
+, ldcSha256 ? "1g8qvmlzvsp030z2rw6lis4kclsd9mlmnbim5kas0k1yr9063m3w"
 }:
 
 let
@@ -58,9 +58,9 @@ let
         rm tests/d2/dmd-testsuite/runnable/variadic.d
     ''
 
-    + stdenv.lib.optionalString (!bootstrapVersion) ''
-        # https://github.com/NixOS/nixpkgs/issues/29611
-        rm tests/sanitizers/asan_*
+    + stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && !bootstrapVersion) ''
+	# http://forum.dlang.org/thread/xtbbqthxutdoyhnxjhxl@forum.dlang.org
+	rm -r tests/dynamiccompile
     '';
 
     ROOT_HOME_DIR = "$(echo ~root)";
@@ -71,9 +71,6 @@ let
       "phobos/std/datetime/timezone.d";
 
     postPatch = ''
-        substituteInPlace cmake/Modules/FindLLVM.cmake \
-            --replace "llvm_set(LIBRARY_DIRS" "#llvm_set(LIBRARY_DIRS"
-
         substituteInPlace runtime/${datetimePath} \
             --replace "import core.time;" "import core.time;import std.path;"
 
@@ -97,7 +94,7 @@ let
         substituteInPlace runtime/phobos/std/path.d \
             --replace "\"/root" "\"${ROOT_HOME_DIR}"
 
-        # TODO
+        # Can be remove with front end version >= 2.078.0
         substituteInPlace runtime/druntime/src/core/memory.d \
             --replace "assert(z is null);" "//assert(z is null);"
     ''
@@ -108,14 +105,9 @@ let
         substituteInPlace gen/programs.cpp \
             --replace "gcc" "clang"
 
-	# Was not able to compile on darwin due to "__inline_isnanl"
-	# being undefined.
-	substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan
-    ''
-
-    + stdenv.lib.optionalString (stdenv.hostPlatform.isLinux && bootstrapVersion) ''
-      substituteInPlace dmd2/root/port.c \
-        --replace "#include <bits/mathdef.h>" "#include <complex.h>"
+        # Was not able to compile on darwin due to "__inline_isnanl"
+        # being undefined.
+        substituteInPlace dmd2/root/port.c --replace __inline_isnanl __inline_isnan
     ''
 
     + stdenv.lib.optionalString (bootstrapVersion) ''
@@ -147,7 +139,6 @@ let
                        "-DLDC_WITH_LLD=OFF"
                        # Xcode 9.0.1 fixes that bug according to ldc release notes
                        "-DRT_ARCHIVE_WITH_LDC=OFF"
-                       "-DLLVM_LIBRARY_DIRS=${llvm}/lib"
                       )
     '';
 
@@ -214,7 +205,6 @@ let
                         "-DLDC_WITH_LLD=OFF"
                         # Xcode 9.0.1 fixes that bug according to ldc release notes
                         "-DRT_ARCHIVE_WITH_LDC=OFF"
-                        "-DLLVM_LIBRARY_DIRS=${llvm}/lib"
                         "-DD_COMPILER=${ldcBuild}/bin/ldmd2"
                       )
     '';