* [build] Define a component and subset for corerun and copy mono runtime files to coreroot.
<SubsetName Include="Clr.Native" Description="All CoreCLR native non-test components, including the runtime, jits, and other native tools." />
<SubsetName Include="Clr.PalTests" OnDemand="true" Description="The CoreCLR PAL tests." />
<SubsetName Include="Clr.PalTestList" OnDemand="true" Description="Generate the list of the CoreCLR PAL tests. When using the command line, use Clr.PalTests instead." />
+ <SubsetName Include="Clr.Hosts" Description="The CoreCLR corerun test host." />
<SubsetName Include="Clr.Jit" Description="The JIT for the CoreCLR .NET runtime." />
<SubsetName Include="Clr.AllJits" Description="All of the cross-targeting JIT compilers for the CoreCLR .NET runtime." />
<SubsetName Include="Clr.CoreLib" Description="The managed System.Private.CoreLib library for CoreCLR." />
<ProjectToBuild Include="$(CoreClrProjectRoot)System.Private.CoreLib\System.Private.CoreLib.csproj" Category="clr" />
</ItemGroup>
+ <PropertyGroup Condition="$(_subset.Contains('+clr.hosts+'))">
+ <ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrHostsSubset=true</ClrRuntimeBuildSubsets>
+ </PropertyGroup>
+
<PropertyGroup Condition="$(_subset.Contains('+clr.runtime+'))">
<ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrRuntimeSubset=true</ClrRuntimeBuildSubsets>
</PropertyGroup>
set __CMakeTarget=
for /f "delims=" %%a in ("-%__RequestedBuildComponents%-") do (
set "string=%%a"
+ if not "!string:-hosts-=!"=="!string!" (
+ set __CMakeTarget=!__CMakeTarget! hosts
+ )
if not "!string:-jit-=!"=="!string!" (
set __CMakeTarget=!__CMakeTarget! jit
)
echo Build architecture: one of -x64, -x86, -arm, -arm64 ^(default: -x64^).
echo Build type: one of -Debug, -Checked, -Release ^(default: -Debug^).
echo -component ^<name^> : specify this option one or more times to limit components built to those specified.
-echo Allowed ^<name^>: jit alljits runtime paltests iltools
+echo Allowed ^<name^>: hosts jit alljits runtime paltests iltools
echo -enforcepgo: verify after the build that PGO was used for key DLLs, and fail the build if not
echo -pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.
echo -cmakeargs: user-settable additional arguments passed to CMake.
usage_list+=("-pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.")
usage_list+=("-skipcrossarchnative: Skip building cross-architecture native binaries.")
usage_list+=("-staticanalyzer: use scan_build static analyzer.")
-usage_list+=("-component: Build individual components instead of the full project. Available options are 'jit', 'runtime', 'paltests', 'alljits', and 'iltools'. Can be specified multiple times.")
+usage_list+=("-component: Build individual components instead of the full project. Available options are 'hosts', 'jit', 'runtime', 'paltests', 'alljits', and 'iltools'. Can be specified multiple times.")
setup_dirs_local()
{
# Define all the individually buildable components of the CoreCLR build and their respective targets
add_component(jit)
add_component(alljits)
+add_component(hosts)
add_component(runtime)
add_component(paltests paltests_install)
add_component(iltools)
# The runtime build requires the clrjit and iltools builds
add_dependencies(runtime jit iltools)
+add_dependencies(runtime hosts)
+
# The cross-components build is separate, so we don't need to add a dependency on coreclr_misc
add_component(crosscomponents)
endif()
endif(CLR_CMAKE_HOST_WIN32)
-install_clr(TARGETS corerun DESTINATIONS . COMPONENT runtime)
+install_clr(TARGETS corerun DESTINATIONS . COMPONENT hosts)
${STATIC_MT_VCRT_LIB}
)
-install_clr(TARGETS CoreShim DESTINATIONS . COMPONENT runtime)
+install_clr(TARGETS CoreShim DESTINATIONS . COMPONENT hosts)
</ItemGroup>
<ItemGroup Condition="'$(ClrFullNativeBuild)' != 'true'">
+ <_CoreClrBuildArg Condition="'$(ClrHostsSubset)' == 'true'" Include="-component hosts" />
<_CoreClrBuildArg Condition="'$(ClrRuntimeSubset)' == 'true'" Include="-component runtime" />
<_CoreClrBuildArg Condition="'$(ClrJitSubset)' == 'true'" Include="-component jit" />
<_CoreClrBuildArg Condition="'$(ClrPalTestsSubset)' == 'true'" Include="-component paltests" />
<GCStressDependsOnCoreDisTools Condition="'$(TargetOS)' == 'Linux' And '$(TargetArchitecture)' == 'x64'">true</GCStressDependsOnCoreDisTools>
<CopyCoreDisToolsToCoreRoot>false</CopyCoreDisToolsToCoreRoot>
<CopyCoreDisToolsToCoreRoot Condition="$(GCStressDependsOnCoreDisTools) And '$(DotNetBuildFromSource)' != 'true'">true</CopyCoreDisToolsToCoreRoot>
+ <!-- Non-desktop OS's use a custom dotnet host, instead of corerun -->
+ <IsDesktopOS Condition="'$(TargetsBrowser)' != 'true' and '$(TargetsAndroid)' != 'true' and '$(TargetstvOS)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetsMacCatalyst)' != 'true'">true</IsDesktopOS>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)coredistools.targets" Condition="$(CopyCoreDisToolsToCoreRoot)" />
Include="$(CoreCLRArtifactsPath)%(RunTimeArtifactsIncludeFolders.Identity)**/*"
Exclude="@(RunTimeArtifactsExcludeFiles -> '$(CoreCLRArtifactsPath)%(Identity)')"
TargetDir="%(RunTimeArtifactsIncludeFolders.Identity)" />
+
+
</ItemGroup>
<PropertyGroup>
<RunTimeDependencyCopyLocal Include="$(CoreDisToolsLibrary)" Condition="$(CopyCoreDisToolsToCoreRoot)" />
</ItemGroup>
+ <ItemGroup Condition="'$(RuntimeFlavor)' == 'mono' and '$(IsDesktopOS)' == 'true' " >
+ <RuntimeDependencyCopyLocal Include="$(MonoArtifactsPath)/libcoreclr$(LibSuffix)" TargetDir="" />
+ <RuntimeDependencyCopyLocal Include="$(MonoArtifactsPath)/libmono-component-*" TargetDir="" />
+ <RuntimeDependencyCopyLocal Include="$(MonoArtifactsPath)/*.dll" TargetDir="/" />
+ </ItemGroup>
+
<Copy
SourceFiles="@(RunTimeDependencyCopyLocal)"
DestinationFiles="@(RunTimeDependencyCopyLocal -> '$(CORE_ROOT)/%(TargetDir)%(RecursiveDir)%(Filename)%(Extension)')"