dmd: Disable unsupported linker flags if stdenv.isClang
Close #9692. Was able to build dmd on darwin, but it could not be used due to those flags.
This commit is contained in:
parent
d006578d40
commit
ee799e05bf
@ -15,6 +15,7 @@ stdenv.mkDerivation {
|
|||||||
substituteInPlace src/dmd/posix.mak --replace g++ clang++
|
substituteInPlace src/dmd/posix.mak --replace g++ clang++
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Buid and install are based on http://wiki.dlang.org/Building_DMD
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
cd src/dmd
|
cd src/dmd
|
||||||
make -f posix.mak INSTALL_DIR=$out
|
make -f posix.mak INSTALL_DIR=$out
|
||||||
@ -50,7 +51,7 @@ stdenv.mkDerivation {
|
|||||||
cd $out/bin
|
cd $out/bin
|
||||||
tee dmd.conf << EOF
|
tee dmd.conf << EOF
|
||||||
[Environment]
|
[Environment]
|
||||||
DFLAGS=-I$out/include/d2 -L-L$out/lib -L--no-warn-search-mismatch -L--export-dynamic
|
DFLAGS=-I$out/include/d2 -L-L$out/lib ${stdenv.lib.optionalString (!stdenv.cc.isClang) "-L--no-warn-search-mismatch -L--export-dynamic"}
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user