浏览代码

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.
Jonas Maebe 3 年之前
父节点
当前提交
3263e12a3e
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      compiler/systems/t_darwin.pas

+ 4 - 1
compiler/systems/t_darwin.pas

@@ -352,7 +352,10 @@ implementation
           end
           end
         else if iPhoneOSVersionMin<>'' then
         else if iPhoneOSVersionMin<>'' then
           begin
           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
           end
         else
         else
           begin
           begin