From bb63413487a7fda9b79449c728a741e7b3458ff3 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Wed, 27 Oct 2021 20:47:39 +0200 Subject: [PATCH] iphonesim: use ios_simulator_version_min The linker expects ios_simulator_version_min rather than -iphoneos_version_min when targeting the iOS simulator platform. Fixes compilation with Xcode 11 toolchains, which is more strict about this. (cherry picked from commit 3263e12a3e10979b45b7f3ee5e5b38bedd844b03) --- compiler/systems/t_darwin.pas | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/systems/t_darwin.pas b/compiler/systems/t_darwin.pas index f75ba97e10..e965c01568 100644 --- a/compiler/systems/t_darwin.pas +++ b/compiler/systems/t_darwin.pas @@ -352,7 +352,10 @@ implementation end else if iPhoneOSVersionMin<>'' then begin - result:='-iphoneos_version_min '+iPhoneOSVersionMin; + if target_info.system in [system_i386_iphonesim,system_x86_64_iphonesim] then + result:='-ios_simulator_version_min '+iPhoneOSVersionMin + else + result:='-iphoneos_version_min '+iPhoneOSVersionMin; end else begin