From 1f7de4ab29a6b99adca2c9f2e0cac801593db551 Mon Sep 17 00:00:00 2001 From: Ivan Povazan Date: Thu, 17 Aug 2023 17:43:09 +0200 Subject: [PATCH] Revert "[dotnet] Use a different min OS version when building with NativeAOT." This reverts commit 6b3d62b84d78ea2a94b3de578fa78318a9524421. --- Make.config | 6 ------ dotnet/generate-target-platforms.csharp | 20 ++++---------------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/Make.config b/Make.config index 252fb3eec10e..223ab7d28d88 100644 --- a/Make.config +++ b/Make.config @@ -288,12 +288,6 @@ DOTNET_MIN_TVOS_SDK_VERSION=11.0 DOTNET_MIN_MACCATALYST_SDK_VERSION=13.1 DOTNET_MIN_MACOS_SDK_VERSION=10.15 -# Minimum OS versions when using NativeOAT - these are at least the general min versions above (but may be higher). -DOTNET_MIN_NATIVEAOT_IOS_SDK_VERSION=12.2 -DOTNET_MIN_NATIVEAOT_TVOS_SDK_VERSION=12.2 -DOTNET_MIN_NATIVEAOT_MACCATALYST_SDK_VERSION=13.1 -DOTNET_MIN_NATIVEAOT_MACOS_SDK_VERSION=10.15 - # The min simulator version available in the Xcode we're using MIN_IOS_SIMULATOR_VERSION=13.7 MIN_WATCHOS_SIMULATOR_VERSION=7.0 diff --git a/dotnet/generate-target-platforms.csharp b/dotnet/generate-target-platforms.csharp index 9e0a1b82628f..ddd6a5a0aa1a 100755 --- a/dotnet/generate-target-platforms.csharp +++ b/dotnet/generate-target-platforms.csharp @@ -24,16 +24,10 @@ var doc = new XmlDocument (); doc.Load (plistPath); var nodes = doc.SelectNodes ($"/plist/dict/key[text()='KnownVersions']/following-sibling::dict[1]/key[text()='{platform}']/following-sibling::array[1]/string"); -var allLines = File.ReadAllLines ("../Make.config"); - var minSdkVersionName = $"DOTNET_MIN_{platform.ToUpper ()}_SDK_VERSION"; -var minSdkVersionString = allLines.Single (v => v.StartsWith (minSdkVersionName + "=", StringComparison.Ordinal)).Substring (minSdkVersionName.Length + 1); +var minSdkVersionString = File.ReadAllLines ("../Make.config").Single (v => v.StartsWith (minSdkVersionName + "=", StringComparison.Ordinal)).Substring (minSdkVersionName.Length + 1); var minSdkVersion = Version.Parse (minSdkVersionString); -var minNativeAotSdkVersionName = $"DOTNET_MIN_NATIVEAOT_{platform.ToUpper ()}_SDK_VERSION"; -var minNativeAotSdkVersionString = allLines.Single (v => v.StartsWith (minNativeAotSdkVersionName + "=", StringComparison.Ordinal)).Substring (minNativeAotSdkVersionName.Length + 1); -var minNativeAotSdkVersion = Version.Parse (minNativeAotSdkVersionString); - using (TextWriter writer = new StreamWriter (outputPath)) { writer.WriteLine ($""); writer.WriteLine ($""); @@ -42,14 +36,9 @@ using (TextWriter writer = new StreamWriter (outputPath)) { foreach (XmlNode n in nodes) { var version = n.InnerText; - var parsedVersion = Version.Parse (version); - if (parsedVersion < minSdkVersion) + if (Version.Parse (version) < minSdkVersion) continue; - if (parsedVersion < minNativeAotSdkVersion) { - writer.WriteLine ($"\t\t<{platform}SdkSupportedTargetPlatformVersion Include=\"{n.InnerText}\" Condition=\"!('$(PublishAot)' == 'true' And '$(_IsPublishing)' == 'true')\" />"); - } else { - writer.WriteLine ($"\t\t<{platform}SdkSupportedTargetPlatformVersion Include=\"{n.InnerText}\" />"); - } + writer.WriteLine ($"\t\t<{platform}SdkSupportedTargetPlatformVersion Include=\"{n.InnerText}\" />"); } writer.WriteLine ("\t"); @@ -57,8 +46,7 @@ using (TextWriter writer = new StreamWriter (outputPath)) { writer.WriteLine ($"\t\t"); writer.WriteLine ("\t"); writer.WriteLine ("\t"); - writer.WriteLine ($"\t\t<{platform}MinSupportedOSPlatformVersion Condition=\"!('$(PublishAot)' == 'true' And '$(_IsPublishing)' == 'true')\">{minSdkVersionString}"); - writer.WriteLine ($"\t\t<{platform}MinSupportedOSPlatformVersion Condition=\"'$(PublishAot)' == 'true' And '$(_IsPublishing)' == 'true'\">{minNativeAotSdkVersionString}"); + writer.WriteLine ($"\t\t<{platform}MinSupportedOSPlatformVersion>{minSdkVersionString}"); writer.WriteLine ("\t"); writer.WriteLine (""); }