diff options
author | Ulrich Weigand <ulrich.weigand@de.ibm.com> | 2021-03-19 17:53:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-19 17:53:10 +0300 |
commit | 9cdfa3e85c944631642469875ac9e798f7ae5cdf (patch) | |
tree | c895b5c931a948ec2968850263781f015368db75 /src/coreclr/CMakeLists.txt | |
parent | c37395208c35770a0203785b886f990ee5c12fcd (diff) |
Add clr.iltools subset (#49545)
* Add new subset to build only the IL tools (ilasm/ildasm)
(enabled by default)
* New -skipiltools argument to src/coreclr/build-runtime.{cmd,sh}
(skips building the IL tools if present)
* Actually make -skipjit argument work to not build the JIT & VM
Diffstat (limited to 'src/coreclr/CMakeLists.txt')
-rw-r--r-- | src/coreclr/CMakeLists.txt | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/coreclr/CMakeLists.txt b/src/coreclr/CMakeLists.txt index 28ecbf7f162..7e9c6b8a656 100644 --- a/src/coreclr/CMakeLists.txt +++ b/src/coreclr/CMakeLists.txt @@ -80,7 +80,9 @@ if(CLR_CMAKE_HOST_UNIX) endif() add_subdirectory(pal) - add_subdirectory(hosts) + if(CLR_CMAKE_BUILD_SUBSET_RUNTIME) + add_subdirectory(hosts) + endif(CLR_CMAKE_BUILD_SUBSET_RUNTIME) else(CLR_CMAKE_HOST_UNIX) if(CLR_CMAKE_TARGET_UNIX) add_subdirectory(pal/src/libunwind) @@ -103,7 +105,9 @@ endif() include_directories("pal/prebuilt/inc") include_directories("../../artifacts/obj/coreclr") -add_subdirectory(tools/aot/jitinterface) +if(CLR_CMAKE_BUILD_SUBSET_JIT) + add_subdirectory(tools/aot/jitinterface) +endif(CLR_CMAKE_BUILD_SUBSET_JIT) # Above projects do not build with these compile options # All of the compiler options are specified in file compileoptions.cmake @@ -206,15 +210,26 @@ if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSI endif() add_subdirectory(utilcode) -add_subdirectory(gcinfo) -add_subdirectory(jit) add_subdirectory(inc) if(CLR_CMAKE_HOST_UNIX) add_subdirectory(palrt) endif(CLR_CMAKE_HOST_UNIX) -add_subdirectory(vm) +if(CLR_CMAKE_BUILD_SUBSET_ILTOOLS) + add_subdirectory(ildasm) + add_subdirectory(ilasm) +endif(CLR_CMAKE_BUILD_SUBSET_ILTOOLS) + +if(CLR_CMAKE_BUILD_SUBSET_JIT) + add_subdirectory(gcinfo) + add_subdirectory(jit) + add_subdirectory(vm) +else(CLR_CMAKE_BUILD_SUBSET_JIT) + # The eventing headers are required to build the IL tools and paltests + add_subdirectory(vm/eventing) +endif(CLR_CMAKE_BUILD_SUBSET_JIT) + if (CLR_CMAKE_BUILD_SUBSET_RUNTIME) add_subdirectory(md) add_subdirectory(debug) @@ -224,14 +239,17 @@ if (CLR_CMAKE_BUILD_SUBSET_RUNTIME) add_subdirectory(ToolBox) add_subdirectory(tools) add_subdirectory(unwinder) - add_subdirectory(ildasm) - add_subdirectory(ilasm) add_subdirectory(interop) if(CLR_CMAKE_HOST_WIN32) add_subdirectory(hosts) endif(CLR_CMAKE_HOST_WIN32) -else() +elseif(CLR_CMAKE_BUILD_SUBSET_ILTOOLS) + # These parts of the runtime are required to build the IL tools + add_subdirectory(md) + add_subdirectory(dlls/mscorrc) + add_subdirectory(dlls/mscorpe) +elseif(CLR_CMAKE_BUILD_SUBSET_JIT) if(CLR_CMAKE_HOST_UNIX) # this is needed to compile the jit on unix platforms. # When the runtime subset is compiled, the add_subdirectory(dlls) above |