Skip to content

Commit 094a8e9

Browse files
committed
Add a new target for alljitscommunity
1 parent 67965a5 commit 094a8e9

File tree

9 files changed

+34
-8
lines changed

9 files changed

+34
-8
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@
333333
<!-- Runtime doesn't support Arcade-driven target framework filtering. -->
334334
<NoTargetFrameworkFiltering>true</NoTargetFrameworkFiltering>
335335

336-
<NativeBuildPartitionPropertiesToRemove>ClrFullNativeBuild;ClrRuntimeSubset;ClrJitSubset;ClrPalTestsSubset;ClrAllJitsSubset;ClrILToolsSubset;ClrNativeAotSubset;ClrSpmiSubset;ClrCrossComponentsSubset;ClrDebugSubset;HostArchitecture;PgoInstrument;NativeOptimizationDataSupported;CMakeArgs;CxxStandardLibrary;CxxStandardLibraryStatic;CxxAbiLibrary</NativeBuildPartitionPropertiesToRemove>
336+
<NativeBuildPartitionPropertiesToRemove>ClrFullNativeBuild;ClrRuntimeSubset;ClrJitSubset;ClrPalTestsSubset;ClrAllJitsSubset;ClrAllJitsCommunitySubset;ClrILToolsSubset;ClrNativeAotSubset;ClrSpmiSubset;ClrCrossComponentsSubset;ClrDebugSubset;HostArchitecture;PgoInstrument;NativeOptimizationDataSupported;CMakeArgs;CxxStandardLibrary;CxxStandardLibraryStatic;CxxAbiLibrary</NativeBuildPartitionPropertiesToRemove>
337337
<UseSystemZlib Condition="'$(TargetsAppleMobile)' == 'true' or '$(TargetOS)' == 'android' or '$(TargetArchitecture)' == 'armv6'">true</UseSystemZlib>
338338
</PropertyGroup>
339339

eng/Subsets.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@
153153
<SubsetName Include="Clr.Hosts" Description="The CoreCLR corerun test host." />
154154
<SubsetName Include="Clr.Jit" Description="The JIT for the CoreCLR .NET runtime." />
155155
<SubsetName Include="Clr.AllJits" Description="All of the cross-targeting JIT compilers for the CoreCLR .NET runtime." />
156+
<SubsetName Include="Clr.AllJitsCommunity" Description="All of the cross-targeting JIT compilers for the CoreCLR .NET runtime, including community targets." />
156157
<SubsetName Include="Clr.Spmi" Description="SuperPMI, a tool for CoreCLR JIT testing." />
157158
<SubsetName Include="Clr.CoreLib" Description="The managed System.Private.CoreLib library for CoreCLR." />
158159
<SubsetName Include="Clr.NativeCoreLib" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." />
@@ -254,6 +255,10 @@
254255
<ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrAllJitsSubset=true</ClrRuntimeBuildSubsets>
255256
</PropertyGroup>
256257

258+
<PropertyGroup Condition="$(_subset.Contains('+clr.alljitscommunity+'))">
259+
<ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrAllJitsCommunitySubset=true</ClrRuntimeBuildSubsets>
260+
</PropertyGroup>
261+
257262
<PropertyGroup Condition="$(_subset.Contains('+clr.iltools+'))">
258263
<ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrILToolsSubset=true</ClrRuntimeBuildSubsets>
259264
</PropertyGroup>

eng/native/functions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ function(add_component componentName)
319319
else()
320320
set(componentTargetName "${componentName}")
321321
endif()
322-
if (${ARGC} EQUAL 3 AND "${ARG2}" STREQUAL "EXCLUDE_FROM_ALL")
322+
if (${ARGC} EQUAL 3 AND "${ARGV2}" STREQUAL "EXCLUDE_FROM_ALL")
323323
set(exclude_from_all_flag "EXCLUDE_FROM_ALL")
324324
endif()
325325
get_property(definedComponents GLOBAL PROPERTY CLR_CMAKE_COMPONENTS)

src/coreclr/build-runtime.cmd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ if NOT DEFINED PYTHON (
308308
)
309309

310310
set __CMakeTarget=
311+
set __BuildAllJitsCommunity=0
311312
for /f "delims=" %%a in ("-%__RequestedBuildComponents%-") do (
312313
set "string=%%a"
313314
if not "!string:-hosts-=!"=="!string!" (
@@ -319,6 +320,10 @@ for /f "delims=" %%a in ("-%__RequestedBuildComponents%-") do (
319320
if not "!string:-alljits-=!"=="!string!" (
320321
set __CMakeTarget=!__CMakeTarget! alljits
321322
)
323+
if not "!string:-alljitscommunity-=!"=="!string!" (
324+
set __CMakeTarget=!__CMakeTarget! alljitscommunity
325+
set __BuildAllJitsCommunity=1
326+
)
322327
if not "!string:-runtime-=!"=="!string!" (
323328
set __CMakeTarget=!__CMakeTarget! runtime
324329
)
@@ -479,7 +484,11 @@ set __TargetArchList=
479484
set /A __TotalSpecifiedTargetArch=__TargetArchX64 + __TargetArchX86 + __TargetArchArm + __TargetArchArm64 + __TargetArchLoongArch64 + __TargetArchRiscV64
480485
if %__TotalSpecifiedTargetArch% EQU 0 (
481486
REM Nothing specified means we want to build all architectures.
482-
set __TargetArchList=x64 x86 arm arm64 loongarch64 riscv64
487+
set __TargetArchList=x64 x86 arm arm64
488+
)
489+
490+
if %__BuildAllJitsCommunity% EQU 1 (
491+
set __TargetArchList=%__TargetArchList% loongarch64 riscv64
483492
)
484493

485494
REM Otherwise, add all the specified architectures to the list.

src/coreclr/build-runtime.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export PYTHON
2121
usage_list+=("-pgodatapath: path to profile guided optimization data.")
2222
usage_list+=("-pgoinstrument: generate instrumented code for profile guided optimization enabled binaries.")
2323
usage_list+=("-staticanalyzer: use scan_build static analyzer.")
24-
usage_list+=("-component: Build individual components instead of the full project. Available options are 'hosts', 'jit', 'runtime', 'paltests', 'alljits', 'iltools', 'nativeaot', and 'spmi'. Can be specified multiple times.")
24+
usage_list+=("-component: Build individual components instead of the full project. Available options are 'hosts', 'jit', 'runtime', 'paltests', 'alljits', 'alljitscommunity', 'iltools', 'nativeaot', and 'spmi'. Can be specified multiple times.")
2525
usage_list+=("-subdir: Append a directory with the provided name to the obj and bin paths.")
2626

2727
setup_dirs_local()

src/coreclr/components.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Define all the individually buildable components of the CoreCLR build and their respective targets
22
add_component(jit)
33
add_component(alljits)
4+
add_component(alljitscommunity)
45
add_component(hosts)
56
add_component(runtime)
67
add_component(paltests paltests_install)
@@ -15,6 +16,7 @@ set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME coreclr_misc)
1516
add_component(coreclr_misc)
1617
add_dependencies(jit coreclr_misc)
1718
add_dependencies(alljits coreclr_misc)
19+
add_dependencies(alljitscommunity coreclr_misc)
1820
add_dependencies(runtime coreclr_misc)
1921

2022
# The runtime build requires the clrjit and iltools builds

src/coreclr/jit/CMakeLists.txt

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function(create_standalone_jit)
1919

2020
set(oneValueArgs TARGET OS ARCH)
2121
set(multiValueArgs DESTINATIONS)
22+
set(JIT_COMMUNITY false)
2223
cmake_parse_arguments(TARGETDETAILS "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
2324

2425
if(TARGETDETAILS_OS STREQUAL "unix_osx" OR TARGETDETAILS_OS STREQUAL "unix_anyos")
@@ -51,17 +52,19 @@ function(create_standalone_jit)
5152
elseif(TARGETDETAILS_ARCH STREQUAL "loongarch64")
5253
set(JIT_ARCH_SOURCES ${JIT_LOONGARCH64_SOURCES})
5354
set(JIT_ARCH_HEADERS ${JIT_LOONGARCH64_HEADERS})
55+
set(JIT_COMMUNITY true)
5456
elseif(TARGETDETAILS_ARCH STREQUAL "riscv64")
5557
set(JIT_ARCH_SOURCES ${JIT_RISCV64_SOURCES})
5658
set(JIT_ARCH_HEADERS ${JIT_RISCV64_HEADERS})
59+
set(JIT_COMMUNITY true)
5760
else()
5861
clr_unknown_arch()
5962
endif()
6063

6164
if (TARGETDETAILS_DESTINATIONS STREQUAL "")
62-
add_jit(${TARGETDETAILS_TARGET})
65+
add_jit(${TARGETDETAILS_TARGET} ${JIT_COMMUNITY})
6366
else()
64-
add_jit(${TARGETDETAILS_TARGET} DESTINATIONS "${TARGETDETAILS_DESTINATIONS}")
67+
add_jit(${TARGETDETAILS_TARGET} ${JIT_COMMUNITY} DESTINATIONS "${TARGETDETAILS_DESTINATIONS}")
6568
endif()
6669

6770
set_target_definitions_to_custom_os_and_arch(${ARGN})
@@ -565,7 +568,7 @@ endif(CLR_CMAKE_HOST_UNIX)
565568

566569
# Shared function for generating JIT
567570
# optional arguments: DESTINATIONS path
568-
function(add_jit jitName)
571+
function(add_jit jitName jitCommunity)
569572

570573
set_source_files_properties(${JIT_EXPORTS_FILE} PROPERTIES GENERATED TRUE)
571574

@@ -616,7 +619,12 @@ function(add_jit jitName)
616619
endif()
617620

618621
# add the install targets
619-
install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljits)
622+
if (jitCommunity)
623+
install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljitscommunity)
624+
else()
625+
install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljits)
626+
install_clr(TARGETS ${jitName} ${ARGN} COMPONENT alljitscommunity)
627+
endif()
620628
endfunction()
621629

622630
set(JIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

src/coreclr/runtime.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
<_CoreClrBuildArg Condition="'$(ClrJitSubset)' == 'true'" Include="-component jit" />
6767
<_CoreClrBuildArg Condition="'$(ClrPalTestsSubset)' == 'true'" Include="-component paltests" />
6868
<_CoreClrBuildArg Condition="'$(ClrAllJitsSubset)' == 'true'" Include="-component alljits" />
69+
<_CoreClrBuildArg Condition="'$(ClrAllJitsCommunitySubset)' == 'true'" Include="-component alljitscommunity" />
6970
<_CoreClrBuildArg Condition="'$(ClrILToolsSubset)' == 'true'" Include="-component iltools" />
7071
<_CoreClrBuildArg Condition="'$(ClrNativeAotSubset)' == 'true'" Include="-component nativeaot" />
7172
<_CoreClrBuildArg Condition="'$(ClrSpmiSubset)' == 'true'" Include="-component spmi" />

src/coreclr/tools/aot/jitinterface/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ target_link_libraries(jitinterface_${ARCH_HOST_NAME} PRIVATE minipal)
2121

2222
install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT jit)
2323
install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT alljits)
24+
install_clr(TARGETS jitinterface_${ARCH_HOST_NAME} DESTINATIONS . COMPONENT alljitscommunity)

0 commit comments

Comments
 (0)