bintools-wrapper, cc-wrapper: parameterize darwin min version variable

These variables are the ones that the standard toolchain uses, so we
should use those and not always use MACOSX_DEPLOYMENT_TARGET.

See 236a426c12/cctools/ld64/src/ld/PlatformSupport.cpp (L54-L55)
This commit is contained in:
Andrew Childs
2021-04-10 18:06:25 +09:00
parent 2a9b3b4943
commit 6c4ce7960e
5 changed files with 17 additions and 7 deletions

View File

@@ -120,6 +120,10 @@ rec {
# platforms define the old name "sdkVer".
darwinSdkVersion = final.sdkVer or "10.12";
darwinMinVersion = final.darwinSdkVersion;
darwinMinVersionVariable =
if final.isMacOS then "MACOSX_DEPLOYMENT_TARGET"
else if final.isiOS then "IPHONEOS_DEPLOYMENT_TARGET"
else null;
emulator = pkgs: let
qemu-user = pkgs.qemu.override {