Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Wrighton <davidwr@microsoft.com>2020-09-10 00:49:42 +0300
committerGitHub <noreply@github.com>2020-09-10 00:49:42 +0300
commit28e68bd70c5ebab0d475b199bfb32a68348d674d (patch)
tree4b5d5afc7c9544704befe0143417ec46b3d25ce6 /src/coreclr/crosscomponents.cmake
parent5a1bcc83691b3ab7576c86a08cd4a19014cf896f (diff)
Build infra changes to enable building a more universal cross target jit builds (#41126)
This change is part of a larger effort to enable crossgen2 to perform general purpose cross compilation from any architecture to any other architecture. This portion of the change is to begin generating cross targeting jits with a consistent naming scheme with a minimal amount of code change. The practical output of this change is replacement of the current practice of building protojit/protononjit/etc. with `clrjit_<targetos>_<target_arch>_<host_arch>` binaries. In addition I've defined a couple of new subsets so that this can be less impactful to the inner dev loop. clr.alljits, which will build all of the jits. clr.jit, which will build only non-cross targeting jits. clr.runtime which has been enhanced to not trigger the alljits build. Current restrictions of the change: 1. This change does not support 32bit to 64bit compilation. I've built a larger change that includes the necessary work for that, but the changes are more disruptive, and I would prefer to scope this work to make it reviewable. 2. This work builds different compilers for the unix targetting and windows targetting compilers. This is due to the different ABIs that the architectures support. Upon investigation, I've determined that the actual product differences in these cases is small for ARM and ARM64. In the future, once we have testing, I believe it would be reasonable to unify the generated compiler binaries. 3. These changes do not build an armel targeting compiler for all scenarios, but it does build one with the current naming scheme as was done before. Again, like in condition 2, I believe we can make a single arm targetting compiler that will work. 4. These changes include changes to crossgen2 to use the new compiler binaries. However, there is no expanded testing to cover test the newly available cross compilation capabilities. That will appear in follow-on work.
Diffstat (limited to 'src/coreclr/crosscomponents.cmake')
-rw-r--r--src/coreclr/crosscomponents.cmake19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/coreclr/crosscomponents.cmake b/src/coreclr/crosscomponents.cmake
index 5bb0b5bef5c..b2b010fdd66 100644
--- a/src/coreclr/crosscomponents.cmake
+++ b/src/coreclr/crosscomponents.cmake
@@ -1,15 +1,26 @@
add_definitions(-DCROSS_COMPILE)
-if(CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM)
+if(CLR_CMAKE_HOST_ARCH_AMD64 AND (CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_I386))
set(FEATURE_CROSSBITNESS 1)
-endif(CLR_CMAKE_HOST_ARCH_AMD64 AND CLR_CMAKE_TARGET_ARCH_ARM)
+endif(CLR_CMAKE_HOST_ARCH_AMD64 AND (CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_I386))
if (CLR_CMAKE_HOST_OS STREQUAL CLR_CMAKE_TARGET_OS)
set (CLR_CROSS_COMPONENTS_LIST
- crossgen
clrjit
- jitinterface
+ jitinterface_${ARCH_HOST_NAME}
)
+
+ if(CLR_CMAKE_HOST_LINUX OR NOT FEATURE_CROSSBITNESS)
+ list (APPEND CLR_CROSS_COMPONENTS_LIST
+ crossgen
+ )
+ endif()
+
+ if (CLR_CMAKE_TARGET_UNIX)
+ list (APPEND CLR_CROSS_COMPONENTS_LIST
+ clrjit_unix_${ARCH_TARGET_NAME}_${ARCH_HOST_NAME}
+ )
+ endif(CLR_CMAKE_TARGET_UNIX)
endif()
if(NOT CLR_CMAKE_HOST_LINUX AND NOT FEATURE_CROSSBITNESS)