Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update runtime repo to use Preview 7 SDK #72145

Merged
merged 19 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<!--
TODO: Remove pinned version once arcade supplies a compiler that enables the repo to compile.
-->
<MicrosoftNetCompilersToolsetVersion>4.4.0-1.22358.14</MicrosoftNetCompilersToolsetVersion>
<MicrosoftNetCompilersToolsetVersion>4.4.0-2.22412.11</MicrosoftNetCompilersToolsetVersion>
<StaticCsVersion>0.2.0</StaticCsVersion>
<!-- SDK dependencies -->
<MicrosoftDotNetApiCompatTaskVersion>7.0.100-rc.1.22402.1</MicrosoftDotNetApiCompatTaskVersion>
Expand Down
3 changes: 1 addition & 2 deletions eng/testing/linker/SupportFiles/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
<SkipConfigureTrimming>true</SkipConfigureTrimming>
<PublishTrimmed>true</PublishTrimmed>
<SkipImportRepoLinkerTargets>true</SkipImportRepoLinkerTargets>
<TrimmerDefaultAction>link</TrimmerDefaultAction>
<TrimMode>link</TrimMode>
<TrimMode>full</TrimMode>
<TrimmerRemoveSymbols>false</TrimmerRemoveSymbols>
<SelfContained>true</SelfContained>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand Down
38 changes: 37 additions & 1 deletion eng/testing/tests.singlefile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RunScriptCommand Condition="'$(TargetOS)' == 'windows'">$(AssemblyName).exe</RunScriptCommand>
<RunScriptCommand Condition="'$(TargetOS)' != 'windows'">chmod +rwx $(AssemblyName) &amp;&amp; ./$(AssemblyName)</RunScriptCommand>
</PropertyGroup>

<PropertyGroup Condition="'$(TestNativeAot)' != 'true'">
<PublishSingleFile>true</PublishSingleFile>
<UseAppHost>true</UseAppHost>
Expand All @@ -27,11 +27,47 @@
<IlcSdkPath>$(CoreCLRAotSdkDir)</IlcSdkPath>
<IlcFrameworkPath>$(NetCoreAppCurrentTestHostSharedFrameworkPath)</IlcFrameworkPath>
<NoWarn>$(NoWarn);IL3050;IL3051;IL3052;IL3054;IL3055;IL1005;IL3002</NoWarn>
<TrimMode>partial</TrimMode>
<TrimmerSingleWarn>false</TrimmerSingleWarn>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>

<!-- Forced by ILLink targets; we should fix the SDK -->
<SelfContained>true</SelfContained>

<!-- Works around https://github.com/dotnet/runtime/issues/73926 -->
<!-- RequiresUnreferenceCodeAttribute method called -->
<NoWarn>$(NoWarn);IL2026;IL2116</NoWarn>
<!-- Invalid use of DynamicallyAccessedMembersAttribute -->
<NoWarn>$(NoWarn);IL2041;IL2042;IL2043;IL2056</NoWarn>
<!-- Reference to removed attribute type -->
<NoWarn>$(NoWarn);IL2045</NoWarn>
<!-- RequiresUnreferencedCodeAttribute mismatch on virtual override -->
<NoWarn>$(NoWarn);IL2046</NoWarn>
<!-- COM marshalling warning -->
<NoWarn>$(NoWarn);IL2050</NoWarn>
<!-- Reflection intrinsics with unknown arguments -->
<NoWarn>$(NoWarn);IL2032;IL2055;IL2057;IL2058;IL2059;IL2060;IL2061;IL2096</NoWarn>
<!-- Unknown values passed to locations with DynamicallyAccessedMemberTypes -->
<NoWarn>$(NoWarn);IL2062;IL2063;IL2064;IL2065;IL2066</NoWarn>
<!-- Unsatisfied DynamicallyAccessedMembers requirements -->
<NoWarn>$(NoWarn);IL2067;IL2068;IL2069;IL2070;IL2071;IL2072;IL2073;IL2074;IL2075;IL2076;IL2077;IL2078;IL2079;IL2080;IL2081;IL2082;IL2083;IL2084;IL2085;IL2086;IL2087;IL2088;IL2089;IL2090;IL2091</NoWarn>
<!-- DynamicallyAccessedMembersAttribute mismatch on virtual override -->
<NoWarn>$(NoWarn);IL2092;IL2093;IL2094;IL2095</NoWarn>
<!-- DynamicallyAccessedMembersAttribute used on unsupported member -->
<NoWarn>$(NoWarn);IL2097;IL2098;IL2099;IL2106</NoWarn>
<!-- Unknown value passed to Expression.Property -->
<NoWarn>$(NoWarn);IL2103</NoWarn>
<!-- Multiple methods associated with state machine type or user method -->
<NoWarn>$(NoWarn);IL2107;IL2117</NoWarn>
<!-- Unannotated type derived from base type with RequiresUnreferencedCode -->
<NoWarn>$(NoWarn);IL2109</NoWarn>
<!-- Reflection access to members with DynamicallyAccessedMembers requirements -->
<NoWarn>$(NoWarn);IL2110;IL2111;IL2114;IL2115</NoWarn>
<!-- Reflection access to members with RequiresUnreferencedCode -->
<NoWarn>$(NoWarn);IL2112;IL2113</NoWarn>
<!-- Reflection access to compiler-generated code -->
<NoWarn>$(NoWarn);IL2118;IL2119;IL2120</NoWarn>

</PropertyGroup>

<Import Project="$(CoreCLRBuildIntegrationDir)Microsoft.DotNet.ILCompiler.targets" Condition="'$(TestNativeAot)' == 'true'" />
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "7.0.100-preview.5.22307.18",
"version": "7.0.100-preview.7.22377.5",
"allowPrerelease": true,
"rollForward": "major"
},
"tools": {
"dotnet": "7.0.100-preview.5.22307.18"
"dotnet": "7.0.100-preview.7.22377.5"
},
"msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "7.0.0-beta.22411.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public sealed class IsByRefLikeAttribute : Attribute

public static class RuntimeFeature
{
public const string ByRefFields = nameof(ByRefFields);
public const string VirtualStaticsInInterfaces = nameof(VirtualStaticsInInterfaces);
}
}
2 changes: 0 additions & 2 deletions src/coreclr/tools/aot/crossgen2/crossgen2.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
<EnableDefaultEmbeddedResourceItems>false</EnableDefaultEmbeddedResourceItems>
<Configurations>Debug;Release;Checked</Configurations>
<ServerGarbageCollection>true</ServerGarbageCollection>
<!-- Trim all dependent assemblies as though they were all marked IsTrimmable. -->
<TrimmerDefaultAction>link</TrimmerDefaultAction>
</PropertyGroup>

<ItemGroup Label="Embedded Resources">
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/tools/dotnet-pgo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,7 @@ void AddToInstrumentationData(int eventClrInstanceId, long methodID, int methodF
if (data->ProcessId != p.ProcessID)
continue;

Span<LbrEntry32> lbr32 = data->Entries(e.EventDataLength);
Span<LbrEntry32> lbr32 = LbrTraceEventData32.Entries(ref *data, e.EventDataLength);
correlator.AttributeSampleToLbrRuns(lbr32);
}
else
Expand All @@ -1640,7 +1640,7 @@ void AddToInstrumentationData(int eventClrInstanceId, long methodID, int methodF
if (data->ProcessId != p.ProcessID)
continue;

Span<LbrEntry64> lbr64 = data->Entries(e.EventDataLength);
Span<LbrEntry64> lbr64 = LbrTraceEventData64.Entries(ref *data, e.EventDataLength);
correlator.AttributeSampleToLbrRuns(lbr64);
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/coreclr/tools/dotnet-pgo/SPGO/LbrEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public unsafe struct LbrTraceEventData32
public LbrOptionFlags Options;
private LbrEntry32 _entries;

public Span<LbrEntry32> Entries(int totalSize)
public static Span<LbrEntry32> Entries(ref LbrTraceEventData32 data, int totalSize)
{
IntPtr entriesOffset = Unsafe.ByteOffset(ref Unsafe.As<LbrTraceEventData32, byte>(ref this), ref Unsafe.As<LbrEntry32, byte>(ref _entries));
return MemoryMarshal.CreateSpan(ref _entries, (totalSize - (int)entriesOffset) / sizeof(LbrEntry32));
IntPtr entriesOffset = Unsafe.ByteOffset(ref Unsafe.As<LbrTraceEventData32, byte>(ref data), ref Unsafe.As<LbrEntry32, byte>(ref data._entries));
return MemoryMarshal.CreateSpan(ref data._entries, (totalSize - (int)entriesOffset) / sizeof(LbrEntry32));
}
}

Expand All @@ -71,10 +71,10 @@ public unsafe struct LbrTraceEventData64
public LbrOptionFlags Options;
private LbrEntry64 _entries;

public Span<LbrEntry64> Entries(int totalSize)
public static Span<LbrEntry64> Entries(ref LbrTraceEventData64 data, int totalSize)
{
IntPtr entriesOffset = Unsafe.ByteOffset(ref Unsafe.As<LbrTraceEventData64, byte>(ref this), ref Unsafe.As<LbrEntry64, byte>(ref _entries));
return MemoryMarshal.CreateSpan(ref _entries, (totalSize - (int)entriesOffset) / sizeof(LbrEntry64));
IntPtr entriesOffset = Unsafe.ByteOffset(ref Unsafe.As<LbrTraceEventData64, byte>(ref data), ref Unsafe.As<LbrEntry64, byte>(ref data._entries));
return MemoryMarshal.CreateSpan(ref data._entries, (totalSize - (int)entriesOffset) / sizeof(LbrEntry64));
}
}
}
7 changes: 0 additions & 7 deletions src/tests/nativeaot/Directory.Build.props

This file was deleted.