-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Build infra changes to enable building a more universal cross target jit builds #41126
Changes from 13 commits
906d468
83ed473
482e8c3
824419d
a56cc15
3d359df
d471312
1afd7e1
72dd26d
ef86678
7d3c823
db74ff8
d7a5a91
8b184d7
fa08b56
0f420f6
bbeceaf
b0703f7
f5e1064
c2a2789
42b44da
92fe566
8da95fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -54,7 +54,7 @@ | |||||
</PropertyGroup> | ||||||
|
||||||
<PropertyGroup> | ||||||
<DefaultCoreClrSubsets>clr.runtime+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.packages</DefaultCoreClrSubsets> | ||||||
<DefaultCoreClrSubsets>clr.runtime+clr.jit+clr.alljits+linuxdac+clr.corelib+clr.nativecorelib+clr.tools+clr.packages</DefaultCoreClrSubsets> | ||||||
|
||||||
<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets> | ||||||
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages</DefaultMonoSubsets> | ||||||
|
@@ -74,12 +74,17 @@ | |||||
|
||||||
<!-- Surround _subset in dashes to simplify checks below --> | ||||||
<_subset>+$(_subset.Trim('+'))+</_subset> | ||||||
|
||||||
<ClrRuntimeBuildSubsets></ClrRuntimeBuildSubsets> | ||||||
<ClrDefaltRuntimeBuildSubsets>ClrRuntimeSubset=true;ClrJitSubset=true</ClrDefaltRuntimeBuildSubsets> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. typo: ClrDefaltRuntimeBuildSubsets => ClrDefaultRuntimeBuildSubsets (is it a typo elsewhere?) |
||||||
</PropertyGroup> | ||||||
|
||||||
<ItemGroup> | ||||||
<!-- CoreClr --> | ||||||
<SubsetName Include="Clr" Description="The CoreCLR runtime, LinuxDac, CoreLib (+ native), tools and packages." /> | ||||||
<SubsetName Include="Clr.Runtime" Description="The CoreCLR .NET runtime." /> | ||||||
<SubsetName Include="Clr.Jit" Description="The JIT for the CoreCLR .NET runtime." /> | ||||||
<SubsetName Include="Clr.AllJits" Description="All of the crosstargeting jits for the CoreCLR .NET runtime." /> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
<SubsetName Include="Clr.CoreLib" Description="The managed System.Private.CoreLib library for CoreCLR." /> | ||||||
<SubsetName Include="Clr.NativeCoreLib" Description="Run crossgen on System.Private.CoreLib library for CoreCLR." /> | ||||||
<SubsetName Include="Clr.Tools" Description="Managed tools that support CoreCLR development and testing." /> | ||||||
|
@@ -132,16 +137,28 @@ | |||||
<ProjectToBuild Include="$(CoreClrProjectRoot)src\System.Private.CoreLib\System.Private.CoreLib.csproj" Category="clr" /> | ||||||
</ItemGroup> | ||||||
|
||||||
<ItemGroup Condition="$(_subset.Contains('+clr.runtime+'))"> | ||||||
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" Category="clr" /> | ||||||
<PropertyGroup Condition="$(_subset.Contains('+clr.runtime+'))"> | ||||||
<ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrRuntimeSubset=true;ClrJitSubset=true</ClrRuntimeBuildSubsets> | ||||||
</PropertyGroup> | ||||||
|
||||||
<PropertyGroup Condition="$(_subset.Contains('+clr.jit+'))"> | ||||||
<ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrJitSubset=true</ClrRuntimeBuildSubsets> | ||||||
</PropertyGroup> | ||||||
|
||||||
<PropertyGroup Condition="$(_subset.Contains('+clr.alljits+'))"> | ||||||
<ClrRuntimeBuildSubsets>$(ClrRuntimeBuildSubsets);ClrAllJitsSubset=true;ClrJitSubset=true</ClrRuntimeBuildSubsets> | ||||||
</PropertyGroup> | ||||||
|
||||||
<ItemGroup Condition="'$(ClrRuntimeBuildSubsets)' != ''"> | ||||||
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);$(ClrRuntimeBuildSubsets)" Category="clr" /> | ||||||
</ItemGroup> | ||||||
|
||||||
<ItemGroup Condition="$(_subset.Contains('+linuxdac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86'"> | ||||||
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);CrossDac=linux" Category="clr" /> | ||||||
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);$(ClrDefaltRuntimeBuildSubsets);CrossDac=linux" Category="clr" /> | ||||||
</ItemGroup> | ||||||
|
||||||
<ItemGroup Condition="$(_subset.Contains('+alpinedac+')) and $([MSBuild]::IsOsPlatform(Windows)) and '$(TargetArchitecture)' != 'x86' and '$(TargetArchitecture)' != 'arm'"> | ||||||
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);CrossDac=alpine" Category="clr" /> | ||||||
<ProjectToBuild Include="$(CoreClrProjectRoot)runtime.proj" AdditionalProperties="%(AdditionalProperties);$(ClrDefaltRuntimeBuildSubsets);CrossDac=alpine" Category="clr" /> | ||||||
</ItemGroup> | ||||||
|
||||||
<ItemGroup Condition="$(_subset.Contains('+crossdacpack+'))"> | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,13 +201,17 @@ endif() | |
# Definitions (for platform) | ||
#----------------------------------- | ||
if (CLR_CMAKE_HOST_ARCH_AMD64) | ||
set(ARCH_HOST_NAME x64) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure of the naming conventions, but should these be Same applies to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would not prefix it with |
||
add_definitions(-DHOST_AMD64) | ||
add_definitions(-DHOST_64BIT) | ||
elseif (CLR_CMAKE_HOST_ARCH_I386) | ||
set(ARCH_HOST_NAME x86) | ||
add_definitions(-DHOST_X86) | ||
elseif (CLR_CMAKE_HOST_ARCH_ARM) | ||
set(ARCH_HOST_NAME arm) | ||
add_definitions(-DHOST_ARM) | ||
elseif (CLR_CMAKE_HOST_ARCH_ARM64) | ||
set(ARCH_HOST_NAME arm64) | ||
add_definitions(-DHOST_ARM64) | ||
add_definitions(-DHOST_64BIT) | ||
else () | ||
|
@@ -262,18 +266,22 @@ endif(CLR_CMAKE_HOST_WIN32) | |
# Architecture specific files folder name | ||
if (CLR_CMAKE_TARGET_ARCH_AMD64) | ||
set(ARCH_SOURCES_DIR amd64) | ||
add_definitions(-DTARGET_AMD64) | ||
add_definitions(-DTARGET_64BIT) | ||
set(ARCH_TARGET_NAME x64) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:TARGET_AMD64>) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's some cmake magic here with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This just means - add the definition only if the target being compiled doesn't have the |
||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:TARGET_64BIT>) | ||
elseif (CLR_CMAKE_TARGET_ARCH_ARM64) | ||
set(ARCH_SOURCES_DIR arm64) | ||
add_definitions(-DTARGET_ARM64) | ||
add_definitions(-DTARGET_64BIT) | ||
set(ARCH_TARGET_NAME arm64) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:TARGET_ARM64>) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:TARGET_64BIT>) | ||
elseif (CLR_CMAKE_TARGET_ARCH_ARM) | ||
set(ARCH_SOURCES_DIR arm) | ||
add_definitions(-DTARGET_ARM) | ||
set(ARCH_TARGET_NAME arm) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:TARGET_ARM>) | ||
elseif (CLR_CMAKE_TARGET_ARCH_I386) | ||
set(ARCH_TARGET_NAME x86) | ||
set(ARCH_SOURCES_DIR i386) | ||
add_definitions(-DTARGET_X86) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_ARCH>>>:TARGET_X86>) | ||
else () | ||
clr_unknown_arch() | ||
endif () | ||
|
@@ -374,24 +382,24 @@ if (CLR_CMAKE_HOST_UNIX) | |
endif(CLR_CMAKE_HOST_UNIX) | ||
|
||
if(CLR_CMAKE_TARGET_UNIX) | ||
add_definitions(-DTARGET_UNIX) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_UNIX>) | ||
# Contracts are disabled on UNIX. | ||
add_definitions(-DDISABLE_CONTRACTS) | ||
if(CLR_CMAKE_TARGET_OSX) | ||
add_definitions(-DTARGET_OSX) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_OSX>) | ||
elseif(CLR_CMAKE_TARGET_FREEBSD) | ||
add_definitions(-DTARGET_FREEBSD) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_FREEBSD>) | ||
elseif(CLR_CMAKE_TARGET_LINUX) | ||
add_definitions(-DTARGET_LINUX) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_LINUX>) | ||
elseif(CLR_CMAKE_TARGET_NETBSD) | ||
add_definitions(-DTARGET_NETBSD) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_NETBSD>) | ||
elseif(CLR_CMAKE_TARGET_SUNOS) | ||
add_definitions(-DTARGET_SUNOS) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_SUNOS>) | ||
elseif(CLR_CMAKE_TARGET_ANDROID) | ||
add_definitions(-DTARGET_ANDROID) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_ANDROID>) | ||
endif() | ||
else(CLR_CMAKE_TARGET_UNIX) | ||
add_definitions(-DTARGET_WINDOWS) | ||
add_compile_definitions($<$<NOT:$<BOOL:$<TARGET_PROPERTY:IGNORE_DEFAULT_TARGET_OS>>>:TARGET_WINDOWS>) | ||
endif(CLR_CMAKE_TARGET_UNIX) | ||
|
||
if(CLR_CMAKE_HOST_UNIX_ARM) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't "clr.alljits" contain "clr.jit", so only "clr.alljits" is necessary?