-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release/6.0-preview7] Enable the generic math feature (#55776)
* Add a System.Runtime.Experimental package so users can still use the generic math preview This reverts commit f6eb259. * Simplify S.R.Experimental so it only produces a ref and its build version is 100 higher * Ensure a nuget package is being produced and resolve PR feedback * Update src/libraries/System.Runtime.Experimental/Directory.Build.props * Add a reference to System.Runtime.Experimental so mono can build * Disable System.Runtime.Experimental.Tests on WASM AOT
- Loading branch information
1 parent
e983168
commit 69c3212
Showing
11 changed files
with
211 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/libraries/System.Runtime.Experimental/Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<Project> | ||
<Import Project="..\Directory.Build.props" /> | ||
<PropertyGroup> | ||
<!-- Disable all binplacing since this assembly will clash with the real System.Runtime --> | ||
<EnableBinPlacing>false</EnableBinPlacing> | ||
<StrongNameKeyId>Microsoft</StrongNameKeyId> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<configuration> | ||
<!-- This disables restore in VS for projects that target platform specific target frameworks older than net5.0. --> | ||
<packageRestore> | ||
<!-- The 'automatic' key is set to True when the "Automatically check for missing packages during | ||
build in Visual Studio" checkbox is set. Clearing the box sets this to False and disables | ||
automatic restore. --> | ||
<add key="automatic" value="False" /> | ||
<!-- The 'enabled' key is True when the "Allow NuGet to download missing packages" checkbox is set. | ||
Clearing the box sets this to False, disabling command-line, automatic, and MSBuild-integrated restore. --> | ||
<add key="enabled" value="False" /> | ||
</packageRestore> | ||
</configuration> |
85 changes: 85 additions & 0 deletions
85
src/libraries/System.Runtime.Experimental/System.Runtime.Experimental.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Private.CoreLib", "..\..\coreclr\System.Private.CoreLib\System.Private.CoreLib.csproj", "{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental", "ref\System.Runtime.Experimental.csproj", "{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Runtime.Experimental.Tests", "tests\System.Runtime.Experimental.Tests.csproj", "{4EE36055-AD7C-4779-B3F6-08687960DCC3}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{BDCC9986-D51F-48D9-9650-388E172CD91E}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ref", "ref", "{F4F10B6C-21C0-4C9D-8909-76FC52145120}" | ||
EndProject | ||
Global | ||
GlobalSection(NestedProjects) = preSolution | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9} = {C7032EBC-8AB7-4BE6-9D95-B420F058FAAF} | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C} = {F4F10B6C-21C0-4C9D-8909-76FC52145120} | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3} = {BDCC9986-D51F-48D9-9650-388E172CD91E} | ||
EndGlobalSection | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
Checked|Any CPU = Checked|Any CPU | ||
Checked|x64 = Checked|x64 | ||
Checked|x86 = Checked|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.ActiveCfg = Debug|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|Any CPU.Build.0 = Debug|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x64.ActiveCfg = Debug|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x64.Build.0 = Debug|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x86.ActiveCfg = Debug|x86 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Debug|x86.Build.0 = Debug|x86 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|Any CPU.ActiveCfg = Release|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|Any CPU.Build.0 = Release|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x64.ActiveCfg = Release|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x64.Build.0 = Release|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.ActiveCfg = Release|x86 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Release|x86.Build.0 = Release|x86 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.ActiveCfg = Checked|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|Any CPU.Build.0 = Checked|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.ActiveCfg = Checked|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x64.Build.0 = Checked|x64 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.ActiveCfg = Checked|x86 | ||
{71AB8240-F179-4B21-A8BE-8BE6CD774ED9}.Checked|x86.Build.0 = Checked|x86 | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x64.Build.0 = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Debug|x86.Build.0 = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x64.ActiveCfg = Release|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x64.Build.0 = Release|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.ActiveCfg = Release|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Release|x86.Build.0 = Release|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|Any CPU.ActiveCfg = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x64.ActiveCfg = Debug|Any CPU | ||
{F39E2C7E-5FE1-460C-AC2C-7E2B50955F2C}.Checked|x86.ActiveCfg = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.ActiveCfg = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x64.Build.0 = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Debug|x86.Build.0 = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x64.ActiveCfg = Release|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x64.Build.0 = Release|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.ActiveCfg = Release|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Release|x86.Build.0 = Release|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|Any CPU.ActiveCfg = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x64.ActiveCfg = Debug|Any CPU | ||
{4EE36055-AD7C-4779-B3F6-08687960DCC3}.Checked|x86.ActiveCfg = Debug|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {19706846-1F47-42ED-B649-B0982EE96E6B} | ||
EndGlobalSection | ||
EndGlobal |
36 changes: 36 additions & 0 deletions
36
src/libraries/System.Runtime.Experimental/ref/System.Runtime.Experimental.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<AssemblyName>System.Runtime</AssemblyName> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<FeatureGenericMath>true</FeatureGenericMath> | ||
<!-- It is a core assembly because it defines System.Object so we need to pass RuntimeMetadataVersion to the compiler --> | ||
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion> | ||
<!-- disable warnings about obsolete APIs, | ||
Remove warning disable when nullable attributes are respected, | ||
Type has no accessible constructors which use only CLS-compliant types --> | ||
<NoWarn>$(NoWarn);0809;0618;CS8614;CS3015;NU5131</NoWarn> | ||
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(FeatureGenericMath)' == 'true'"> | ||
<!-- Place this assembly in the nuget ref folder --> | ||
<BuildOutputTargetFolder>ref</BuildOutputTargetFolder> | ||
<DefineConstants>$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants> | ||
<IsPackable>true</IsPackable> | ||
<PackageDescription>Exposes new experimental APIs from System.Runtime</PackageDescription> | ||
<PackageId>$(MSBuildProjectName)</PackageId> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\ref\System.Runtime.cs" /> | ||
</ItemGroup> | ||
<Target Name="_ExperimentalUpdateFileVersion" | ||
AfterTargets="_InitializeAssemblyVersion"> | ||
<PropertyGroup> | ||
<_FileVersionMaj>$(FileVersion.Split('.')[0])</_FileVersionMaj> | ||
<_FileVersionMin>$(FileVersion.Split('.')[1])</_FileVersionMin> | ||
<_FileVersionBld>$(FileVersion.Split('.')[2])</_FileVersionBld> | ||
<_FileVersionRev>$(FileVersion.Split('.')[3])</_FileVersionRev> | ||
<FileVersion>$(_FileVersionMaj).$(_FileVersionMin).$([MSBuild]::Add($(_FileVersionBld), 100)).$(_FileVersionRev)</FileVersion> | ||
</PropertyGroup> | ||
</Target> | ||
</Project> |
47 changes: 47 additions & 0 deletions
47
src/libraries/System.Runtime.Experimental/tests/System.Runtime.Experimental.Tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<FeatureGenericMath>true</FeatureGenericMath> | ||
<NoWarn>$(NoWarn),1718,SYSLIB0013</NoWarn> | ||
<TestRuntime>true</TestRuntime> | ||
<IncludeRemoteExecutor>true</IncludeRemoteExecutor> | ||
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Unix;$(NetCoreAppCurrent)-Browser</TargetFrameworks> | ||
<Nullable>disable</Nullable> | ||
<!-- Disable nullability public only feature for NullabilityInfoContextTests --> | ||
<Features>$(Features.Replace('nullablePublicOnly', '')</Features> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DefineConstants Condition="'$(FeatureGenericMath)' == 'true'">$(DefineConstants);FEATURE_GENERIC_MATH</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\ByteTests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\CharTests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int16Tests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int32Tests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int64Tests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\IntPtrTests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\SByteTests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt16Tests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt32Tests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt64Tests.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UIntPtrTests.cs" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(FeatureGenericMath)' == 'true'"> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\ByteTests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\CharTests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\GenericMathHelpers.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int16Tests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int32Tests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\Int64Tests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\IntPtrTests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\SByteTests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt16Tests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt32Tests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UInt64Tests.GenericMath.cs" /> | ||
<Compile Include="$(LibrariesProjectRoot)System.Runtime\tests\System\UIntPtrTests.GenericMath.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.Experimental\ref\System.Runtime.Experimental.csproj" /> | ||
<ProjectReference Include="$(CommonTestPath)TestUtilities.Unicode\TestUtilities.Unicode.csproj" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters