Browse Source

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)
Jonas Maebe 3 years ago
parent
commit
383c4a8e04
1 changed files with 4 additions and 1 deletions
  1. 4 1
      compiler/systems/t_darwin.pas

+ 4 - 1
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;