mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
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++
|
||||
'';
|
||||
|
||||
# Buid and install are based on http://wiki.dlang.org/Building_DMD
|
||||
buildPhase = ''
|
||||
cd src/dmd
|
||||
make -f posix.mak INSTALL_DIR=$out
|
||||
|
@ -50,7 +51,7 @@ stdenv.mkDerivation {
|
|||
cd $out/bin
|
||||
tee dmd.conf << EOF
|
||||
[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
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in a new issue