Skip to content

Commit 8d38e0c

Browse files
authored
Merge branch 'main' into value-array-stack-alloc
2 parents cc88979 + 4822cc0 commit 8d38e0c

File tree

307 files changed

+4585
-9765
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

307 files changed

+4585
-9765
lines changed

.CodeQL.yml

+6
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ path_classifiers:
88
# be excluded from analysis. If there is a problem at the API layer, the analysis
99
# engine will detect the problem in the src/ implementations anyway.
1010
- src/libraries/**/ref/*
11+
# exclude artifacts/obj/**/CMakeFiles/**/CheckFunctionExists.c since CMake
12+
# generates random directory names causing creation of duplicate issues
13+
# related to obsolete encryption algorithm used. Note that CheckFuntionExists
14+
# files are generated as part of build-time checks in CMake and are not compiled
15+
# or linked into any product binaries.
16+
- artifacts/obj/**/CMakeFiles/**/CheckFunctionExists.c

.config/dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
]
1616
},
1717
"microsoft.dotnet.xharness.cli": {
18-
"version": "10.0.0-prerelease.24575.1",
18+
"version": "10.0.0-prerelease.24610.1",
1919
"commands": [
2020
"xharness"
2121
]

Directory.Build.props

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@
105105
<!-- when this is updated, make sure to keep $(_NetCoreAppToolCurrent)
106106
in src/mono/wasm/build/WasmApp.LocalBuild.props
107107
and in src/mono/msbuild/apple/build/AppleBuild.LocalBuild.props in sync -->
108-
<NetCoreAppToolCurrentVersion>9.0</NetCoreAppToolCurrentVersion>
108+
<NetCoreAppToolCurrentVersion>10.0</NetCoreAppToolCurrentVersion>
109109
<NetCoreAppToolCurrent>net$(NetCoreAppToolCurrentVersion)</NetCoreAppToolCurrent>
110110
<NetCoreAppCurrentToolTargetFrameworkMoniker>$(NetCoreAppCurrentIdentifier),Version=v$(NetCoreAppToolCurrentVersion)</NetCoreAppCurrentToolTargetFrameworkMoniker>
111111

112-
<AspNetCoreAppCurrentVersion>9.0</AspNetCoreAppCurrentVersion>
112+
<AspNetCoreAppCurrentVersion>10.0</AspNetCoreAppCurrentVersion>
113113
<AspNetCoreAppCurrent>net$(AspNetCoreAppCurrentVersion)</AspNetCoreAppCurrent>
114114

115115
<NetFrameworkMinimum>net462</NetFrameworkMinimum>

docs/workflow/building/coreclr/nativeaot.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,21 @@
1111
* [Design Documentation](#design-documentation)
1212
* [Further Reading](#further-reading)
1313

14-
The Native AOT toolchain can be currently built for Linux (x64/arm64), macOS (x64) and Windows (x64/arm64).
14+
The Native AOT toolchain can be currently built for Linux (x64/arm32/arm64), macOS (x64/arm64) and Windows (x86/x64/arm64).
1515

1616
## Building
1717

1818
1. [Install pre-requisites](/docs/workflow/README.md#build-requirements)
19-
1. Run `build[.cmd|.sh] clr.aot+libs -rc [Debug|Release]` from the repo root to build binaries for local development. This will build individual components, but not the NuGet packages and builds much faster.
19+
1. Run `build[.cmd|.sh] clr.aot+libs -rc [Debug|Checked|Release] -lc Release` from the repo root to build binaries for local development. This will build individual components, but not the NuGet packages and builds much faster. The `-rc` parameters specifies build configuration of the runtime, AOT compiler, and corelib, `-lc` specifies the configuration of the rest of BCL libraries. The repo and test infra generally assumes BCL libraries are compiled as Release and you're unlikely to need Debug.
20+
21+
Once you build the repo, you can use the produced binaries in one of four ways specified below ("Using built binaries", "Building packages", "Convenience Visual Studio "repro" project", "Running tests").
2022

2123
### Using built binaries
2224

25+
In this workflow, you have a project file that you want to `dotnet publish`, but you want to use your own build of the compiler/runtime/framework. You need to be using a daily build of the .NET SDK downloaded from the dotnet/sdk repo. It's typically enough to just download the daily build ZIP file, unpack it, and make sure the unpacked directory is the first thing in your PATH. Don't forget to add a NuGet.config as specified by the dotnet/sdk repo- you'll hit restore issues otherwise.
26+
27+
The native AOT MSBuild targets allow overriding the paths to compiler/runtime/framework with the compiler/runtime/framework you just built. This requires that the SDK you're using is not too far from the runtime repo you just built. They sometimes get out of sync, if that happens you need to use the "Building packages" workflow below (you'll see issues such as missing members/types in assemblies, incorrect command line arguments passed to the compiler, and linking failures).
28+
2329
The paths to major components can be overridden using `IlcToolsPath`, `IlcSdkPath`, `IlcFrameworkPath`, `IlcFrameworkNativePath` and `IlcMibcPath` properties for `dotnet publish`. For example, `/p:IlcToolsPath=<repo root>\artifacts\bin\coreclr\windows.x64.Debug\ilc` can be used to override the compiler with a local debug build for troubleshooting or quick iterations.
2430

2531
### Building packages
@@ -65,6 +71,8 @@ Typical workflow for working on the compiler:
6571
* Set Application arguments in the project Debug options to the response file that was generated by regular native aot publishing of your test project, e.g. `@obj\Release\net8.0\win-x64\native\HelloWorld.ilc.rsp`
6672
* Build & run using **F5**
6773

74+
NOTE: this requires that you globally install the same .NET SDK version as the one that is used to build the repo. You can avoid this requirement by launching Visual Studio through the build.cmd script at the root of the repo. `build.cmd -vs src\coreclr\tools\aot\ilc.sln` opens the ILC solution, `build.cmd -vs nativeaot` opens the native AOT solution.
75+
6876
## Convenience Visual Studio "repro" project
6977

7078
Typical native AOT runtime developer scenario workflow is to native AOT compile a short piece of C# and run it. The repo contains helper projects that make debugging the AOT compiler and the runtime easier.

eng/SourceBuildPrebuiltBaseline.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111
<UsagePattern IdentityGlob="Microsoft.CodeAnalysis*/*4.8.*" />
1212

1313
<!-- Allowed and pinned to major version due to https://github.com/dotnet/source-build/issues/3228 -->
14-
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/*9.*" />
15-
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Runtime.linux-x64/*9.*" />
16-
<UsagePattern IdentityGlob="*Microsoft.DotNet.ILCompiler/*9.*" />
14+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Crossgen2.linux-x64/*10.*" />
15+
<UsagePattern IdentityGlob="Microsoft.NETCore.App.Runtime.linux-x64/*10.*" />
16+
<UsagePattern IdentityGlob="*Microsoft.DotNet.ILCompiler/*10.*" />
1717

1818
<!-- Allowed and pinned to SDK version -->
19-
<UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*9.*" />
19+
<UsagePattern IdentityGlob="Microsoft.NET.ILLink.Tasks/*10.*" />
2020

2121
<!-- This version is brought in transitively from NuGet.Packaging.6.2.4.
2222
Once a newer version of NuGet.Packaging is referenced which has a

eng/Subsets.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@
550550
</ItemGroup>
551551
<ItemGroup>
552552
<SharedFrameworkProjectToBuild Condition="'$(BuildMonoAOTCrossCompilerOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\Microsoft.NETCore.App.Runtime.sfxproj" />
553-
<SharedFrameworkProjectToBuild Condition="'$(BuildNativeAOTRuntimePack)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true' and '$(DotNetBuildSourceOnly)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
553+
<SharedFrameworkProjectToBuild Condition="'$(BuildNativeAOTRuntimePack)' != 'true' and '$(RuntimeFlavor)' == '$(PrimaryRuntimeFlavor)' and '$(TargetsMobile)' != 'true'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
554554
<ProjectToBuild Include="@(SharedFrameworkProjectToBuild)" Category="packs" />
555555
</ItemGroup>
556556
</When>

0 commit comments

Comments
 (0)