From 1aff67ce19afaf61e8f5296ee8e925f3f54adc8c Mon Sep 17 00:00:00 2001 From: Thomas Mader Date: Sat, 6 Jan 2018 14:02:23 +0100 Subject: [PATCH] ldc: 1.5.0 -> 1.7.0 --- pkgs/development/compilers/ldc/default.nix | 28 +++++++--------------- 1 file 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 " "#include " + # 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" ) '';