ios-cross: Fix for simulator

This commit is contained in:
Shea Levy 2016-11-18 18:14:20 -05:00
parent c54d2860dc
commit 6f1d4149d5

View File

@ -26,7 +26,7 @@
echo "-target ${prefix} -arch ${arch} -idirafter ${sdk}/usr/include ${if simulator then "-mios-simulator-version-min=7.0" else "-miphoneos-version-min=7.0"}" >> $out/nix-support/cc-cflags
# Purposefully overwrite libc-ldflags-before, cctools ld doesn't know dynamic-linker and cc-wrapper doesn't do cross-compilation well enough to adjust
echo "-arch ${arch} -L${sdk}/usr/lib -iphoneos_version_min 7.0.0" > $out/nix-support/libc-ldflags-before
echo "-arch ${arch} -L${sdk}/usr/lib ${lib.optionalString simulator "-L${sdk}/usr/lib/system "}-i${if simulator then "os_simulator" else "phoneos"}_version_min 7.0.0" > $out/nix-support/libc-ldflags-before
'';
};
in {