@@ -37,7 +37,9 @@ let self = stdenv.mkDerivation rec {
3737 "--build=${stdenv.buildPlatform.config}"
3838 ] ++ optional (cxx && stdenv.isDarwin) "CPPFLAGS=-fexceptions"
3939 ++ optional (stdenv.isDarwin && stdenv.is64bit) "ABI=64"
40− ++ optional (with stdenv.hostPlatform; (useAndroidPrebuilt || useiOSPrebuilt) && !isx86) "--disable-assembly"
40+ # to build a .dll on windows, we need --disable-static + --enable-shared
41+ # see https://gmplib.org/manual/Notes-for-Particular-Systems.html
42+ ++ optional (!withStatic && stdenv.hostPlatform.isWindows) "--disable-static --enable-shared"
4143 ;
4244
4345 doCheck = true; # not cross;