Procházet 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
Jonas Maebe před 11 měsíci
rodič
revize
fd83bb10d4
1 změnil soubory, kde provedl 6 přidání a 1 odebrání
  1. 6 1
      compiler/systems/t_darwin.pas

+ 6 - 1
compiler/systems/t_darwin.pas

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