summaryrefslogtreecommitdiff
path: root/src/pal/src/CMakeLists.txt
diff options
context:
space:
mode:
authorEgor Chesakov <Egor.Chesakov@microsoft.com>2018-08-21 11:55:58 -0700
committerEgor Chesakov <Egor.Chesakov@microsoft.com>2018-09-10 15:42:50 -0700
commit2347acb8731a6884de33d938542722098d1da08f (patch)
tree7482055c24b31b9f8a246be62ab8d63e26ac0b85 /src/pal/src/CMakeLists.txt
parent1e7a3d97ffba7d5721112fd451a6f4cd41a9b5d2 (diff)
downloadcoreclr-2347acb8731a6884de33d938542722098d1da08f.tar.gz
coreclr-2347acb8731a6884de33d938542722098d1da08f.tar.bz2
coreclr-2347acb8731a6884de33d938542722098d1da08f.zip
Build Hostx86/arm32 coreclrpal when CROSSCOMPILE is "1" and Hostx64/arm32 coreclrpal otherwise in configurecompiler.cmake
Diffstat (limited to 'src/pal/src/CMakeLists.txt')
-rw-r--r--src/pal/src/CMakeLists.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt
index baa4a44ed1..fe73050127 100644
--- a/src/pal/src/CMakeLists.txt
+++ b/src/pal/src/CMakeLists.txt
@@ -71,8 +71,13 @@ include_directories(include)
if(CLR_CROSS_COMPONENTS_BUILD)
if(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL amd64)
if(CLR_CMAKE_TARGET_ARCH STREQUAL "arm")
- set(PAL_CMAKE_PLATFORM_ARCH_I386 1)
- add_definitions(-D_X86_)
+ if($ENV{CROSSCOMPILE} STREQUAL "1")
+ set(PAL_CMAKE_PLATFORM_ARCH_I386 1)
+ add_definitions(-D_X86_)
+ else()
+ set(PAL_CMAKE_PLATFORM_ARCH_AMD64 1)
+ add_definitions(-D_AMD64_)
+ endif()
else()
set(PAL_CMAKE_PLATFORM_ARCH_AMD64 1)
add_definitions(-D_AMD64_)