endif (CLR_CMAKE_BUILD_SUBSET_RUNTIME)
endif(FEATURE_STANDALONE_GC)
+if(NOT CLR_CROSS_COMPONENTS_BUILD)
+ add_subdirectory(${CLR_SRC_NATIVE_DIR}/corehost/apphost/static Corehost.Static)
+endif()
+
if (CLR_CMAKE_HOST_UNIX)
include_directories("pal/inc")
include_directories("pal/inc/rt")
+
+# we need to define this library before adding .def fiels to sources.
+add_library_clr(coreclr_static
+ STATIC
+ ${CLR_SOURCES}
+)
+
if (CLR_CMAKE_TARGET_WIN32)
preprocess_file(${DEF_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/coreclr.def)
${CLR_SOURCES}
)
-add_library_clr(coreclr_static
- STATIC
- ${CLR_SOURCES}
-)
-
add_custom_target(coreclr_exports DEPENDS ${EXPORTS_FILE})
add_custom_target(coreclr_def DEPENDS ${DEF_FILE})
# add the install targets
install_clr(TARGETS coreclr ADDITIONAL_DESTINATIONS sharedFramework)
-# publish coreclr_static lib
-_install(TARGETS coreclr_static DESTINATION lib)
-
# Enable profile guided optimization
add_pgo(coreclr)
clr_unknown_arch()
endif()
-set(SOURCES
+set(JIT_CORE_SOURCES
${JIT_SOURCES}
${JIT_HEADERS}
- ${JIT_RESOURCES}
)
-convert_to_absolute_path(SOURCES ${SOURCES})
+convert_to_absolute_path(JIT_CORE_SOURCES ${JIT_CORE_SOURCES})
convert_to_absolute_path(JIT_ARCH_SOURCES ${JIT_ARCH_SOURCES})
+convert_to_absolute_path(JIT_RESOURCES ${JIT_RESOURCES})
# Also convert the per-architecture sources to absolute paths, if the subdirs want to use them.
set(JIT_EXPORTS_FILE ${CMAKE_CURRENT_BINARY_DIR}/ClrJit.exports.def)
preprocess_file (${CLRJIT_EXPORTS} ${JIT_EXPORTS_FILE})
- set(JIT_CORE_SOURCES ${SOURCES})
set(JIT_DEF_FILE ${JIT_EXPORTS_FILE})
else()
set(CLRJIT_EXPORTS ${CMAKE_CURRENT_LIST_DIR}/ClrJit.PAL.exports)
set_exports_linker_option(${JIT_EXPORTS_FILE})
set(JIT_EXPORTS_LINKER_OPTION ${EXPORTS_LINKER_OPTION})
- set(JIT_CORE_SOURCES ${SOURCES})
endif()
add_custom_target(jit_exports DEPENDS ${JIT_EXPORTS_FILE})
add_library_clr(${jitName}
SHARED
${JIT_CORE_SOURCES}
+ ${JIT_RESOURCES}
${JIT_ARCH_SOURCES}
${JIT_DEF_FILE}
${JIT_DLL_MAIN_FILE}
find_path(PGORT_DIR ${PGORT_DLL} REQUIRED)
_install(FILES "${PGORT_DIR}/${PGORT_DLL}" DESTINATION ${CMAKE_INSTALL_PREFIX})
_install(FILES "${PGORT_DIR}/${PGORT_DLL}" DESTINATION ${CMAKE_INSTALL_PREFIX}/sharedFramework)
-endif ()
\ No newline at end of file
+endif ()
)
elseif(CLR_CMAKE_TARGET_ARCH_I386)
set(VM_SOURCES_DAC_AND_WKS_ARCH
- gcdecode.cpp
exinfo.cpp
${ARCH_SOURCES_DIR}/cgenx86.cpp
${ARCH_SOURCES_DIR}/excepx86.cpp
list(APPEND VM_SOURCES_DAC ${VM_HEADERS_DAC})
endif(CLR_CMAKE_TARGET_WIN32)
-#these two files we need to compile differently for standalone and mergeable flavors of WKS
+# these two files we need to compile differently for standalone and mergeable flavors of WKS
set (VM_SOURCES_WKS_SPECIAL
codeman.cpp
ceemain.cpp
)
+# gcdecode.cpp is included by both JIT and VM. to avoid duplicate definitions we need to
+# treat it in a special way when statically linking with both VM and JIT
+if(CLR_CMAKE_TARGET_ARCH_I386)
+ list(APPEND VM_SOURCES_DAC
+ gcdecode.cpp
+ )
+ list(APPEND VM_SOURCES_WKS_SPECIAL
+ gcdecode.cpp
+ )
+endif()
+
convert_to_absolute_path(VM_SOURCES_WKS ${VM_SOURCES_WKS})
convert_to_absolute_path(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARCH_ASM})
convert_to_absolute_path(VM_SOURCES_DAC ${VM_SOURCES_DAC})
/* GCDecoder.cpp is a common source file bewtween VM and JIT/IL */
/* GCDecoder.cpp is located in $COM99/inc */
+// we need only one copy when embedding
+#if !defined(CORECLR_EMBEDDED)
#include "gcdecoder.cpp"
+#endif
<BuildArgs Condition="'$(Compiler)' != ''">$(BuildArgs) $(Compiler)</BuildArgs>
<BuildArgs Condition="'$(CMakeArgs)' != ''">$(BuildArgs) $(CMakeArgs)</BuildArgs>
<BuildArgs>$(BuildArgs) -coreclrartifacts $(CoreCLRArtifactsPath)</BuildArgs>
- <BuildArgs>$(BuildArgs) -nativelibsartifacts $(LibrariesArtifactsPath)/bin/native/$(NetCoreAppCurrent)-$(TargetOS)-$(LibrariesConfiguration)-$(TargetArchitecture)</BuildArgs>
<BuildArgs Condition="'$(Ninja)' == 'true'">$(BuildArgs) -ninja</BuildArgs>
<BuildArgs>$(BuildArgs) -runtimeflavor $(RuntimeFlavor)</BuildArgs>
</PropertyGroup>
<BuildArgs Condition="'$(IncrementalNativeBuild)' == 'true'">$(BuildArgs) incremental-native-build</BuildArgs>
<BuildArgs>$(BuildArgs) rootdir $(RepoRoot)</BuildArgs>
<BuildArgs>$(BuildArgs) coreclrartifacts $(CoreCLRArtifactsPath)</BuildArgs>
- <BuildArgs>$(BuildArgs) nativelibsartifacts $(LibrariesArtifactsPath)/bin/native/$(NetCoreAppCurrent)-$(TargetOS)-$(LibrariesConfiguration)-$(TargetArchitecture)</BuildArgs>
<BuildArgs Condition="'$(Ninja)' == 'true'">$(BuildArgs) ninja</BuildArgs>
<BuildArgs>$(BuildArgs) runtimeflavor $(RuntimeFlavor)</BuildArgs>
<BuildArgs>$(BuildArgs) runtimeconfiguration $(RuntimeConfiguration)</BuildArgs>
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
-add_subdirectory(static)
add_subdirectory(standalone)
#include "pal.h"
#include "trace.h"
#include "utils.h"
+#include <shellapi.h>
namespace
{
include(../../hostpolicy/files.cmake)
include(../../hostcommon/files.cmake)
+if(MSVC)
+ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4996>)
+ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4267>)
+ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4018>)
+ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4200>)
+ add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:/wd4244>)
+ # Host components don't try to handle asynchronous exceptions
+ add_compile_options(/EHsc)
+elseif (CMAKE_CXX_COMPILER_ID MATCHES GNU)
+ # Prevents libc from calling pthread_cond_destroy on static objects in
+ # dlopen()'ed library which we dlclose() in pal::unload_library.
+ add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fno-use-cxa-atexit>)
+endif()
+
if(CLR_CMAKE_TARGET_WIN32)
list(APPEND SOURCES
../apphost.windows.cpp)
# Disable manifest generation into the file .exe on Windows
add_linker_flag("/MANIFEST:NO")
- get_property(ALL_COMPILE_OPTIONS TARGET ${PROJECT_NAME} PROPERTY COMPILE_OPTIONS)
- string(TOUPPER ${RUNTIME_CONFIG} UPPERCASE_RUNTIME_CONFIG)
-
- # make sure that certain compiler and linker settings match the runtime config
- # we need to ensure that to be able to link with coreclr in mixed builds (ex: Debug with Release runtime)
- if(UPPERCASE_RUNTIME_CONFIG STREQUAL DEBUG OR UPPERCASE_RUNTIME_CONFIG STREQUAL CHECKED)
- # add_compile_options(/MTd)
- # per-config options will win, so we have to use this syntax to override
- set_property(TARGET ${PROJECT_NAME} PROPERTY
- COMPILE_OPTIONS "${ALL_COMPILE_OPTIONS};$<$<CONFIG:DEBUG>:/MTd>"
- )
-
- remove_definitions(-DNDEBUG)
- add_definitions(-DDEBUG -D_DEBUG -D_DBG)
-
- # ignore runtime libraries that could have been added so far based on the config
- add_linker_flag("/NODEFAULTLIB:ucrt.lib")
- add_linker_flag("/NODEFAULTLIB:libucrt.lib")
- add_linker_flag("/NODEFAULTLIB:libcmt.lib")
-
- # make sure we use statically linked crt
- add_linker_flag("/DEFAULTLIB:libucrtd.lib")
- else()
- # add_compile_options(/MT)
- # per-config options will win, so we have to use this syntax to override
- set_property(TARGET ${PROJECT_NAME} PROPERTY
- COMPILE_OPTIONS "${ALL_COMPILE_OPTIONS};$<$<CONFIG:DEBUG>:/MT>"
- )
-
- remove_definitions(-DDEBUG -D_DEBUG -D_DBG)
- add_definitions(-DNDEBUG)
-
- # Force uCRT to be dynamically linked for Release build
- add_linker_flag("/NODEFAULTLIB:libucrt.lib")
- add_linker_flag("/DEFAULTLIB:ucrt.lib")
- endif()
-
# Incremental linking results in the linker inserting extra padding and routing function calls via thunks that can break the
# invariants (e.g. size of region between Jit_PatchedCodeLast-Jit_PatchCodeStart needs to fit in a page).
add_linker_flag("/INCREMENTAL:NO")
endif()
-# Path like: artifacts/bin/coreclr/windows.x64.Release/lib or
-# /root/runtime/artifacts/transport/coreclr/lib
-set(CORECLR_STATIC_LIB_LOCATION "${CORECLR_ARTIFACTS}/lib")
-
-message ("Looking for coreclr_static lib at location: '${CORECLR_STATIC_LIB_LOCATION}'.")
-
if(CLR_CMAKE_TARGET_WIN32)
set(NATIVE_LIBS
- ${CORECLR_STATIC_LIB_LOCATION}/coreclr_static.lib
- ${CORECLR_STATIC_LIB_LOCATION}/System.Globalization.Native-Static.lib
- ${CORECLR_STATIC_LIB_LOCATION}/System.IO.Compression.Native-Static.lib
+ coreclr_static
+
+ System.Globalization.Native-Static
+ System.IO.Compression.Native-Static
+
kernel32.lib
advapi32.lib
ole32.lib
user32.lib
version.lib
shlwapi.lib
+ shell32.lib
bcrypt.lib
RuntimeObject.lib
)
- set(RUNTIMEINFO_LIB ${CORECLR_STATIC_LIB_LOCATION}/runtimeinfo.lib)
+ set(RUNTIMEINFO_LIB runtimeinfo)
else()
set(NATIVE_LIBS
- ${CORECLR_STATIC_LIB_LOCATION}/libcoreclr_static.a
- ${CORECLR_STATIC_LIB_LOCATION}/libSystem.Globalization.Native.a
- ${CORECLR_STATIC_LIB_LOCATION}/libSystem.IO.Compression.Native.a
- ${CORECLR_STATIC_LIB_LOCATION}/libSystem.Net.Security.Native.a
- ${CORECLR_STATIC_LIB_LOCATION}/libSystem.Native.a
- ${CORECLR_STATIC_LIB_LOCATION}/libSystem.Security.Cryptography.Native.OpenSsl.a
- ${CORECLR_STATIC_LIB_LOCATION}/libpalrt.a
- ${CORECLR_STATIC_LIB_LOCATION}/libcoreclrpal.a
- ${CORECLR_STATIC_LIB_LOCATION}/libeventprovider.a
- ${CORECLR_STATIC_LIB_LOCATION}/libnativeresourcestring.a
+ coreclr_static
+
+ System.Globalization.Native-Static
+ System.IO.Compression.Native-Static
+ System.Net.Security.Native-Static
+ System.Native-Static
+ System.Security.Cryptography.Native.OpenSsl-Static
+
+ palrt
+ coreclrpal
+ eventprovider
+ nativeresourcestring
)
# additional requirements for System.IO.Compression.Native
include(${CLR_REPO_ROOT_DIR}/src/libraries/Native/Unix/System.Security.Cryptography.Native/extra_libs.cmake)
append_extra_cryptography_libs(NATIVE_LIBS)
- set(RUNTIMEINFO_LIB ${CORECLR_STATIC_LIB_LOCATION}/libruntimeinfo.a)
+ set(RUNTIMEINFO_LIB runtimeinfo)
endif()
if(CLR_CMAKE_TARGET_OSX)
LIST(APPEND NATIVE_LIBS
- ${CORECLR_STATIC_LIB_LOCATION}/libSystem.Security.Cryptography.Native.Apple.a
+ System.Security.Cryptography.Native.Apple-Static
)
# Additional requirements for System.Security.Cryptography.Native.Apple
#
# Additional requirements for coreclr
#
-
-# Specify non-default Windows libs to be used for Arm/Arm64 builds
-if (CLR_CMAKE_TARGET_WIN32 AND (CLR_CMAKE_TARGET_ARCH_ARM OR CLR_CMAKE_TARGET_ARCH_ARM64))
- LIST(APPEND NATIVE_LIBS
- Advapi32.lib
- shell32.lib
- )
-endif()
-
if(CLR_CMAKE_TARGET_OSX)
find_library(COREFOUNDATION CoreFoundation)
find_library(CORESERVICES CoreServices)
if /i [%1] == [incremental-native-build] ( set __IncrementalNativeBuild=1&&shift&goto Arg_Loop)
if /i [%1] == [rootDir] ( set __rootDir=%2&&shift&&shift&goto Arg_Loop)
if /i [%1] == [coreclrartifacts] (set __CoreClrArtifacts=%2&&shift&&shift&goto Arg_Loop)
-if /i [%1] == [nativelibsartifacts] (set __NativeLibsArtifacts=%2&&shift&&shift&goto Arg_Loop)
if /i [%1] == [ninja] (set __Ninja=1)
if /i [%1] == [runtimeflavor] (set __RuntimeFlavor=%2&&shift&&shift&goto Arg_Loop)
if /i [%1] == [runtimeconfiguration] (set __RuntimeConfiguration=%2&&shift&&shift&goto Arg_Loop)
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCLI_CMAKE_HOST_VER=%__HostVersion%" "-DCLI_CMAKE_COMMON_HOST_VER=%__AppHostVersion%" "-DCLI_CMAKE_HOST_FXR_VER=%__HostFxrVersion%"
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCLI_CMAKE_HOST_POLICY_VER=%__HostPolicyVersion%" "-DCLI_CMAKE_PKG_RID=%cm_BaseRid%" "-DCLI_CMAKE_COMMIT_HASH=%__CommitSha%"
-set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCORECLR_ARTIFACTS=%__CoreClrArtifacts% " "-DRUNTIME_CONFIG=%__RuntimeConfiguration%" "-DNATIVE_LIBS_ARTIFACTS=%__NativeLibsArtifacts%"
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DRUNTIME_FLAVOR=%__RuntimeFlavor% "
set __ExtraCmakeParams=%__ExtraCmakeParams% "-DCLI_CMAKE_RESOURCE_DIR=%__ResourcesDir%" "-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%"
goto :Failure
)
+if "%__RuntimeFlavor%" NEQ "Mono" (
+ echo Copying "%__CoreClrArtifacts%\corehost\singlefilehost.exe" "%__CMakeBinDir%/corehost/"
+ copy /B /Y "%__CoreClrArtifacts%\corehost\singlefilehost.exe" "%__CMakeBinDir%/corehost/"
+
+ echo Copying "%__CoreClrArtifacts%\corehost\PDB\singlefilehost.pdb" "%__CMakeBinDir%/corehost/PDB/"
+ copy /B /Y "%__CoreClrArtifacts%\corehost\PDB\singlefilehost.pdb" "%__CMakeBinDir%/corehost/PDB/"
+
+ IF ERRORLEVEL 1 (
+ goto :Failure
+ )
+)
+
echo Done building Native components
exit /B 0
__ShiftArgs=1
;;
- nativelibsartifacts|-nativelibsartifacts)
- __NativeLibsArtifacts="$2"
- __ShiftArgs=1
- ;;
-
runtimeflavor|-runtimeflavor)
__RuntimeFlavor="$2"
__ShiftArgs=1
__BinDir="$__RootBinDir/bin/$__DistroRidLower.$__BuildType"
__IntermediatesDir="$__RootBinDir/obj/$__DistroRidLower.$__BuildType"
-export __BinDir __IntermediatesDir __CoreClrArtifacts __NativeLibsArtifacts __RuntimeFlavor
+export __BinDir __IntermediatesDir __CoreClrArtifacts __RuntimeFlavor
__CMakeArgs="-DCLI_CMAKE_HOST_VER=\"$__host_ver\" -DCLI_CMAKE_COMMON_HOST_VER=\"$__apphost_ver\" -DCLI_CMAKE_HOST_FXR_VER=\"$__fxr_ver\" $__CMakeArgs"
__CMakeArgs="-DCLI_CMAKE_HOST_POLICY_VER=\"$__policy_ver\" -DCLI_CMAKE_PKG_RID=\"$__DistroRid\" -DCLI_CMAKE_COMMIT_HASH=\"$__commit_hash\" $__CMakeArgs"
-__CMakeArgs="-DCORECLR_ARTIFACTS=\"$__CoreClrArtifacts\" -DNATIVE_LIBS_ARTIFACTS=\"$__NativeLibsArtifacts\" $__CMakeArgs"
__CMakeArgs="-DRUNTIME_FLAVOR=\"$__RuntimeFlavor\" $__CMakeArgs"
__CMakeArgs="-DFEATURE_DISTRO_AGNOSTIC_SSL=$__PortableBuild $__CMakeArgs"
-if [[ "$__PortableBuild" == 1 ]]; then
- __CMakeArgs="-DCLI_CMAKE_PORTABLE_BUILD=1 $__CMakeArgs"
-fi
-
# Specify path to be set for CMAKE_INSTALL_PREFIX.
# This is where all built CoreClr libraries will copied to.
__CMakeBinDir="$__BinDir"
# Build the installer native components.
build_native "$__TargetOS" "$__BuildArch" "$__scriptpath" "$__IntermediatesDir" "$__CMakeArgs" "installer component"
+
+if [[ "$__RuntimeFlavor" != "Mono" ]]; then
+ echo Copying "$__CoreClrArtifacts/corehost/." to "$__CMakeBinDir/corehost"
+ cp -a "$__CoreClrArtifacts/corehost/." "$__CMakeBinDir/corehost"
+fi
// To determine the OS version, we are going to use RtlGetVersion API
// since GetVersion call can be shimmed on Win8.1+.
-typedef NTSTATUS (WINAPI *pFuncRtlGetVersion)(RTL_OSVERSIONINFOW *);
+typedef LONG (WINAPI *pFuncRtlGetVersion)(RTL_OSVERSIONINFOW *);
pal::string_t pal::get_current_os_rid_platform()
{
// Init the buffer
ZeroMemory(&osinfo, sizeof(osinfo));
osinfo.dwOSVersionInfoSize = sizeof(osinfo);
- HMODULE hmodNtdll = LoadLibrary("ntdll.dll");
+ HMODULE hmodNtdll = LoadLibraryA("ntdll.dll");
if (hmodNtdll != NULL)
{
pFuncRtlGetVersion pRtlGetVersion = (pFuncRtlGetVersion)GetProcAddress(hmodNtdll, "RtlGetVersion");
# Licensed to the .NET Foundation under one or more agreements.
# The .NET Foundation licenses this file to you under the MIT license.
-if (CLI_CMAKE_PORTABLE_BUILD)
- add_definitions(-DFEATURE_PORTABLE_BUILD=1)
-endif ()
-
-if("${CLI_CMAKE_HOST_POLICY_VER}" STREQUAL "")
- message(FATAL_ERROR "Host policy version is not specified")
+if(${CLR_CMAKE_BUILD_SUBSET_RUNTIME})
+ # CLR partition builds only the single file host where hosting components are all statically linked.
+ # the versioning information is irrelevant and may only come up in tracing.
+ # so we will use "static"
+ add_definitions(-DHOST_POLICY_PKG_VER="static")
+ add_definitions(-DHOST_FXR_PKG_VER="static")
+ add_definitions(-DHOST_PKG_VER="static")
+ add_definitions(-DCOMMON_HOST_PKG_VER="static")
+ add_definitions(-DHOST_POLICY_PKG_NAME="static")
+ add_definitions(-DHOST_POLICY_PKG_REL_DIR="static")
+ add_definitions(-DREPO_COMMIT_HASH="static")
else()
- add_definitions(-DHOST_POLICY_PKG_VER="${CLI_CMAKE_HOST_POLICY_VER}")
+ if("${CLI_CMAKE_HOST_POLICY_VER}" STREQUAL "")
+ message(FATAL_ERROR "Host policy version is not specified")
+ else()
+ add_definitions(-DHOST_POLICY_PKG_VER="${CLI_CMAKE_HOST_POLICY_VER}")
+ endif()
+
+ if("${CLI_CMAKE_HOST_FXR_VER}" STREQUAL "")
+ message(FATAL_ERROR "Host FXR version is not specified")
+ else()
+ add_definitions(-DHOST_FXR_PKG_VER="${CLI_CMAKE_HOST_FXR_VER}")
+ endif()
+
+ if("${CLI_CMAKE_HOST_VER}" STREQUAL "")
+ message(FATAL_ERROR "Dotnet host version is not specified")
+ else()
+ add_definitions(-DHOST_PKG_VER="${CLI_CMAKE_HOST_VER}")
+ endif()
+
+ if("${CLI_CMAKE_COMMON_HOST_VER}" STREQUAL "")
+ message(FATAL_ERROR "Common host version is not specified")
+ else()
+ add_definitions(-DCOMMON_HOST_PKG_VER="${CLI_CMAKE_COMMON_HOST_VER}")
+ endif()
+
+ if("${CLI_CMAKE_PKG_RID}" STREQUAL "")
+ message(FATAL_ERROR "A minimum supported package rid is not specified (ex: win7-x86 or ubuntu.14.04-x64, osx.10.12-x64, rhel.7-x64)")
+ else()
+ add_definitions(-DHOST_POLICY_PKG_NAME="runtime.${CLI_CMAKE_PKG_RID}.Microsoft.NETCore.DotNetHostPolicy")
+ add_definitions(-DHOST_POLICY_PKG_REL_DIR="runtimes/${CLI_CMAKE_PKG_RID}/native")
+ endif()
+
+ if("${CLI_CMAKE_COMMIT_HASH}" STREQUAL "")
+ message(FATAL_ERROR "Commit hash needs to be specified to build the host")
+ else()
+ add_definitions(-DREPO_COMMIT_HASH="${CLI_CMAKE_COMMIT_HASH}")
+ endif()
endif()
-
-if("${CLI_CMAKE_HOST_FXR_VER}" STREQUAL "")
- message(FATAL_ERROR "Host FXR version is not specified")
-else()
- add_definitions(-DHOST_FXR_PKG_VER="${CLI_CMAKE_HOST_FXR_VER}")
-endif()
-
-if("${CLI_CMAKE_HOST_VER}" STREQUAL "")
- message(FATAL_ERROR "Dotnet host version is not specified")
-else()
- add_definitions(-DHOST_PKG_VER="${CLI_CMAKE_HOST_VER}")
-endif()
-
-if("${CLI_CMAKE_COMMON_HOST_VER}" STREQUAL "")
- message(FATAL_ERROR "Common host version is not specified")
-else()
- add_definitions(-DCOMMON_HOST_PKG_VER="${CLI_CMAKE_COMMON_HOST_VER}")
-endif()
-
-if("${CLI_CMAKE_PKG_RID}" STREQUAL "")
- message(FATAL_ERROR "A minimum supported package rid is not specified (ex: win7-x86 or ubuntu.14.04-x64, osx.10.12-x64, rhel.7-x64)")
-else()
- add_definitions(-DHOST_POLICY_PKG_NAME="runtime.${CLI_CMAKE_PKG_RID}.Microsoft.NETCore.DotNetHostPolicy")
- add_definitions(-DHOST_POLICY_PKG_REL_DIR="runtimes/${CLI_CMAKE_PKG_RID}/native")
-endif()
-
-if("${CLI_CMAKE_COMMIT_HASH}" STREQUAL "")
- message(FATAL_ERROR "Commit hash needs to be specified to build the host")
-else()
- add_definitions(-DREPO_COMMIT_HASH="${CLI_CMAKE_COMMIT_HASH}")
-endif()
-