dmd: relax ld purity check for checkPhase

Fix #97420
This commit is contained in:
midchildan 2020-09-08 23:27:56 +09:00
parent 61eb2b639b
commit 5e8e75a0c6
No known key found for this signature in database
GPG Key ID: D9A5748BACC6E3C2

View File

@ -115,13 +115,21 @@ stdenv.mkDerivation rec {
doCheck = true; doCheck = true;
# NOTE: Purity check is disabled for checkPhase because it doesn't fare well
# with the DMD linker. See https://github.com/NixOS/nixpkgs/issues/97420
checkPhase = '' checkPhase = ''
cd dmd cd dmd
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHELL=$SHELL NIX_ENFORCE_PURITY= \
make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHELL=$SHELL
cd ../druntime cd ../druntime
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release NIX_ENFORCE_PURITY= \
make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release
cd ../phobos cd ../phobos
make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)" NIX_ENFORCE_PURITY= \
make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)"
cd .. cd ..
''; '';