summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-01-30 17:33:29 -0800
committerJan Kotas <jkotas@microsoft.com>2016-01-31 03:08:02 -0800
commitdd9c20ca70d650083e57802e5d1e9bfde799f9b9 (patch)
tree448be483899a9905eab796d7270d126f5264e543 /src
parentafc23feec88c928cfce19216b781fc460f955b1b (diff)
downloadcoreclr-dd9c20ca70d650083e57802e5d1e9bfde799f9b9.tar.gz
coreclr-dd9c20ca70d650083e57802e5d1e9bfde799f9b9.tar.bz2
coreclr-dd9c20ca70d650083e57802e5d1e9bfde799f9b9.zip
Introduce central location for turning FEATURE_EVENT_TRACE on/off
Turn FEATURE_EVENT_TRACE on for x64 Linux only. aarch64 and arm do not have working lttng in their ubuntu/debian repos. We can expand to other platforms in the future as they become supported.
Diffstat (limited to 'src')
-rw-r--r--src/dlls/mscoree/coreclr/CMakeLists.txt5
-rw-r--r--src/pal/src/CMakeLists.txt4
-rw-r--r--src/pal/src/configure.cmake2
-rw-r--r--src/scripts/genXplatEventing.py4
-rw-r--r--src/vm/CMakeLists.txt4
5 files changed, 9 insertions, 10 deletions
diff --git a/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/dlls/mscoree/coreclr/CMakeLists.txt
index 1d428193f5..0901404913 100644
--- a/src/dlls/mscoree/coreclr/CMakeLists.txt
+++ b/src/dlls/mscoree/coreclr/CMakeLists.txt
@@ -114,12 +114,11 @@ else()
)
endif(WIN32)
-if(CLR_CMAKE_PLATFORM_LINUX)
+if(CLR_CMAKE_PLATFORM_UNIX AND FEATURE_EVENT_TRACE)
list(APPEND CORECLR_LIBRARIES
eventprovider
)
-
-endif(CLR_CMAKE_PLATFORM_LINUX)
+endif(CLR_CMAKE_PLATFORM_UNIX AND FEATURE_EVENT_TRACE)
target_link_libraries(coreclr ${CORECLR_LIBRARIES})
diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt
index b411cd4ec0..f527922e7b 100644
--- a/src/pal/src/CMakeLists.txt
+++ b/src/pal/src/CMakeLists.txt
@@ -253,9 +253,9 @@ endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
add_subdirectory(examples)
-if(CMAKE_SYSTEM_NAME STREQUAL Linux)
+if(FEATURE_EVENT_TRACE)
add_subdirectory($ENV{__IntermediatesDir}/Generated/eventprovider ${CMAKE_CURRENT_BINARY_DIR}/eventprovider)
-endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
+endif(FEATURE_EVENT_TRACE)
# Install the static PAL library for VS
install (TARGETS coreclrpal DESTINATION lib)
diff --git a/src/pal/src/configure.cmake b/src/pal/src/configure.cmake
index 7817873d5f..b3386d2cbc 100644
--- a/src/pal/src/configure.cmake
+++ b/src/pal/src/configure.cmake
@@ -979,7 +979,7 @@ else() # Anything else is Linux
unset(HAVE_LIBUNWIND_H CACHE)
message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or the appropriate packages for your platform)")
endif()
- if(NOT HAVE_LTTNG_TRACEPOINT_H)
+ if(NOT HAVE_LTTNG_TRACEPOINT_H AND FEATURE_EVENT_TRACE)
unset(HAVE_LTTNG_TRACEPOINT_H CACHE)
message(FATAL_ERROR "Cannot find liblttng-ust-dev. Try installing liblttng-ust-dev (or the appropriate packages for your platform)")
endif()
diff --git a/src/scripts/genXplatEventing.py b/src/scripts/genXplatEventing.py
index f56e45b474..b844ec19b4 100644
--- a/src/scripts/genXplatEventing.py
+++ b/src/scripts/genXplatEventing.py
@@ -495,7 +495,7 @@ def generateSanityTest(sClrEtwAllMan,testDir):
)
set(EVENT_PROVIDER_DEPENDENCIES "")
set(EVENT_PROVIDER_LINKER_OTPTIONS "")
- if(CMAKE_SYSTEM_NAME STREQUAL Linux)
+ if(FEATURE_EVENT_TRACE)
add_definitions(-DFEATURE_EVENT_TRACE=1)
list(APPEND EVENT_PROVIDER_DEPENDENCIES
coreclrtraceptprovider
@@ -505,7 +505,7 @@ def generateSanityTest(sClrEtwAllMan,testDir):
${EVENT_PROVIDER_DEPENDENCIES}
)
- endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
+ endif(FEATURE_EVENT_TRACE)
add_dependencies(eventprovidertest ${EVENT_PROVIDER_DEPENDENCIES} coreclrpal)
target_link_libraries(eventprovidertest
diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt
index c489ed1932..c65416c7cd 100644
--- a/src/vm/CMakeLists.txt
+++ b/src/vm/CMakeLists.txt
@@ -268,11 +268,11 @@ set(VM_SOURCES_WKS
weakreferencenative.cpp
)
-if(CLR_CMAKE_PLATFORM_LINUX OR WIN32)
+if(FEATURE_EVENT_TRACE)
list(APPEND VM_SOURCES_WKS
eventtrace.cpp
)
-endif(CLR_CMAKE_PLATFORM_LINUX OR WIN32)
+endif(FEATURE_EVENT_TRACE)
if(WIN32)