From 383c4a8e0465c9584daa66264738a43e1698c751 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 eaae0f74ab..fe6b8cb81b 100644 --- a/compiler/systems/t_darwin.pas +++ b/compiler/systems/t_darwin.pas @@ -365,7 +365,10 @@ implementation end else if iPhoneOSVersionMin<>'' then begin - LinkRes.Add('-iphoneos_version_min'); + if target_info.system in [system_i386_iphonesim,system_x86_64_iphonesim] then + LinkRes.Add('-ios_simulator_version_min') + else + LinkRes.Add('-iphoneos_version_min'); LinkRes.Add(iPhoneOSVersionMin); end;