mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
xcode/sdk-pkgs.nix: set -platform_version in addition to -miphoneos-version-min
The App Store looks at LC_VERSION_MIN_IPHONEOS to verify you have a new enough SDK version. This is not just the minimum version, but also the sdk version used. When the linker can’t figure it out, it tries to infer it from the sdk path[1]. When no sdk version is found, it defaults to just using the -miphoneos-version-min value[2]. So, to make sure we don’t rely on inference (which doesn’t work in the current directory structure), we have to specify -platform_version. [1]:43f32a4c61/cctools/ld64/src/ld/Options.cpp (L5355-L5376)
[2]:43f32a4c61/cctools/ld64/src/ld/ld.hpp (L58)
This commit is contained in:
parent
753e80125f
commit
95eabdfd5f
@ -12,7 +12,7 @@
|
||||
|
||||
let
|
||||
|
||||
minSdkVersion = "9.0";
|
||||
minSdkVersion = targetPlatform.minSdkVersion or "9.0";
|
||||
|
||||
iosPlatformArch = { parsed, ... }: {
|
||||
armv7a = "armv7";
|
||||
@ -37,6 +37,10 @@ rec {
|
||||
bintools = binutils-unwrapped;
|
||||
extraBuildCommands = ''
|
||||
echo "-arch ${iosPlatformArch targetPlatform}" >> $out/nix-support/libc-ldflags
|
||||
'' + stdenv.lib.optionalString (sdk.platform == "iPhoneSimulator") ''
|
||||
echo "-platform_version ios-sim ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags
|
||||
'' + stdenv.lib.optionalString (sdk.platform == "iPhoneOS") ''
|
||||
echo "-platform_version ios ${minSdkVersion} ${sdk.version}" >> $out/nix-support/libc-ldflags
|
||||
'';
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user