forked from mirrors/nixpkgs
ldc: 1.5.0 -> 1.7.0
This commit is contained in:
parent
a9d066a990
commit
1aff67ce19
|
@ -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"
|
||||
)
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue