Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Supports to build PAL tests under x86/Linux #8292

Merged
merged 1 commit into from
Nov 24, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/pal/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8.12.2)

if(CLR_CMAKE_PLATFORM_ARCH_AMD64)
if(CLR_CMAKE_PLATFORM_ARCH_I386)
set(PAL_CMAKE_PLATFORM_ARCH_I386 1)
elseif(CLR_CMAKE_PLATFORM_ARCH_AMD64)
set(PAL_CMAKE_PLATFORM_ARCH_AMD64 1)
elseif(CLR_CMAKE_PLATFORM_ARCH_ARM)
set(PAL_CMAKE_PLATFORM_ARCH_ARM 1)
Expand All @@ -14,7 +16,9 @@ add_definitions(-DLP64COMPATIBLE=1)
add_definitions(-DFEATURE_PAL=1)
add_definitions(-DCORECLR=1)
add_definitions(-DPIC=1)
if(PAL_CMAKE_PLATFORM_ARCH_AMD64)
if(PAL_CMAKE_PLATFORM_ARCH_I386)
add_definitions(-DBIT32=1)
elseif(PAL_CMAKE_PLATFORM_ARCH_AMD64)
add_definitions(-DBIT64=1)
add_definitions(-D_WIN64=1)
elseif(PAL_CMAKE_PLATFORM_ARCH_ARM)
Expand All @@ -23,7 +27,7 @@ elseif(PAL_CMAKE_PLATFORM_ARCH_ARM64)
add_definitions(-DBIT64=1)
add_definitions(-D_WIN64=1)
else()
message(FATAL_ERROR "Only ARM, ARM64 and AMD64 is supported")
message(FATAL_ERROR "Only ARM, ARM64, I386, and AMD64 is supported")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious what we should call this, I386 or X86.

Copy link
Author

@parjong parjong Nov 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also confused. x86 and x64 are used in build.sh, but I386 and AMD64 are used in CMakeLists.txt.

Here I followed the convention in CMakeLists.txt.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already use CLR_CMAKE_TARGET_ARCH_I386 in the CMakeLists.txt, so this matches the change.

endif()

# C++ emits errors and warnings for c-string literal fed into char* parameter
Expand Down