summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorVictor "Nate" Graf <nategraf1@gmail.com>2017-12-21 11:48:14 -0800
committerGitHub <noreply@github.com>2017-12-21 11:48:14 -0800
commit302005ca8ae14eade37ddf4ac6e900617c1c166a (patch)
treedf32e188ca3c3c2bec14d61b477e54dd4b2fe0c8 /src/CMakeLists.txt
parent0e4662c8911e3cf80eaaa446f280d7694ac09733 (diff)
downloadcoreclr-302005ca8ae14eade37ddf4ac6e900617c1c166a.tar.gz
coreclr-302005ca8ae14eade37ddf4ac6e900617c1c166a.tar.bz2
coreclr-302005ca8ae14eade37ddf4ac6e900617c1c166a.zip
Revert "Enable EventPipe across Unix and Windows (#14772)" (#15609)
This reverts commit 7524d72d4f0f634fe5407280b83c25181dc8c556.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt66
1 files changed, 63 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 0412226dfc..4c999b184d 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,10 +10,70 @@ include_directories("classlibnative/cryptography")
include_directories("classlibnative/inc")
include_directories("${GENERATED_INCLUDE_DIR}")
-if(WIN32 AND FEATURE_EVENT_TRACE)
- include_directories("${GENERATED_INCLUDE_DIR}/etw")
-endif(WIN32 AND FEATURE_EVENT_TRACE)
+# The Following Logic is used to wire up Build dependencies for Generated files in Event Logging
+# ClrEtwAll.man - Event Schema
+# ClrEtwAllMeta.lst - MetaData list [provided to ensure Windows Desktop is not broken]
+# genXplatEventing.py - has the core logic for parsing Event Schema
+# genWinEtw.py - Uses genXplatEventing to generate Windows Specific ETW Files
+# clretwallmain.h and etmdummy.h - Provides the Event Logging Functionality to the VM
+# clrxplatevents.h - Used by clretwallmain.h on Non Windows platform
+# ClrEtwAll.h - Used by clretwallmain.h on Windows
+# ClrEtwAll.rc - Used by src/dlls/clretwrc/clretrw.rc on Windows
+
+set (ScriptGeneratedEventFiles
+ ${GENERATED_INCLUDE_DIR}/clretwallmain.h
+ ${GENERATED_INCLUDE_DIR}/etmdummy.h
+)
+set (GeneratedEventFiles)
+if(WIN32)
+ set (GenEventFilesScript "${CLR_DIR}/src/scripts/genWinEtw.py")
+ set (GenEventArgs --eventheader "${GENERATED_INCLUDE_DIR}/ClrEtwAll.h" --macroheader "${GENERATED_INCLUDE_DIR}/clretwallmain.h")
+
+ list (APPEND ScriptGeneratedEventFiles
+ ${GENERATED_INCLUDE_DIR}/ClrEtwAll.h
+ )
+
+ list (APPEND GeneratedEventFiles
+ ${GENERATED_INCLUDE_DIR}/ClrEtwAll.rc
+ )
+
+ add_custom_command(
+ COMMENT "Generating ETW resource Files"
+ COMMAND ${MC} -h ${GENERATED_INCLUDE_DIR} -r ${GENERATED_INCLUDE_DIR} -b -co -um -p FireEtw "${VM_DIR}/ClrEtwAll.man"
+ OUTPUT ${GENERATED_INCLUDE_DIR}/ClrEtwAll.h
+ DEPENDS "${VM_DIR}/ClrEtwAll.man"
+ )
+else()
+ set (GenEventFilesScript "${CLR_DIR}/src/scripts/genXplatEventing.py")
+ set (GenEventArgs --inc "${GENERATED_INCLUDE_DIR}")
+
+ list (APPEND ScriptGeneratedEventFiles
+ ${GENERATED_INCLUDE_DIR}/clrxplatevents.h
+ )
+endif(WIN32)
+
+if(CLR_CMAKE_WARNINGS_ARE_ERRORS)
+ set(PYTHON_WARNING_FLAGS -Wall -Werror)
+else()
+ set(PYTHON_WARNING_FLAGS -Wall)
+endif(CLR_CMAKE_WARNINGS_ARE_ERRORS)
+
+add_custom_command(
+ COMMENT "Generating Eventing Files"
+ COMMAND ${PYTHON} -B ${PYTHON_WARNING_FLAGS} ${GenEventFilesScript} ${GenEventArgs} --man "${VM_DIR}/ClrEtwAll.man" --exc "${VM_DIR}/ClrEtwAllMeta.lst" --dummy "${GENERATED_INCLUDE_DIR}/etmdummy.h"
+ OUTPUT ${ScriptGeneratedEventFiles}
+ DEPENDS ${GenEventFilesScript} "${VM_DIR}/ClrEtwAll.man" "${VM_DIR}/ClrEtwAllMeta.lst" "${CLR_DIR}/src/scripts/genXplatEventing.py"
+)
+
+list (APPEND GeneratedEventFiles
+ ${ScriptGeneratedEventFiles}
+)
+
+add_custom_target(
+ GeneratedEventingFiles
+ DEPENDS ${GeneratedEventFiles}
+)
if(CLR_CMAKE_PLATFORM_UNIX)
if(CLR_CMAKE_PLATFORM_LINUX)