From 9f0f4bb9b57680dedb16cc86d1e8d43e39890a27 Mon Sep 17 00:00:00 2001 From: Jonghyun Park Date: Tue, 18 Apr 2017 03:21:45 +0900 Subject: [PATCH] Support FEATURE_EVENT_TRACE override (dotnet/coreclr#10961) Commit migrated from https://github.com/dotnet/coreclr/commit/6097e8a7632ab2790d02302e6f722e168557a50f --- src/coreclr/clrdefinitions.cmake | 13 +------------ src/coreclr/clrfeatures.cmake | 17 +++++++++++++++++ src/coreclr/src/pal/CMakeLists.txt | 13 +------------ 3 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 src/coreclr/clrfeatures.cmake diff --git a/src/coreclr/clrdefinitions.cmake b/src/coreclr/clrdefinitions.cmake index cb39e1f..3f4122a 100644 --- a/src/coreclr/clrdefinitions.cmake +++ b/src/coreclr/clrdefinitions.cmake @@ -4,18 +4,7 @@ else() set(CLR_BUILD_JIT32 0) endif() -if (WIN32) - set(FEATURE_EVENT_TRACE 1) -endif() -if(CLR_CMAKE_PLATFORM_LINUX) - if(CLR_CMAKE_TARGET_ARCH_AMD64) - set(FEATURE_EVENT_TRACE 1) - elseif(CLR_CMAKE_TARGET_ARCH_ARM) - if(NOT(CLR_CMAKE_TARGET_TIZEN_LINUX)) - set(FEATURE_EVENT_TRACE 1) - endif() - endif() -endif() +include(clrfeatures.cmake) if (CLR_CMAKE_TARGET_ARCH_AMD64) if (CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/coreclr/clrfeatures.cmake b/src/coreclr/clrfeatures.cmake new file mode 100644 index 0000000..0cbd585 --- /dev/null +++ b/src/coreclr/clrfeatures.cmake @@ -0,0 +1,17 @@ +if(CLR_CMAKE_TARGET_TIZEN_LINUX) + set(FEATURE_EVENT_TRACE 0) +endif() + +if(NOT DEFINED FEATURE_EVENT_TRACE) + if (WIN32) + set(FEATURE_EVENT_TRACE 1) + endif() + + if(CLR_CMAKE_PLATFORM_LINUX) + if(CLR_CMAKE_TARGET_ARCH_AMD64) + set(FEATURE_EVENT_TRACE 1) + elseif(CLR_CMAKE_TARGET_ARCH_ARM) + set(FEATURE_EVENT_TRACE 1) + endif() + endif(CLR_CMAKE_PLATFORM_LINUX) +endif(NOT DEFINED FEATURE_EVENT_TRACE) diff --git a/src/coreclr/src/pal/CMakeLists.txt b/src/coreclr/src/pal/CMakeLists.txt index 453bddd..c687d83 100644 --- a/src/coreclr/src/pal/CMakeLists.txt +++ b/src/coreclr/src/pal/CMakeLists.txt @@ -2,18 +2,7 @@ cmake_minimum_required(VERSION 2.8.12.2) project(COREPAL) -if (WIN32) - set(FEATURE_EVENT_TRACE 1) -endif() -if(CLR_CMAKE_PLATFORM_LINUX) - if(CLR_CMAKE_TARGET_ARCH_AMD64) - set(FEATURE_EVENT_TRACE 1) - elseif(CLR_CMAKE_TARGET_ARCH_ARM) - if(NOT(CLR_CMAKE_TARGET_TIZEN_LINUX)) - set(FEATURE_EVENT_TRACE 1) - endif() - endif() -endif() +include(../../clrfeatures.cmake) include_directories(${COREPAL_SOURCE_DIR}/inc) include_directories(${COREPAL_SOURCE_DIR}/src) -- 2.7.4