Prechádzať zdrojové kódy

macOS: use -macos_version_min for recent versions

-macosx_version_min was renamed. Ideally we would base this on the version of
the toolset used, but we don't know that. Instead, use it when targeting
more recent macOS versions

(cherry picked from commit fd83bb10d4b3c1bc30cf3a72cd419882b63b561a)
Jonas Maebe 10 mesiacov pred
rodič
commit
2789efa067
1 zmenil súbory, kde vykonal 6 pridanie a 1 odobranie
  1. 6 1
      compiler/systems/t_darwin.pas

+ 6 - 1
compiler/systems/t_darwin.pas

@@ -348,7 +348,12 @@ implementation
       begin
         if MacOSXVersionMin<>'' then
           begin
-            result:='-macosx_version_min '+MacOSXVersionMin;
+           { This does not depend on the target version but on the toolchain
+             version, but we only know the former and not the latter }
+           if CompareVersionStrings(MacOSXVersionMin,'11.0') >= 0 then
+             result:='-macosx_version_min '+MacOSXVersionMin
+           else
+             result:='-macos_version_min '+MacOSXVersionMin;
           end
         else if iPhoneOSVersionMin<>'' then
           begin