diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-01-21 21:52:16 -0800 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-01-21 21:52:16 -0800 |
commit | 92e2b1e63305c3297ab665e2e49561665ebe42f8 (patch) | |
tree | 36c22826f2c78a3fb5697cf79198df753862f4f1 /src | |
parent | 6810d13928ec5e2b1b81f279b22cb5cfc492812e (diff) | |
parent | 956245eb5d4681bcc0182844abb74fdf3d372518 (diff) | |
download | coreclr-92e2b1e63305c3297ab665e2e49561665ebe42f8.tar.gz coreclr-92e2b1e63305c3297ab665e2e49561665ebe42f8.tar.bz2 coreclr-92e2b1e63305c3297ab665e2e49561665ebe42f8.zip |
Merge pull request #2772 from ramarag/fixincrementabuild
Fix incremental build
Diffstat (limited to 'src')
79 files changed, 287 insertions, 242 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5815ca1532..243c7d34fa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,3 @@ -include_directories($ENV{__GeneratedIntermediatesDir}/inc) include_directories("inc") include_directories("strongname/inc") include_directories("inc/winrt") @@ -9,6 +8,76 @@ include_directories("md/inc") include_directories("classlibnative/bcltype") include_directories("classlibnative/cryptography") include_directories("classlibnative/inc") +include_directories("${GENERATED_INCLUDE_DIR}") + +# 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) + +add_custom_command( + COMMENT "Generating Eventing Files" + COMMAND ${PYTHON} -B -Wall -Werror ${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} +) + +function(add_library_clr) + add_library(${ARGV}) + add_dependencies(${ARGV0} GeneratedEventingFiles) +endfunction() + +function(add_executable_clr) + add_executable(${ARGV}) + add_dependencies(${ARGV0} GeneratedEventingFiles) +endfunction() if(CLR_CMAKE_PLATFORM_UNIX) add_subdirectory(ToolBox/SOS/Strike) diff --git a/src/ToolBox/SOS/Strike/CMakeLists.txt b/src/ToolBox/SOS/Strike/CMakeLists.txt index 21272082bc..1f2460b464 100644 --- a/src/ToolBox/SOS/Strike/CMakeLists.txt +++ b/src/ToolBox/SOS/Strike/CMakeLists.txt @@ -132,7 +132,7 @@ endif() list(APPEND SOS_SOURCES ${SOS_SOURCES_ARCH}) -add_library(sos SHARED ${SOS_SOURCES}) +add_library_clr(sos SHARED ${SOS_SOURCES}) add_dependencies(sos mscordaccore) target_link_libraries(sos ${SOS_LIBRARY}) diff --git a/src/ToolBox/SOS/diasdk/CMakeLists.txt b/src/ToolBox/SOS/diasdk/CMakeLists.txt index d80b9bdf3a..07bbcdc9d9 100644 --- a/src/ToolBox/SOS/diasdk/CMakeLists.txt +++ b/src/ToolBox/SOS/diasdk/CMakeLists.txt @@ -12,5 +12,5 @@ add_custom_target(dialib ALL # In order to use dialib.dll as library target it needs to be imported into cmake # Target is used in ToolBox/SOS/dactablegen/cmakelists.txt -add_library(dialib_dll SHARED IMPORTED GLOBAL) +add_library_clr(dialib_dll SHARED IMPORTED GLOBAL) set_property(TARGET dialib_dll PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/dialib.dll) diff --git a/src/binder/v3binder/CMakeLists.txt b/src/binder/v3binder/CMakeLists.txt index 6af80fcf9a..e0fb28f37b 100644 --- a/src/binder/v3binder/CMakeLists.txt +++ b/src/binder/v3binder/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(v3binder +add_library_clr(v3binder STATIC ${BINDER_SOURCES} ) diff --git a/src/binder/v3binder_crossgen/CMakeLists.txt b/src/binder/v3binder_crossgen/CMakeLists.txt index aee5adf52d..cf8040291e 100644 --- a/src/binder/v3binder_crossgen/CMakeLists.txt +++ b/src/binder/v3binder_crossgen/CMakeLists.txt @@ -1,6 +1,6 @@ include(${CLR_DIR}/crossgen.cmake) -add_library(v3binder_crossgen +add_library_clr(v3binder_crossgen STATIC ${BINDER_CROSSGEN_SOURCES} ) diff --git a/src/classlibnative/bcltype/CMakeLists.txt b/src/classlibnative/bcltype/CMakeLists.txt index 56ba6ff661..4df909ae35 100644 --- a/src/classlibnative/bcltype/CMakeLists.txt +++ b/src/classlibnative/bcltype/CMakeLists.txt @@ -25,7 +25,7 @@ if(CLR_CMAKE_PLATFORM_UNIX) add_compile_options(-fPIC) endif(CLR_CMAKE_PLATFORM_UNIX) -add_library(bcltype +add_library_clr(bcltype STATIC ${BCLTYPE_SOURCES} ) diff --git a/src/classlibnative/cryptography/CMakeLists.txt b/src/classlibnative/cryptography/CMakeLists.txt index 717e052bf0..10c899f7f8 100644 --- a/src/classlibnative/cryptography/CMakeLists.txt +++ b/src/classlibnative/cryptography/CMakeLists.txt @@ -3,4 +3,4 @@ set( COMCRYPT_WKS_SOURCES X509Certificate.cpp ) -add_library( comcrypt_wks ${COMCRYPT_WKS_SOURCES}) +add_library_clr( comcrypt_wks ${COMCRYPT_WKS_SOURCES}) diff --git a/src/classlibnative/float/CMakeLists.txt b/src/classlibnative/float/CMakeLists.txt index 72e846cd0a..3350df9a70 100644 --- a/src/classlibnative/float/CMakeLists.txt +++ b/src/classlibnative/float/CMakeLists.txt @@ -10,7 +10,7 @@ if(CLR_CMAKE_PLATFORM_UNIX) add_compile_options(-fPIC) endif(CLR_CMAKE_PLATFORM_UNIX) -add_library(comfloat_wks +add_library_clr(comfloat_wks STATIC ${FLOAT_SOURCES} ) diff --git a/src/classlibnative/nls/CMakeLists.txt b/src/classlibnative/nls/CMakeLists.txt index 103a903bd0..d109ec2eb0 100644 --- a/src/classlibnative/nls/CMakeLists.txt +++ b/src/classlibnative/nls/CMakeLists.txt @@ -5,4 +5,4 @@ set( COMMLS_WKS_SOURCES nlstable.cpp ) -add_library(comnls_wks ${COMMLS_WKS_SOURCES}) +add_library_clr(comnls_wks ${COMMLS_WKS_SOURCES}) diff --git a/src/debug/daccess/CMakeLists.txt b/src/debug/daccess/CMakeLists.txt index 6b459b89b4..795b9b4be9 100644 --- a/src/debug/daccess/CMakeLists.txt +++ b/src/debug/daccess/CMakeLists.txt @@ -69,7 +69,7 @@ convert_to_absolute_path(DACCESS_SOURCES ${DACCESS_SOURCES}) add_precompiled_header(stdafx.h stdafx.cpp DACCESS_SOURCES) -add_library(daccess ${DACCESS_SOURCES}) +add_library_clr(daccess ${DACCESS_SOURCES}) if(CLR_CMAKE_PLATFORM_UNIX) add_dependencies(daccess coreclr) diff --git a/src/debug/dbgutil/CMakeLists.txt b/src/debug/dbgutil/CMakeLists.txt index b1a69f7d6b..1c0d49a24e 100644 --- a/src/debug/dbgutil/CMakeLists.txt +++ b/src/debug/dbgutil/CMakeLists.txt @@ -13,4 +13,4 @@ if(CLR_CMAKE_PLATFORM_UNIX) add_compile_options(-fPIC) endif(CLR_CMAKE_PLATFORM_UNIX) -add_library(dbgutil STATIC ${DBGUTIL_SOURCES}) +add_library_clr(dbgutil STATIC ${DBGUTIL_SOURCES}) diff --git a/src/debug/di/CMakeLists.txt b/src/debug/di/CMakeLists.txt index 925f356a3a..aea0320d34 100644 --- a/src/debug/di/CMakeLists.txt +++ b/src/debug/di/CMakeLists.txt @@ -78,4 +78,4 @@ endif(WIN32) add_precompiled_header(stdafx.h stdafx.cpp CORDBDI_SOURCES) -add_library(cordbdi STATIC ${CORDBDI_SOURCES}) +add_library_clr(cordbdi STATIC ${CORDBDI_SOURCES}) diff --git a/src/debug/ee/dac/CMakeLists.txt b/src/debug/ee/dac/CMakeLists.txt index c60a5f8a08..a65bc07b39 100644 --- a/src/debug/ee/dac/CMakeLists.txt +++ b/src/debug/ee/dac/CMakeLists.txt @@ -3,4 +3,4 @@ include(${CLR_DIR}/dac.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp CORDBEE_SOURCES_DAC) -add_library(cordbee_dac ${CORDBEE_SOURCES_DAC}) +add_library_clr(cordbee_dac ${CORDBEE_SOURCES_DAC}) diff --git a/src/debug/ee/wks/CMakeLists.txt b/src/debug/ee/wks/CMakeLists.txt index 79152ce404..36cb25e9e6 100644 --- a/src/debug/ee/wks/CMakeLists.txt +++ b/src/debug/ee/wks/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj if(CLR_CMAKE_PLATFORM_ARCH_ARM64) #mark obj as source that does not require compile set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj PROPERTIES EXTERNAL_OBJECT TRUE) - add_library(cordbee_wks ${CORDBEE_SOURCES_WKS}) + add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS}) else() - add_library(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj) + add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj) endif() else () @@ -29,11 +29,11 @@ else () add_compile_options(-fPIC) if(CLR_CMAKE_PLATFORM_ARCH_AMD64) - add_library(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) + add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) elseif(CLR_CMAKE_PLATFORM_ARCH_ARM) - add_library(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) + add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ../${ARCH_SOURCES_DIR}/dbghelpers.S) elseif(CLR_CMAKE_PLATFORM_ARCH_ARM64) - add_library(cordbee_wks ${CORDBEE_SOURCES_WKS}) + add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS}) else() message(FATAL_ERROR "Only ARM and AMD64 is supported") endif() diff --git a/src/debug/ildbsymlib/CMakeLists.txt b/src/debug/ildbsymlib/CMakeLists.txt index 848f95f435..1bd1096ed6 100644 --- a/src/debug/ildbsymlib/CMakeLists.txt +++ b/src/debug/ildbsymlib/CMakeLists.txt @@ -14,5 +14,5 @@ if(CLR_CMAKE_PLATFORM_UNIX) add_compile_options(-fPIC) endif(CLR_CMAKE_PLATFORM_UNIX) -add_library(ildbsymlib ${ILDBSYMLIB_SOURCES}) +add_library_clr(ildbsymlib ${ILDBSYMLIB_SOURCES}) diff --git a/src/debug/shim/CMakeLists.txt b/src/debug/shim/CMakeLists.txt index 0d7d308f05..8720eb7df2 100644 --- a/src/debug/shim/CMakeLists.txt +++ b/src/debug/shim/CMakeLists.txt @@ -12,4 +12,4 @@ set(DEBUGSHIM_SOURCES debugshim.cpp ) -add_library(debugshim STATIC ${DEBUGSHIM_SOURCES})
\ No newline at end of file +add_library_clr(debugshim STATIC ${DEBUGSHIM_SOURCES})
\ No newline at end of file diff --git a/src/dlls/clretwrc/CMakeLists.txt b/src/dlls/clretwrc/CMakeLists.txt index dc1d34770a..61fbfb85b7 100644 --- a/src/dlls/clretwrc/CMakeLists.txt +++ b/src/dlls/clretwrc/CMakeLists.txt @@ -1,5 +1,4 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) -include_directories($ENV{__GeneratedIntermediatesDir}) if(WIN32) # remove /ltcg from resource-only libraries @@ -12,8 +11,8 @@ endif(WIN32) add_definitions(-DFX_VER_INTERNALNAME_STR=clretwrc.dll) -add_library(clretwrc SHARED - clretwrc.rc +add_library_clr(clretwrc SHARED + clretwrc.rc ) # add the install targets diff --git a/src/dlls/dbgshim/CMakeLists.txt b/src/dlls/dbgshim/CMakeLists.txt index 8786d0ee84..491a0e1196 100644 --- a/src/dlls/dbgshim/CMakeLists.txt +++ b/src/dlls/dbgshim/CMakeLists.txt @@ -30,7 +30,7 @@ if(CLR_CMAKE_PLATFORM_LINUX) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Xlinker -Bsymbolic -Bsymbolic-functions") endif(CLR_CMAKE_PLATFORM_LINUX) -add_library(dbgshim SHARED ${DBGSHIM_SOURCES}) +add_library_clr(dbgshim SHARED ${DBGSHIM_SOURCES}) set(DBGSHIM_LIBRARIES debug-pal diff --git a/src/dlls/mscordac/CMakeLists.txt b/src/dlls/mscordac/CMakeLists.txt index 2bc01da646..9066b05b89 100644 --- a/src/dlls/mscordac/CMakeLists.txt +++ b/src/dlls/mscordac/CMakeLists.txt @@ -42,7 +42,7 @@ else(WIN32) endif(CLR_CMAKE_PLATFORM_LINUX) endif(WIN32) -add_library(mscordaccore SHARED ${CLR_DAC_SOURCES}) +add_library_clr(mscordaccore SHARED ${CLR_DAC_SOURCES}) # IMPORTANT! Please do not rearrange the order of the libraries. The linker on Linux is # order dependent and changing the order can result in undefined symbols in the shared diff --git a/src/dlls/mscordbi/CMakeLists.txt b/src/dlls/mscordbi/CMakeLists.txt index ea5bf4091a..74bc20624c 100644 --- a/src/dlls/mscordbi/CMakeLists.txt +++ b/src/dlls/mscordbi/CMakeLists.txt @@ -30,7 +30,7 @@ if(WIN32) list(APPEND MSCORDBI_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/mscordbi.def) endif(WIN32) -add_library(mscordbi SHARED +add_library_clr(mscordbi SHARED ${MSCORDBI_SOURCES} ) diff --git a/src/dlls/mscoree/coreclr/CMakeLists.txt b/src/dlls/mscoree/coreclr/CMakeLists.txt index 792a9aa7e8..777165cb6f 100644 --- a/src/dlls/mscoree/coreclr/CMakeLists.txt +++ b/src/dlls/mscoree/coreclr/CMakeLists.txt @@ -44,7 +44,7 @@ endif (WIN32) add_definitions(-DFX_VER_INTERNALNAME_STR=CoreCLR.dll) -add_library(coreclr +add_library_clr(coreclr SHARED ${CLR_SOURCES} ) diff --git a/src/dlls/mscorpe/CMakeLists.txt b/src/dlls/mscorpe/CMakeLists.txt index f20f043eb7..e8f22f2e9b 100644 --- a/src/dlls/mscorpe/CMakeLists.txt +++ b/src/dlls/mscorpe/CMakeLists.txt @@ -18,6 +18,6 @@ else() add_compile_options(-Wno-delete-non-virtual-dtor) endif(WIN32) -add_library(mscorpe STATIC +add_library_clr(mscorpe STATIC ${MSCORPE_SOURCES} ) diff --git a/src/dlls/mscorrc/full/CMakeLists.txt b/src/dlls/mscorrc/full/CMakeLists.txt index 726ff0a47b..2b26c576f9 100644 --- a/src/dlls/mscorrc/full/CMakeLists.txt +++ b/src/dlls/mscorrc/full/CMakeLists.txt @@ -2,7 +2,7 @@ add_definitions(-DFX_VER_INTERNALNAME_STR=mscorrc.debug.dll) if(WIN32) - add_library(mscorrc.debug SHARED + add_library_clr(mscorrc.debug SHARED ../include.rc ) @@ -13,7 +13,7 @@ if(WIN32) else() build_resources(${CMAKE_CURRENT_SOURCE_DIR}/../include.rc mscorrc_debug TARGET_CPP_FILE) - add_library(mscorrc_debug STATIC + add_library_clr(mscorrc_debug STATIC ${TARGET_CPP_FILE} ) diff --git a/src/dlls/mscorrc/small/CMakeLists.txt b/src/dlls/mscorrc/small/CMakeLists.txt index a86ae1a830..48e7f48f00 100644 --- a/src/dlls/mscorrc/small/CMakeLists.txt +++ b/src/dlls/mscorrc/small/CMakeLists.txt @@ -1,6 +1,6 @@ add_definitions(-DFX_VER_INTERNALNAME_STR=mscorrc.dll) -add_library(mscorrc SHARED +add_library_clr(mscorrc SHARED ../mscorrc.small.rc ) diff --git a/src/gcinfo/crossgen/CMakeLists.txt b/src/gcinfo/crossgen/CMakeLists.txt index ac04eaadf0..5e1652147f 100644 --- a/src/gcinfo/crossgen/CMakeLists.txt +++ b/src/gcinfo/crossgen/CMakeLists.txt @@ -1,6 +1,6 @@ include(${CLR_DIR}/crossgen.cmake) -add_library(gcinfo_crossgen +add_library_clr(gcinfo_crossgen STATIC ${GCINFO_SOURCES} ) diff --git a/src/gcinfo/lib/CMakeLists.txt b/src/gcinfo/lib/CMakeLists.txt index 7e426ea3b6..ec44c2ba5f 100644 --- a/src/gcinfo/lib/CMakeLists.txt +++ b/src/gcinfo/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(gcinfo +add_library_clr(gcinfo STATIC ${GCINFO_SOURCES} ) diff --git a/src/ildasm/rcdll/CMakeLists.txt b/src/ildasm/rcdll/CMakeLists.txt index 8eea5672e1..2a3a2c8291 100644 --- a/src/ildasm/rcdll/CMakeLists.txt +++ b/src/ildasm/rcdll/CMakeLists.txt @@ -12,7 +12,7 @@ set(ILDASM_RESOURCES ../dasm.rc ) -add_library(ildasmrc +add_library_clr(ildasmrc SHARED ${ILDASM_RESOURCES} ) diff --git a/src/ipcman/ipcman-staticcrt/CMakeLists.txt b/src/ipcman/ipcman-staticcrt/CMakeLists.txt index 91590bb0bb..a9f588018b 100644 --- a/src/ipcman/ipcman-staticcrt/CMakeLists.txt +++ b/src/ipcman/ipcman-staticcrt/CMakeLists.txt @@ -1,3 +1,3 @@ add_definitions(-D_CRTIMP=) #static link of crt add_precompiled_header(stdafx.h ../stdafx.cpp IPCMAN_SOURCES) -add_library(ipcmanager-staticcrt STATIC ${IPCMAN_SOURCES})
\ No newline at end of file +add_library_clr(ipcmanager-staticcrt STATIC ${IPCMAN_SOURCES})
\ No newline at end of file diff --git a/src/jit/crossgen/CMakeLists.txt b/src/jit/crossgen/CMakeLists.txt index 5bbd30cbdc..c4950b1882 100644 --- a/src/jit/crossgen/CMakeLists.txt +++ b/src/jit/crossgen/CMakeLists.txt @@ -4,4 +4,4 @@ if(CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_ARM) add_definitions(-DLEGACY_BACKEND) endif(CLR_CMAKE_PLATFORM_ARCH_I386 OR CLR_CMAKE_PLATFORM_ARCH_ARM) -add_library(jit_crossgen ${SOURCES}) +add_library_clr(jit_crossgen ${SOURCES}) diff --git a/src/jit/dll/CMakeLists.txt b/src/jit/dll/CMakeLists.txt index 8ab402709b..e4da4f17bb 100644 --- a/src/jit/dll/CMakeLists.txt +++ b/src/jit/dll/CMakeLists.txt @@ -9,18 +9,18 @@ if(CLR_CMAKE_PLATFORM_UNIX) add_compile_options(-fPIC) add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) - add_library(ClrJit + add_library_clr(ClrJit STATIC ${SHARED_LIB_SOURCES} ) add_dependencies(ClrJit coreclrpal gcinfo) else() - add_library(ClrJit + add_library_clr(ClrJit ${SOURCES} ) # Disable up to here (see above) the following for UNIX altjit on Windows # Enable the following for UNIX altjit on Windows -# add_library(ClrJit +# add_library_clr(ClrJit # SHARED # ${SHARED_LIB_SOURCES} # ) diff --git a/src/jit/protojit/CMakeLists.txt b/src/jit/protojit/CMakeLists.txt index cc74b43731..19ebc8c48b 100644 --- a/src/jit/protojit/CMakeLists.txt +++ b/src/jit/protojit/CMakeLists.txt @@ -2,7 +2,7 @@ project(protojit) remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) -add_library(protojit +add_library_clr(protojit SHARED ${SHARED_LIB_SOURCES} ) diff --git a/src/jit/standalone/CMakeLists.txt b/src/jit/standalone/CMakeLists.txt index db500af4db..c24d25e783 100644 --- a/src/jit/standalone/CMakeLists.txt +++ b/src/jit/standalone/CMakeLists.txt @@ -5,7 +5,7 @@ add_definitions(-DFEATURE_READYTORUN_COMPILER) add_definitions(-DFEATURE_REF_ZERO_OFFSET_ALLOWED) remove_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE) -add_library(ryujit +add_library_clr(ryujit SHARED ${SHARED_LIB_SOURCES} ) diff --git a/src/md/ceefilegen/CMakeLists.txt b/src/md/ceefilegen/CMakeLists.txt index 146c6a02c3..a1b9107caf 100644 --- a/src/md/ceefilegen/CMakeLists.txt +++ b/src/md/ceefilegen/CMakeLists.txt @@ -17,7 +17,7 @@ endif(CLR_CMAKE_PLATFORM_UNIX) add_precompiled_header(stdafx.h stdafx.cpp CEEFILEGEN_SOURCES) -add_library(ceefgen +add_library_clr(ceefgen STATIC ${CEEFILEGEN_SOURCES} ) diff --git a/src/md/compiler/crossgen/CMakeLists.txt b/src/md/compiler/crossgen/CMakeLists.txt index 8a23065335..7baf17448b 100644 --- a/src/md/compiler/crossgen/CMakeLists.txt +++ b/src/md/compiler/crossgen/CMakeLists.txt @@ -2,4 +2,4 @@ include(${CLR_DIR}/crossgen.cmake) include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES) -add_library(mdcompiler_crossgen ${MDCOMPILER_SOURCES}) +add_library_clr(mdcompiler_crossgen ${MDCOMPILER_SOURCES}) diff --git a/src/md/compiler/dac/CMakeLists.txt b/src/md/compiler/dac/CMakeLists.txt index a73f7b0459..dda76e1cd9 100644 --- a/src/md/compiler/dac/CMakeLists.txt +++ b/src/md/compiler/dac/CMakeLists.txt @@ -3,4 +3,4 @@ include(${CLR_DIR}/dac.cmake) include(../../md_dac.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES) -add_library(mdcompiler_dac ${MDCOMPILER_SOURCES}) +add_library_clr(mdcompiler_dac ${MDCOMPILER_SOURCES}) diff --git a/src/md/compiler/dbi/CMakeLists.txt b/src/md/compiler/dbi/CMakeLists.txt index e60d67767b..b870984309 100644 --- a/src/md/compiler/dbi/CMakeLists.txt +++ b/src/md/compiler/dbi/CMakeLists.txt @@ -1,4 +1,4 @@ include(../../md_dbi.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES) -add_library(mdcompiler-dbi ${MDCOMPILER_SOURCES})
\ No newline at end of file +add_library_clr(mdcompiler-dbi ${MDCOMPILER_SOURCES})
\ No newline at end of file diff --git a/src/md/compiler/wks/CMakeLists.txt b/src/md/compiler/wks/CMakeLists.txt index 7eb09e7524..6bf6c80868 100644 --- a/src/md/compiler/wks/CMakeLists.txt +++ b/src/md/compiler/wks/CMakeLists.txt @@ -1,4 +1,4 @@ include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDCOMPILER_SOURCES) -add_library(mdcompiler_wks ${MDCOMPILER_SOURCES})
\ No newline at end of file +add_library_clr(mdcompiler_wks ${MDCOMPILER_SOURCES})
\ No newline at end of file diff --git a/src/md/datasource/dbi/CMakeLists.txt b/src/md/datasource/dbi/CMakeLists.txt index c509c19410..c30c62e33c 100644 --- a/src/md/datasource/dbi/CMakeLists.txt +++ b/src/md/datasource/dbi/CMakeLists.txt @@ -1,4 +1,4 @@ include(../../md_dbi.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDDATASOURCE_SOURCES) -add_library(mddatasource_dbi STATIC ${MDDATASOURCE_SOURCES})
\ No newline at end of file +add_library_clr(mddatasource_dbi STATIC ${MDDATASOURCE_SOURCES})
\ No newline at end of file diff --git a/src/md/enc/crossgen/CMakeLists.txt b/src/md/enc/crossgen/CMakeLists.txt index d619c5c3f7..f01451a337 100644 --- a/src/md/enc/crossgen/CMakeLists.txt +++ b/src/md/enc/crossgen/CMakeLists.txt @@ -2,4 +2,4 @@ include(${CLR_DIR}/crossgen.cmake) include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES) -add_library(mdruntimerw_crossgen ${MDRUNTIMERW_SOURCES}) +add_library_clr(mdruntimerw_crossgen ${MDRUNTIMERW_SOURCES}) diff --git a/src/md/enc/dac/CMakeLists.txt b/src/md/enc/dac/CMakeLists.txt index 90f7e786b6..9bef4636f7 100644 --- a/src/md/enc/dac/CMakeLists.txt +++ b/src/md/enc/dac/CMakeLists.txt @@ -3,4 +3,4 @@ include(${CLR_DIR}/dac.cmake) include(../../md_dac.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES) -add_library(mdruntimerw_dac ${MDRUNTIMERW_SOURCES}) +add_library_clr(mdruntimerw_dac ${MDRUNTIMERW_SOURCES}) diff --git a/src/md/enc/dbi/CMakeLists.txt b/src/md/enc/dbi/CMakeLists.txt index 6cd97dd5bd..5be16bc28c 100644 --- a/src/md/enc/dbi/CMakeLists.txt +++ b/src/md/enc/dbi/CMakeLists.txt @@ -1,4 +1,4 @@ include(../../md_dbi.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES) -add_library(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES})
\ No newline at end of file +add_library_clr(mdruntimerw-dbi ${MDRUNTIMERW_SOURCES})
\ No newline at end of file diff --git a/src/md/enc/wks/CMakeLists.txt b/src/md/enc/wks/CMakeLists.txt index 5b596ed7fa..df7664187d 100644 --- a/src/md/enc/wks/CMakeLists.txt +++ b/src/md/enc/wks/CMakeLists.txt @@ -1,4 +1,4 @@ include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIMERW_SOURCES) -add_library(mdruntimerw_wks ${MDRUNTIMERW_SOURCES}) +add_library_clr(mdruntimerw_wks ${MDRUNTIMERW_SOURCES}) diff --git a/src/md/hotdata/crossgen/CMakeLists.txt b/src/md/hotdata/crossgen/CMakeLists.txt index 323edc91e2..7d7738c5c1 100644 --- a/src/md/hotdata/crossgen/CMakeLists.txt +++ b/src/md/hotdata/crossgen/CMakeLists.txt @@ -2,4 +2,4 @@ include(${CLR_DIR}/crossgen.cmake) include(../../md_wks.cmake) add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES) -add_library(mdhotdata_crossgen ${MDHOTDATA_SOURCES}) +add_library_clr(mdhotdata_crossgen ${MDHOTDATA_SOURCES}) diff --git a/src/md/hotdata/dac/CMakeLists.txt b/src/md/hotdata/dac/CMakeLists.txt index 02519679d3..99a3f1d00d 100644 --- a/src/md/hotdata/dac/CMakeLists.txt +++ b/src/md/hotdata/dac/CMakeLists.txt @@ -3,4 +3,4 @@ include(${CLR_DIR}/dac.cmake) add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES) -add_library(mdhotdata_dac ${MDHOTDATA_SOURCES}) +add_library_clr(mdhotdata_dac ${MDHOTDATA_SOURCES}) diff --git a/src/md/hotdata/full-staticcrt/CMakeLists.txt b/src/md/hotdata/full-staticcrt/CMakeLists.txt index 3d796a23c0..8570c4a6f6 100644 --- a/src/md/hotdata/full-staticcrt/CMakeLists.txt +++ b/src/md/hotdata/full-staticcrt/CMakeLists.txt @@ -1,4 +1,4 @@ add_definitions(-D_CRTIMP=) # static link of crt add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES) -add_library(mdhotdata-staticcrt ${MDHOTDATA_SOURCES}) +add_library_clr(mdhotdata-staticcrt ${MDHOTDATA_SOURCES}) diff --git a/src/md/hotdata/full/CMakeLists.txt b/src/md/hotdata/full/CMakeLists.txt index 15448b182a..26fc6a0721 100644 --- a/src/md/hotdata/full/CMakeLists.txt +++ b/src/md/hotdata/full/CMakeLists.txt @@ -1,3 +1,3 @@ add_precompiled_header(external.h ../external.cpp MDHOTDATA_SOURCES) -add_library(mdhotdata_full ${MDHOTDATA_SOURCES}) +add_library_clr(mdhotdata_full ${MDHOTDATA_SOURCES}) diff --git a/src/md/runtime/crossgen/CMakeLists.txt b/src/md/runtime/crossgen/CMakeLists.txt index 8ec8e7e4a8..dfd0f34665 100644 --- a/src/md/runtime/crossgen/CMakeLists.txt +++ b/src/md/runtime/crossgen/CMakeLists.txt @@ -2,4 +2,4 @@ include(${CLR_DIR}/crossgen.cmake) include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES) -add_library(mdruntime_crossgen ${MDRUNTIME_SOURCES}) +add_library_clr(mdruntime_crossgen ${MDRUNTIME_SOURCES}) diff --git a/src/md/runtime/dac/CMakeLists.txt b/src/md/runtime/dac/CMakeLists.txt index 63ce26a1e9..337968e2ed 100644 --- a/src/md/runtime/dac/CMakeLists.txt +++ b/src/md/runtime/dac/CMakeLists.txt @@ -4,4 +4,4 @@ include(../../md_dac.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES) -add_library(mdruntime_dac ${MDRUNTIME_SOURCES})
\ No newline at end of file +add_library_clr(mdruntime_dac ${MDRUNTIME_SOURCES})
\ No newline at end of file diff --git a/src/md/runtime/dbi/CMakeLists.txt b/src/md/runtime/dbi/CMakeLists.txt index 2cc8420c27..6f706d2bfb 100644 --- a/src/md/runtime/dbi/CMakeLists.txt +++ b/src/md/runtime/dbi/CMakeLists.txt @@ -1,3 +1,3 @@ include(../../md_dbi.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES) -add_library(mdruntime-dbi ${MDRUNTIME_SOURCES})
\ No newline at end of file +add_library_clr(mdruntime-dbi ${MDRUNTIME_SOURCES})
\ No newline at end of file diff --git a/src/md/runtime/wks/CMakeLists.txt b/src/md/runtime/wks/CMakeLists.txt index 4822219c8c..9a1f72ed25 100644 --- a/src/md/runtime/wks/CMakeLists.txt +++ b/src/md/runtime/wks/CMakeLists.txt @@ -1,5 +1,5 @@ include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDRUNTIME_SOURCES) -add_library(mdruntime_wks ${MDRUNTIME_SOURCES}) +add_library_clr(mdruntime_wks ${MDRUNTIME_SOURCES}) diff --git a/src/md/winmd/crossgen/CMakeLists.txt b/src/md/winmd/crossgen/CMakeLists.txt index fdf5040757..30859c30ae 100644 --- a/src/md/winmd/crossgen/CMakeLists.txt +++ b/src/md/winmd/crossgen/CMakeLists.txt @@ -2,4 +2,4 @@ include(${CLR_DIR}/crossgen.cmake) include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES) -add_library(mdwinmd_crossgen ${MDWINMD_SOURCES}) +add_library_clr(mdwinmd_crossgen ${MDWINMD_SOURCES}) diff --git a/src/md/winmd/dac/CMakeLists.txt b/src/md/winmd/dac/CMakeLists.txt index 31e6bb0deb..aca5cb581d 100644 --- a/src/md/winmd/dac/CMakeLists.txt +++ b/src/md/winmd/dac/CMakeLists.txt @@ -3,4 +3,4 @@ include(${CLR_DIR}/dac.cmake) include(../../md_dbi.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES) -add_library(mdwinmd_dac ${MDWINMD_SOURCES}) +add_library_clr(mdwinmd_dac ${MDWINMD_SOURCES}) diff --git a/src/md/winmd/dbi/CMakeLists.txt b/src/md/winmd/dbi/CMakeLists.txt index 707b6b4c74..89a39d3d9b 100644 --- a/src/md/winmd/dbi/CMakeLists.txt +++ b/src/md/winmd/dbi/CMakeLists.txt @@ -1,4 +1,4 @@ include(../../md_dbi.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES) -add_library(mdwinmd_dbi ${MDWINMD_SOURCES})
\ No newline at end of file +add_library_clr(mdwinmd_dbi ${MDWINMD_SOURCES})
\ No newline at end of file diff --git a/src/md/winmd/wks/CMakeLists.txt b/src/md/winmd/wks/CMakeLists.txt index 67b1f686f5..139b68b28c 100644 --- a/src/md/winmd/wks/CMakeLists.txt +++ b/src/md/winmd/wks/CMakeLists.txt @@ -1,4 +1,4 @@ include(../../md_wks.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp MDWINMD_SOURCES) -add_library(mdwinmd_wks ${MDWINMD_SOURCES})
\ No newline at end of file +add_library_clr(mdwinmd_wks ${MDWINMD_SOURCES})
\ No newline at end of file diff --git a/src/nativeresources/CMakeLists.txt b/src/nativeresources/CMakeLists.txt index 5bc326492a..e73a0d2129 100644 --- a/src/nativeresources/CMakeLists.txt +++ b/src/nativeresources/CMakeLists.txt @@ -2,7 +2,7 @@ project(nativeresourcestring) add_compile_options(-fPIC) -add_library(nativeresourcestring +add_library_clr(nativeresourcestring STATIC resourcestring.cpp ) diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt index 6034c9da4a..5fa87cc14d 100644 --- a/src/pal/src/CMakeLists.txt +++ b/src/pal/src/CMakeLists.txt @@ -214,7 +214,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux) unwind-x86_64 ) endif() - + target_link_libraries(coreclrpal gcc_s pthread @@ -253,7 +253,7 @@ endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) add_subdirectory(examples) if(CMAKE_SYSTEM_NAME STREQUAL Linux) - add_subdirectory($ENV{__GeneratedIntermediatesDir}/eventprovider ${CMAKE_CURRENT_BINARY_DIR}/eventprovider) + add_subdirectory($ENV{__IntermediatesDir}/Generated/eventprovider ${CMAKE_CURRENT_BINARY_DIR}/eventprovider) endif(CMAKE_SYSTEM_NAME STREQUAL Linux) # Install the static PAL library for VS diff --git a/src/pal/tests/palsuite/CMakeLists.txt b/src/pal/tests/palsuite/CMakeLists.txt index b2b162985f..235b695961 100644 --- a/src/pal/tests/palsuite/CMakeLists.txt +++ b/src/pal/tests/palsuite/CMakeLists.txt @@ -21,5 +21,4 @@ add_subdirectory(miscellaneous) add_subdirectory(pal_specific) add_subdirectory(samples) add_subdirectory(threading) -add_subdirectory($ENV{__GeneratedIntermediatesDir}/eventprovider_tests ${CMAKE_CURRENT_BINARY_DIR}/eventprovider ) - +add_subdirectory($ENV{__IntermediatesDir}/Generated/eventprovider/tests ${CMAKE_CURRENT_BINARY_DIR}/eventprovider ) diff --git a/src/pal/tools/probe-win.ps1 b/src/pal/tools/probe-win.ps1 index 303c084cc4..783cb6dfe0 100644 --- a/src/pal/tools/probe-win.ps1 +++ b/src/pal/tools/probe-win.ps1 @@ -49,24 +49,10 @@ function LocateCMake return $newestCMakePath } -function LocatePython -{ - $errorMsg = "python is a pre-requisite to build this repository but it was not found on the path. Please install Python 2.7.9 from https://www.python.org/downloads/ and ensure it is on your path." - $inPathPath = (get-command python.exe -ErrorAction SilentlyContinue).Path - if ($inPathPath -eq $null) { - Throw $errorMsg - } - return $inPathPath -} - - try { $cmakePath = LocateCMake [System.Console]::WriteLine("set CMakePath=" + $cmakePath) - $pythonPath = LocatePython - [System.Console]::WriteLine("set PythonPath=" + $pythonPath) - } catch { [System.Console]::Error.WriteLine($_.Exception.Message) diff --git a/src/palrt/CMakeLists.txt b/src/palrt/CMakeLists.txt index bc965db15a..0b3397a8ff 100644 --- a/src/palrt/CMakeLists.txt +++ b/src/palrt/CMakeLists.txt @@ -17,7 +17,7 @@ set(PALRT_SOURCES add_compile_options(-fPIC) -add_library(palrt +add_library_clr(palrt STATIC ${PALRT_SOURCES} ) diff --git a/src/scripts/Utilities.py b/src/scripts/Utilities.py index 9dfefb7329..7fd9bc7d74 100644 --- a/src/scripts/Utilities.py +++ b/src/scripts/Utilities.py @@ -42,6 +42,7 @@ def walk_recursively_and_update(dcmp): def UpdateDirectory(destpath,srcpath): + print("Updating %s with %s" % (destpath,srcpath)) if not os.path.exists(destpath): os.makedirs(destpath) dcmp = dircmp(destpath,srcpath) diff --git a/src/scripts/genXplatEventing.py b/src/scripts/genXplatEventing.py index 1d01b60a6c..2d44904693 100644 --- a/src/scripts/genXplatEventing.py +++ b/src/scripts/genXplatEventing.py @@ -1,4 +1,4 @@ -## +# ## Copyright (c) Microsoft. All rights reserved. ## Licensed under the MIT license. See LICENSE file in the project root for full license information. ## @@ -8,7 +8,7 @@ #Look at the Code in <root>/src/inc/genXplatLttng.py for using subroutines in this file # -import os +import os import xml.dom.minidom as DOM stdprolog=""" @@ -59,22 +59,21 @@ palDataTypeMapping ={ "win:Binary" :"const BYTE" } # A Template represents an ETW template can contain 1 or more AbstractTemplates -# The AbstractTemplate contains FunctionSignature +# The AbstractTemplate contains FunctionSignature # FunctionSignature consist of FunctionParameter representing each parameter in it's signature class AbstractTemplate: def __init__(self,abstractTemplateName,abstractFnFrame): self.abstractTemplateName = abstractTemplateName self.AbstractFnFrame = abstractFnFrame - class Template: def __init__(self,templateName): self.template = templateName - self.allAbstractTemplateTypes = [] # list of AbstractTemplateNames - self.allAbstractTemplateLUT = {} #dictionary of AbstractTemplate - + self.allAbstractTemplateTypes = [] # list of AbstractTemplateNames + self.allAbstractTemplateLUT = {} #dictionary of AbstractTemplate + def append(self,abstractTemplateName,abstractFnFrame): self.allAbstractTemplateTypes.append(abstractTemplateName) self.allAbstractTemplateLUT[abstractTemplateName] = AbstractTemplate(abstractTemplateName,abstractFnFrame) @@ -90,12 +89,12 @@ class Template: frame = self.getFnFrame(subtemplate) if frame.getParam(name): return frame.getParam(name) - return None + return None class FunctionSignature: def __init__(self): - self.LUT = {} # dictionary of FunctionParameter + self.LUT = {} # dictionary of FunctionParameter self.paramlist = [] # list of parameters to maintain their order in signature def append(self,variable,fnparam): @@ -114,7 +113,7 @@ class FunctionParameter: self.winType = winType #ETW type as given in the manifest self.name = name #parameter name as given in the manifest self.prop = prop #any special property as determined by the manifest and developer - #self.count #indicates if the parameter is a pointer + #self.count #indicates if the parameter is a pointer if count == "win:null": self.count = "win:null" elif count or winType == "win:GUID" or count == "win:count": @@ -123,7 +122,6 @@ class FunctionParameter: else: self.count = "win:null" - def getTopLevelElementsByTagName(Node,tag): dataNodes = [] @@ -134,7 +132,7 @@ def getTopLevelElementsByTagName(Node,tag): return dataNodes def bucketizeAbstractTemplates(template,fnPrototypes,var_Dependecies): - # At this point we have the complete argument list, now break them into chunks of 10 + # At this point we have the complete argument list, now break them into chunks of 10 # As Abstract Template supports a maximum of 10 arguments abstractTemplateName = template; subevent_cnt = 1; @@ -147,7 +145,7 @@ def bucketizeAbstractTemplates(template,fnPrototypes,var_Dependecies): abstractFnFrame.append(dependency,fnPrototypes.getParam(dependency)) frameCount = abstractFnFrame.getLength() - if frameCount == 10: + if frameCount == 10: templateProp.append(abstractTemplateName,abstractFnFrame) abstractTemplateName = template + "_" + str(subevent_cnt) @@ -167,10 +165,9 @@ def bucketizeAbstractTemplates(template,fnPrototypes,var_Dependecies): # 2. Check if the frame has enough space, if there is continue adding missing dependencies # 3. Else Save the current Frame and start a new frame and follow step 1 and 2 # 4. Add the current parameter and proceed - - #create a new fn frame - abstractFnFrame = FunctionSignature() + #create a new fn frame + abstractFnFrame = FunctionSignature() #subevent_cnt == 1 represents argumentless templates if abstractFnFrame.getLength() > 0 or subevent_cnt == 1: @@ -200,11 +197,11 @@ def parseTemplateNodes(templateNodes): attrib_name = attrib.name if attrib_name not in ignoredXmlTemplateAttribes and attrib_name not in usedXmlTemplateAttribes: raise ValueError('unknown attribute: '+ attrib_name + ' in template:'+ template) - + for dataNode in dataNodes: variable = dataNode.getAttribute('name') wintype = dataNode.getAttribute('inType') - + #count and length are the same wincount = dataNode.getAttribute('count') winlength = dataNode.getAttribute('length'); @@ -213,36 +210,35 @@ def parseTemplateNodes(templateNodes): var_dependency = [variable] if winlength: if wincount: - raise Exception("both count and length property found on: " + variable + "in template: " + template) + raise Exception("both count and length property found on: " + variable + "in template: " + template) wincount = winlength if (wincount.isdigit() and int(wincount) ==1): wincount = '' - + if wincount: if (wincount.isdigit()): var_Props = wincount - elif fnPrototypes.getParam(wincount): + elif fnPrototypes.getParam(wincount): var_Props = wincount var_dependency.insert(0,wincount) - + #construct the function signature - if wintype == "win:GUID": var_Props = "sizeof(GUID)/sizeof(int)" - + var_Dependecies[variable] = var_dependency fnparam = FunctionParameter(wintype,variable,wincount,var_Props) fnPrototypes.append(variable,fnparam) structNodes = getTopLevelElementsByTagName(templateNode,'struct') - + count = 0; for structToBeMarshalled in structNodes: struct_len = "Arg"+ str(count) + "_Struct_Len_" struct_pointer = "Arg"+ str(count) + "_Struct_Pointer_" - count += 1 + count += 1 #populate the Property- used in codegen structname = structToBeMarshalled.getAttribute('name') @@ -250,19 +246,19 @@ def parseTemplateNodes(templateNodes): if not countVarName: raise ValueError('Struct '+ structname+ ' in template:'+ template + 'does not have an attribute count') - + var_Props = countVarName + "*" + struct_len + "/sizeof(int)" var_Dependecies[struct_len] = [struct_len] var_Dependecies[struct_pointer] = [countVarName,struct_len,struct_pointer] - + fnparam_len = FunctionParameter("win:ULong",struct_len,"win:null",None) fnparam_pointer = FunctionParameter("win:Struct",struct_pointer,"win:count",var_Props) - + fnPrototypes.append(struct_len,fnparam_len) fnPrototypes.append(struct_pointer,fnparam_pointer) allTemplates[template] = bucketizeAbstractTemplates(template,fnPrototypes,var_Dependecies) - + return allTemplates def generateClrallEvents(eventNodes,allTemplates): @@ -317,7 +313,7 @@ def generateClrallEvents(eventNodes,allTemplates): del line[-1] if len(fnptypeline) > 0: del fnptypeline[-1] - + fnptype.extend(fnptypeline) fnptype.append("\n)\n{\n") fnbody.append(lindent) @@ -327,10 +323,10 @@ def generateClrallEvents(eventNodes,allTemplates): fnbody.extend(line) fnbody.append(");\n") fnbody.append("}\n\n") - + clrallEvents.extend(fnptype) clrallEvents.extend(fnbody) - + return ''.join(clrallEvents) def generateClrXplatEvents(eventNodes, allTemplates): @@ -370,11 +366,11 @@ def generateClrXplatEvents(eventNodes, allTemplates): #remove trailing commas if len(fnptypeline) > 0: del fnptypeline[-1] - + fnptype.extend(fnptypeline) fnptype.append("\n);\n") clrallEvents.extend(fnptype) - + return ''.join(clrallEvents) #generates the dummy header file which is used by the VM as entry point to the logging Functions @@ -385,7 +381,7 @@ def generateclrEtwDummy(eventNodes,allTemplates): templateName = eventNode.getAttribute('template') fnptype = [] - #generate FireEtw functions + #generate FireEtw functions fnptype.append("#define FireEtw") fnptype.append(eventName) fnptype.append("("); @@ -398,11 +394,11 @@ def generateclrEtwDummy(eventNodes,allTemplates): fnparam = fnSig.getParam(params) line.append(fnparam.name) line.append(", ") - + #remove trailing commas if len(line) > 0: del line[-1] - + fnptype.extend(line) fnptype.append(") 0\n") clretmEvents.extend(fnptype) @@ -423,7 +419,6 @@ def generateClralltestEvents(sClrEtwAllMan): clrtestEvents.append(" EventXplatEnabled" + eventName + "();\n") clrtestEvents.append("Error |= FireEtXplat" + eventName + "(\n") - line =[] if templateName : for subTemplate in allTemplates[templateName].allAbstractTemplateTypes: @@ -453,7 +448,7 @@ def generateClralltestEvents(sClrEtwAllMan): line.append(argline) line.append(",\n") - + #remove trailing commas if len(line) > 0: del line[-1] @@ -463,20 +458,22 @@ def generateClralltestEvents(sClrEtwAllMan): return ''.join(clrtestEvents) +def generateSanityTest(sClrEtwAllMan,testDir): + if not testDir: + return + print('Generting Event Logging Tests') - -def generateSanityTest(sClrEtwAllMan,testDir): if not os.path.exists(testDir): os.makedirs(testDir) cmake_file = testDir + "/CMakeLists.txt" - test_cpp = testDir + "/clralltestevents.cpp" + test_cpp = "clralltestevents.cpp" testinfo = testDir + "/testinfo.dat" Cmake_file = open(cmake_file,'w') - Test_cpp = open(test_cpp,'w') + Test_cpp = open(testDir + "/" + test_cpp,'w') Testinfo = open(testinfo,'w') - + #CMake File: print >>Cmake_file, stdprolog_cmake print >>Cmake_file, """ @@ -487,7 +484,7 @@ def generateSanityTest(sClrEtwAllMan,testDir): print >>Cmake_file, test_cpp print >>Cmake_file, """ ) - include_directories($ENV{__GeneratedIntermediatesDir}/inc) + include_directories(${GENERATED_INCLUDE_DIR}) include_directories(${COREPAL_SOURCE_DIR}/inc/rt) add_executable(eventprovidertest @@ -562,7 +559,7 @@ unsigned int win_UInt32 = 4; unsigned short win_UInt16 = 12; unsigned char win_UInt8 = 9; int win_Int32 = 12; -BYTE* win_Binary =(BYTE*)var21 ; +BYTE* win_Binary =(BYTE*)var21 ; int __cdecl main(int argc, char **argv) { @@ -601,11 +598,17 @@ int __cdecl main(int argc, char **argv) Testinfo.close() def generateEtmDummyHeader(sClrEtwAllMan,clretwdummy): + + if not clretwdummy: + return + + print(' Generting Dummy Event Headers') tree = DOM.parse(sClrEtwAllMan) incDir = os.path.dirname(os.path.realpath(clretwdummy)) if not os.path.exists(incDir): os.makedirs(incDir) + Clretwdummy = open(clretwdummy,'w') Clretwdummy.write(stdprolog + "\n") @@ -615,16 +618,21 @@ def generateEtmDummyHeader(sClrEtwAllMan,clretwdummy): eventNodes = providerNode.getElementsByTagName('event') #pal: create etmdummy.h Clretwdummy.write(generateclrEtwDummy(eventNodes, allTemplates) + "\n") - + Clretwdummy.close() -def generatePlformIndependentFiles(sClrEtwAllMan,incDir,etmDummyFile, testDir): +def generatePlformIndependentFiles(sClrEtwAllMan,incDir,etmDummyFile): + + generateEtmDummyHeader(sClrEtwAllMan,etmDummyFile) tree = DOM.parse(sClrEtwAllMan) + + if not incDir: + return + + print(' Generting Event Headers') if not os.path.exists(incDir): os.makedirs(incDir) - generateSanityTest(sClrEtwAllMan,testDir) - generateEtmDummyHeader(sClrEtwAllMan,etmDummyFile) clrallevents = incDir + "/clretwallmain.h" clrxplatevents = incDir + "/clrxplatevents.h" @@ -640,13 +648,12 @@ def generatePlformIndependentFiles(sClrEtwAllMan,incDir,etmDummyFile, testDir): templateNodes = providerNode.getElementsByTagName('template') allTemplates = parseTemplateNodes(templateNodes) eventNodes = providerNode.getElementsByTagName('event') - #vm header: + #vm header: Clrallevents.write(generateClrallEvents(eventNodes, allTemplates) + "\n") #pal: create clrallevents.h Clrxplatevents.write(generateClrXplatEvents(eventNodes, allTemplates) + "\n") - Clrxplatevents.close() Clrallevents.close() @@ -662,7 +669,7 @@ def parseExclusionList(exclusionListFile): for line in ExclusionFile: line = line.strip() - + #remove comments if not line or line.startswith('#'): continue @@ -703,7 +710,7 @@ def getStackWalkBit(eventProvider, taskName, eventSymbol, stackSet): if len(tokens) != 3: raise Exception("Error, possible error in the script which introduced the enrty "+ entry) - + eventCond = tokens[0] == eventProvider or tokens[0] == "*" taskCond = tokens[1] == taskName or tokens[1] == "*" symbolCond = tokens[2] == eventSymbol or tokens[2] == "*" @@ -740,7 +747,6 @@ def checkConsistency(sClrEtwAllMan,exclusionListFile): if not(fnParam and fnParam.winType == sLookupFieldType): raise Exception(exclusionListFile + ":No " + sLookupFieldName + " field of type " + sLookupFieldType + " for event symbol " + eventSymbol) - # If some versions of an event are on the nostack/stack lists, # and some versions are not on either the nostack or stack list, # then developer likely forgot to specify one of the versions @@ -754,7 +760,7 @@ def checkConsistency(sClrEtwAllMan,exclusionListFile): if ( not eventStackBitFromNoStackList) or ( not eventStackBitFromExplicitStackList): stackSupportSpecified[eventValue] = True else: - stackSupportSpecified[eventValue] = False + stackSupportSpecified[eventValue] = False else: # We've checked this event before. if stackSupportSpecified[eventValue]: @@ -778,11 +784,11 @@ def main(argv): help='full path to manifest containig the description of events') required.add_argument('--exc', type=str, required=True, help='full path to exclusion list') - required.add_argument('--inc', type=str, required=True, + required.add_argument('--inc', type=str, default=None, help='full path to directory where the header files will be generated') - required.add_argument('--dummy', type=str, required=True, + required.add_argument('--dummy', type=str,default=None, help='full path to file that will have dummy definitions of FireEtw functions') - required.add_argument('--testdir', type=str, required=True, + required.add_argument('--testdir', type=str, default=None, help='full path to directory where the test assets will be deployed' ) args, unknown = parser.parse_known_args(argv) if unknown: @@ -796,11 +802,8 @@ def main(argv): testDir = args.testdir checkConsistency(sClrEtwAllMan, exclusionListFile) - generatePlformIndependentFiles(sClrEtwAllMan,incdir,etmDummyFile,testDir) - + generatePlformIndependentFiles(sClrEtwAllMan,incdir,etmDummyFile) + generateSanityTest(sClrEtwAllMan,testDir) if __name__ == '__main__': return_code = main(sys.argv[1:]) sys.exit(return_code) - - - diff --git a/src/scripts/genXplatLttng.py b/src/scripts/genXplatLttng.py index fbabfb85ae..e1828ac8cb 100644 --- a/src/scripts/genXplatLttng.py +++ b/src/scripts/genXplatLttng.py @@ -48,8 +48,8 @@ ##) # -import os -from genXplatEventing import * +import os +from genXplatEventing import * stdprolog=""" // @@ -119,11 +119,11 @@ ctfDataTypeMapping ={ } def generateLttngHeader(providerName,allTemplates,eventNodes): - lTTngHdr = [] + lTTngHdr = [] for templateName in allTemplates.keys(): for subTemplate in allTemplates[templateName].allAbstractTemplateTypes: fnSig = allTemplates[templateName].getFnFrame(subTemplate) -#TP_ARGS +#TP_ARGS tp_args = [] tp_args_param = [] tp_args.append("\n#define ") @@ -131,23 +131,22 @@ def generateLttngHeader(providerName,allTemplates,eventNodes): tp_args.append('_TRACEPOINT_ARGS \\\n') tp_args.append('TP_ARGS(\\\n') - for params in fnSig.paramlist: fnparam = fnSig.getParam(params) wintypeName = fnparam.winType typewName = lttngDataTypeMapping[wintypeName] winCount = fnparam.count countw = lttngDataTypeMapping[winCount] - + tp_args_param.append(" ") tp_args_param.append(typewName) if countw != " ": tp_args_param.append(countw) - + tp_args_param.append(" ,") tp_args_param.append(fnparam.name) tp_args_param.append(",\\\n") - + if len(tp_args_param) > 0: del tp_args_param[-1] tp_args.extend(tp_args_param) @@ -161,7 +160,7 @@ def generateLttngHeader(providerName,allTemplates,eventNodes): tp_fields.append(" " + subTemplate + "_TRACEPOINT_ARGS,\n") tp_fields.append(" " + " TP_FIELDS(\n") #TP_FIELDS - + for params in fnSig.paramlist: fnparam = fnSig.getParam(params) wintypeName = fnparam.winType @@ -192,12 +191,11 @@ def generateLttngHeader(providerName,allTemplates,eventNodes): else: raise Exception("no such ctf intrinsic called: " + ctf_type) - tp_fields.append(" ") tp_fields.append(ctf_type + "(") tp_fields.extend(tp_fields_body) tp_fields.append(")\n") - + tp_fields.append(" )\n)\n") lTTngHdr.extend(tp_fields) @@ -240,7 +238,7 @@ TRACEPOINT_EVENT_INSTANCE(\\ lTTngHdr.append("T_TRACEPOINT_INSTANCE(") lTTngHdr.append(eventName +")\n") continue - + for subtemplate in allTemplates[templateName].allAbstractTemplateTypes: subevent = subtemplate; subevent = subevent.replace(templateName,'') @@ -253,7 +251,7 @@ TRACEPOINT_EVENT_INSTANCE(\\ lTTngHdr.append("#include <lttng/tracepoint-event.h>") return ''.join(lTTngHdr) - + def generateLttngTpProvider(providerName,eventNodes,allTemplates): lTTngImpl = [] for eventNode in eventNodes: @@ -270,7 +268,6 @@ def generateLttngTpProvider(providerName,eventNodes,allTemplates): fnptype.append("extern \"C\" ULONG FireEtXplat") fnptype.append(eventName) fnptype.append("(\n") - if templateName: for subtemplate in allTemplates[templateName].allAbstractTemplateTypes: @@ -281,12 +278,12 @@ def generateLttngTpProvider(providerName,eventNodes,allTemplates): typewName = palDataTypeMapping[wintypeName] winCount = fnparam.count countw = palDataTypeMapping[winCount] - + linefnptype.append(lindent) linefnptype.append(typewName) if countw != " ": linefnptype.append(countw) - + linefnptype.append(" ") linefnptype.append(fnparam.name) linefnptype.append(",\n") @@ -306,7 +303,7 @@ def generateLttngTpProvider(providerName,eventNodes,allTemplates): linefnbody = [] if templateName: - #emit code to init variables convert unicode to ansi string + #emit code to init variables convert unicode to ansi string for subtemplate in allTemplates[templateName].allAbstractTemplateTypes: fnSig = allTemplates[templateName].getFnFrame(subtemplate) for params in fnSig.paramlist: @@ -319,7 +316,7 @@ def generateLttngTpProvider(providerName,eventNodes,allTemplates): lTTngImpl.append(" INT " + paramname + "_full_name_path_size") lTTngImpl.append(" = WideCharToMultiByte( CP_ACP, 0, " + paramname + ", -1, NULL, 0, NULL, NULL );\n") lTTngImpl.append(" CHAR* " + paramname + "_full_name = NULL;\n") - + lTTngImpl.append("\n") #emit tracepoints @@ -348,7 +345,7 @@ def generateLttngTpProvider(providerName,eventNodes,allTemplates): #emit code to convert unicode to ansi string lTTngImpl.append(" "+ paramname + "_full_name = (CHAR*)malloc(") lTTngImpl.append(paramname + "_full_name_path_size*sizeof(CHAR));\n") - + lTTngImpl.append(" _ASSERTE("+paramname+ "_full_name != NULL);\n") lTTngImpl.append(" if(" + paramname + "_full_name == NULL){goto LExit;}\n\n") @@ -356,38 +353,38 @@ def generateLttngTpProvider(providerName,eventNodes,allTemplates): lTTngImpl.append(paramname + ", -1, ") lTTngImpl.append(paramname + "_full_name, ") lTTngImpl.append(paramname + "_full_name_path_size, NULL, NULL );\n") - + lTTngImpl.append(" _ASSERTE(" +paramname+ "_path_size == " ) lTTngImpl.append(paramname + "_full_name_path_size );\n") - + lTTngImpl.append(" if( " + paramname + "_path_size == 0 ){ Error = ERROR_INVALID_PARAMETER; goto LExit;}\n") - + vars_to_be_freed.append(paramname + "_full_name") - + linefnbody.append(paramname + "_full_name") linefnbody.append(",\n") continue - + elif ctf_type == "ctf_sequence" or wintypeName == "win:Pointer": linefnbody.append("(" + lttngDataTypeMapping[wintypeName]) if not lttngDataTypeMapping[winCount] == " ": linefnbody.append( lttngDataTypeMapping[winCount]) - + linefnbody.append(") ") - + linefnbody.append(paramname) linefnbody.append(",\n") - + if len(linefnbody) > 0 : del linefnbody[-1] linefnbody.append("\n );\n") - + else: linefnbody.append("\n tracepoint(\n") linefnbody.append(" "+providerName + ",\n") linefnbody.append(" "+eventName) linefnbody.append("\n );\n") - + lTTngImpl.extend(linefnbody) lTTngImpl.append(" Error = ERROR_SUCCESS;\n") @@ -398,36 +395,34 @@ def generateLttngTpProvider(providerName,eventNodes,allTemplates): lTTngImpl.append(" if ("+ var + " != NULL) {free(" ) lTTngImpl.append(var) lTTngImpl.append(");}\n") - + lTTngImpl.append("\nreturn Error;\n}\n") return ''.join(lTTngImpl) -def generateLttngFiles(etwmanifest,intermediate): +def generateLttngFiles(etwmanifest,eventprovider_directory): - tree = DOM.parse(etwmanifest) + eventprovider_directory = eventprovider_directory + "/" + tree = DOM.parse(etwmanifest) + + #keep these relative + tracepointprovider_directory = "tracepointprovider" + lttng_directory = "lttng" - if not os.path.exists(intermediate): - os.makedirs(intermediate) - - eventprovider_directory = intermediate + "/eventprovider/" - tracepointprovider_directory = eventprovider_directory + "/tracepointprovider" - lttng_directory = eventprovider_directory + "/lttng/" lttngevntprovPre = lttng_directory + "/eventprov" lttngevntprovTpPre = lttng_directory + "/traceptprov" if not os.path.exists(eventprovider_directory): os.makedirs(eventprovider_directory) - - if not os.path.exists(lttng_directory): - os.makedirs(lttng_directory) - - if not os.path.exists(tracepointprovider_directory): - os.makedirs(tracepointprovider_directory) + if not os.path.exists(eventprovider_directory + lttng_directory): + os.makedirs(eventprovider_directory + lttng_directory) + + if not os.path.exists(eventprovider_directory + tracepointprovider_directory): + os.makedirs(eventprovider_directory + tracepointprovider_directory) #Top level Cmake - topCmake = open(eventprovider_directory + "/CMakeLists.txt", 'w') + topCmake = open(eventprovider_directory + "CMakeLists.txt", 'w') topCmake.write(stdprolog_cmake + "\n") topCmake.write("""cmake_minimum_required(VERSION 2.8.12.2) @@ -450,37 +445,37 @@ def generateLttngFiles(etwmanifest,intermediate): providerName_File = providerName.replace('-','') providerName_File = providerName_File.lower() - + topCmake.write(' "'+ lttngevntprovPre + providerName_File + ".cpp" + '"\n') topCmake.write(""") add_subdirectory(tracepointprovider) - - # Install the static eventprovider library + + # Install the static eventprovider library install (TARGETS eventprovider DESTINATION lib) """) topCmake.close() #TracepointProvider Cmake - - tracepointprovider_Cmake = open(tracepointprovider_directory + "/CMakeLists.txt", 'w') - + + tracepointprovider_Cmake = open(eventprovider_directory + tracepointprovider_directory + "/CMakeLists.txt", 'w') + tracepointprovider_Cmake.write(stdprolog_cmake + "\n") tracepointprovider_Cmake.write("""cmake_minimum_required(VERSION 2.8.12.2) - + project(coreclrtraceptprovider) - + set(CMAKE_INCLUDE_CURRENT_DIR ON) - + add_definitions(-DPAL_STDCPP_COMPAT=1) include_directories(${COREPAL_SOURCE_DIR}/inc/rt) include_directories(../lttng/) add_compile_options(-fPIC) - + add_library(coreclrtraceptprovider SHARED """) - + for providerNode in tree.getElementsByTagName('provider'): providerName = providerNode.getAttribute('name') providerName = providerName.replace("Windows-",'') @@ -488,15 +483,15 @@ def generateLttngFiles(etwmanifest,intermediate): providerName_File = providerName.replace('-','') providerName_File = providerName_File.lower() - - tracepointprovider_Cmake.write(' "'+ lttngevntprovTpPre + providerName_File +".cpp" + '"\n') + + tracepointprovider_Cmake.write(' "../'+ lttngevntprovTpPre + providerName_File +".cpp" + '"\n') tracepointprovider_Cmake.write(""" ) - + target_link_libraries(coreclrtraceptprovider -llttng-ust ) - + #Install the static coreclrtraceptprovider library install (TARGETS coreclrtraceptprovider DESTINATION .) """) @@ -504,7 +499,7 @@ def generateLttngFiles(etwmanifest,intermediate): # Generate Lttng specific instrumentation for providerNode in tree.getElementsByTagName('provider'): - + providerName = providerNode.getAttribute('name') providerName = providerName.replace("Windows-",'') providerName = providerName.replace("Microsoft-",'') @@ -514,10 +509,9 @@ def generateLttngFiles(etwmanifest,intermediate): providerName = providerName.replace('-','_') lttngevntheadershortname = "tp" + providerName_File +".h"; - lttngevntheader = eventprovider_directory +"lttng/"+ lttngevntheadershortname - lttngevntprov = lttngevntprovPre + providerName_File + ".cpp" - lttngevntprovTp = lttngevntprovTpPre + providerName_File +".cpp" - + lttngevntheader = eventprovider_directory + "lttng/" + lttngevntheadershortname + lttngevntprov = eventprovider_directory + lttngevntprovPre + providerName_File + ".cpp" + lttngevntprovTp = eventprovider_directory + lttngevntprovTpPre + providerName_File +".cpp" lTTngHdr = open(lttngevntheader, 'w') lTTngImpl = open(lttngevntprov, 'w') @@ -528,10 +522,9 @@ def generateLttngFiles(etwmanifest,intermediate): lTTngTpImpl.write(stdprolog + "\n") lTTngTpImpl.write("\n#define TRACEPOINT_CREATE_PROBES\n") - - + lTTngTpImpl.write("#include \"./"+lttngevntheadershortname + "\"\n") - + lTTngHdr.write(""" #include "palrt.h" #include "pal.h" @@ -540,7 +533,6 @@ def generateLttngFiles(etwmanifest,intermediate): """) - lTTngHdr.write("#define TRACEPOINT_PROVIDER " + providerName + "\n") lTTngHdr.write(""" @@ -549,7 +541,6 @@ def generateLttngFiles(etwmanifest,intermediate): lTTngHdr.write("#define TRACEPOINT_INCLUDE \"./" + lttngevntheadershortname + "\"\n\n") - lTTngHdr.write("#if !defined(LTTNG_CORECLR_H" + providerName + ") || defined(TRACEPOINT_HEADER_MULTI_READ)\n\n") lTTngHdr.write("#define LTTNG_CORECLR_H" + providerName + "\n") @@ -560,8 +551,6 @@ def generateLttngFiles(etwmanifest,intermediate): #define TRACEPOINT_PROBE_DYNAMIC_LINKAGE """) lTTngImpl.write("#include \"" + lttngevntheadershortname + "\"\n\n") - - templateNodes = providerNode.getElementsByTagName('template') eventNodes = providerNode.getElementsByTagName('event') @@ -572,7 +561,7 @@ def generateLttngFiles(etwmanifest,intermediate): #create the implementation of eventing functions : lttngeventprov*.cp lTTngImpl.write(generateLttngTpProvider(providerName,eventNodes,allTemplates) + "\n") - + lTTngHdr.close() lTTngImpl.close() lTTngTpImpl.close() @@ -589,7 +578,7 @@ def main(argv): required.add_argument('--man', type=str, required=True, help='full path to manifest containig the description of events') required.add_argument('--intermediate', type=str, required=True, - help='full path to intermediate directory') + help='full path to eventprovider intermediate directory') args, unknown = parser.parse_known_args(argv) if unknown: print('Unknown argument(s): ', ', '.join(unknown)) @@ -603,4 +592,3 @@ def main(argv): if __name__ == '__main__': return_code = main(sys.argv[1:]) sys.exit(return_code) - diff --git a/src/strongname/api/crossgen/CMakeLists.txt b/src/strongname/api/crossgen/CMakeLists.txt index 4436ed1689..2db453648a 100644 --- a/src/strongname/api/crossgen/CMakeLists.txt +++ b/src/strongname/api/crossgen/CMakeLists.txt @@ -1,3 +1,3 @@ include(${CLR_DIR}/crossgen.cmake) -add_library(strongname_crossgen ${STRONGNAME_SOURCES}) +add_library_clr(strongname_crossgen ${STRONGNAME_SOURCES}) diff --git a/src/strongname/api/dac/CMakeLists.txt b/src/strongname/api/dac/CMakeLists.txt index 5278a67d83..877125963b 100644 --- a/src/strongname/api/dac/CMakeLists.txt +++ b/src/strongname/api/dac/CMakeLists.txt @@ -1,4 +1,4 @@ include(${CLR_DIR}/dac.cmake) -add_library(strongname_dac ${STRONGNAME_SOURCES}) +add_library_clr(strongname_dac ${STRONGNAME_SOURCES}) diff --git a/src/strongname/api/wks/CMakeLists.txt b/src/strongname/api/wks/CMakeLists.txt index 581fee7717..09c9f4c19d 100644 --- a/src/strongname/api/wks/CMakeLists.txt +++ b/src/strongname/api/wks/CMakeLists.txt @@ -1 +1 @@ -add_library(strongname_wks ${STRONGNAME_SOURCES}) +add_library_clr(strongname_wks ${STRONGNAME_SOURCES}) diff --git a/src/tools/crossgen/CMakeLists.txt b/src/tools/crossgen/CMakeLists.txt index 1700eb3dbf..cb983bdd83 100644 --- a/src/tools/crossgen/CMakeLists.txt +++ b/src/tools/crossgen/CMakeLists.txt @@ -19,7 +19,7 @@ endif(CLR_CMAKE_PLATFORM_UNIX) add_definitions(-DFX_VER_INTERNALNAME_STR=crossgen.exe) add_definitions(-DNO_NGENPDB) -add_executable(crossgen +add_executable_clr(crossgen ${crossgen_SOURCES} ${crossgen_RESOURCES} ) diff --git a/src/unwinder/dac/CMakeLists.txt b/src/unwinder/dac/CMakeLists.txt index 55c9199c7e..561dbf2eaf 100644 --- a/src/unwinder/dac/CMakeLists.txt +++ b/src/unwinder/dac/CMakeLists.txt @@ -30,4 +30,4 @@ else() clr_unknown_arch() endif() -add_library(unwinder_dac ${UNWINDER_SOURCES}) +add_library_clr(unwinder_dac ${UNWINDER_SOURCES}) diff --git a/src/unwinder/dac/hostwinamd64/CMakeLists.txt b/src/unwinder/dac/hostwinamd64/CMakeLists.txt index 757fde3909..8309c3597b 100644 --- a/src/unwinder/dac/hostwinamd64/CMakeLists.txt +++ b/src/unwinder/dac/hostwinamd64/CMakeLists.txt @@ -1,3 +1,3 @@ include(${CLR_DIR}/dac.cmake) -add_library(unwinder_dac_amd64 ${UNWINDER_SOURCES}) +add_library_clr(unwinder_dac_amd64 ${UNWINDER_SOURCES}) diff --git a/src/unwinder/wks/CMakeLists.txt b/src/unwinder/wks/CMakeLists.txt index 91000b368f..728cc10db1 100644 --- a/src/unwinder/wks/CMakeLists.txt +++ b/src/unwinder/wks/CMakeLists.txt @@ -1 +1 @@ -add_library(unwinder_wks ${UNWINDER_SOURCES}) +add_library_clr(unwinder_wks ${UNWINDER_SOURCES}) diff --git a/src/utilcode/crossgen/CMakeLists.txt b/src/utilcode/crossgen/CMakeLists.txt index 50c9927ca8..cfa3370c1a 100644 --- a/src/utilcode/crossgen/CMakeLists.txt +++ b/src/utilcode/crossgen/CMakeLists.txt @@ -1,7 +1,7 @@ include(${CLR_DIR}/crossgen.cmake) add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_CROSSGEN_SOURCES) -add_library(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES}) +add_library_clr(utilcode_crossgen STATIC ${UTILCODE_CROSSGEN_SOURCES}) if(CLR_CMAKE_PLATFORM_UNIX) target_link_libraries(utilcode_crossgen nativeresourcestring) endif(CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/utilcode/dac/CMakeLists.txt b/src/utilcode/dac/CMakeLists.txt index 573bac94cb..9199fcce65 100644 --- a/src/utilcode/dac/CMakeLists.txt +++ b/src/utilcode/dac/CMakeLists.txt @@ -3,10 +3,10 @@ include(${CLR_DIR}/dac.cmake) add_definitions(-DSELF_NO_HOST) if(CLR_CMAKE_PLATFORM_UNIX) - add_library(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES}) + add_library_clr(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES}) target_link_libraries(utilcode_dac nativeresourcestring) add_dependencies(utilcode_dac coreclrpal) else() add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_DAC_SOURCES) - add_library(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES}) + add_library_clr(utilcode_dac STATIC ${UTILCODE_DAC_SOURCES}) endif(CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/utilcode/dyncrt/CMakeLists.txt b/src/utilcode/dyncrt/CMakeLists.txt index c2164f327c..1de80fcfb5 100644 --- a/src/utilcode/dyncrt/CMakeLists.txt +++ b/src/utilcode/dyncrt/CMakeLists.txt @@ -1,9 +1,9 @@ if(CLR_CMAKE_PLATFORM_UNIX) - add_library(utilcode STATIC ${UTILCODE_SOURCES}) + add_library_clr(utilcode STATIC ${UTILCODE_SOURCES}) target_link_libraries(utilcode nativeresourcestring) add_dependencies(utilcode coreclrpal) else() add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_SOURCES) - add_library(utilcode STATIC ${UTILCODE_SOURCES}) + add_library_clr(utilcode STATIC ${UTILCODE_SOURCES}) endif(CLR_CMAKE_PLATFORM_UNIX) diff --git a/src/utilcode/staticnohost/CMakeLists.txt b/src/utilcode/staticnohost/CMakeLists.txt index 039aa3c121..eea4d60785 100644 --- a/src/utilcode/staticnohost/CMakeLists.txt +++ b/src/utilcode/staticnohost/CMakeLists.txt @@ -5,7 +5,7 @@ if(WIN32) add_precompiled_header(stdafx.h ../stdafx.cpp UTILCODE_STATICNOHOST_SOURCES) endif(WIN32) -add_library(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES}) +add_library_clr(utilcodestaticnohost STATIC ${UTILCODE_STATICNOHOST_SOURCES}) if(CLR_CMAKE_PLATFORM_UNIX) target_link_libraries(utilcodestaticnohost nativeresourcestring) diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt index 4c26eb4bbe..c489ed1932 100644 --- a/src/vm/CMakeLists.txt +++ b/src/vm/CMakeLists.txt @@ -479,6 +479,6 @@ list(APPEND VM_SOURCES_DAC convert_to_absolute_path(VM_SOURCES_WKS ${VM_SOURCES_WKS}) convert_to_absolute_path(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARCH_ASM}) convert_to_absolute_path(VM_SOURCES_DAC ${VM_SOURCES_DAC}) - + add_subdirectory(dac) add_subdirectory(wks) diff --git a/src/vm/crossgen/CMakeLists.txt b/src/vm/crossgen/CMakeLists.txt index a1f1362346..e3b5c6ae74 100644 --- a/src/vm/crossgen/CMakeLists.txt +++ b/src/vm/crossgen/CMakeLists.txt @@ -153,4 +153,4 @@ if (CLR_CMAKE_PLATFORM_LINUX) ) endif (CLR_CMAKE_PLATFORM_LINUX) -add_library(cee_crossgen ${VM_CROSSGEN_SOURCES}) +add_library_clr(cee_crossgen ${VM_CROSSGEN_SOURCES}) diff --git a/src/vm/crossgen_mscorlib/CMakeLists.txt b/src/vm/crossgen_mscorlib/CMakeLists.txt index 88786c6b4b..598ee9952c 100644 --- a/src/vm/crossgen_mscorlib/CMakeLists.txt +++ b/src/vm/crossgen_mscorlib/CMakeLists.txt @@ -12,4 +12,4 @@ add_definitions( add_definitions(-DCROSSGEN_MSCORLIB) -add_library(mscorlib_crossgen ../mscorlib.cpp) +add_library_clr(mscorlib_crossgen ../mscorlib.cpp) diff --git a/src/vm/dac/CMakeLists.txt b/src/vm/dac/CMakeLists.txt index 0b69d7efc0..bb7ad60ba7 100644 --- a/src/vm/dac/CMakeLists.txt +++ b/src/vm/dac/CMakeLists.txt @@ -2,4 +2,4 @@ include(${CLR_DIR}/dac.cmake) add_precompiled_header(common.h ../common.cpp VM_SOURCES_DAC) -add_library(cee_dac ${VM_SOURCES_DAC})
\ No newline at end of file +add_library_clr(cee_dac ${VM_SOURCES_DAC}) diff --git a/src/vm/wks/CMakeLists.txt b/src/vm/wks/CMakeLists.txt index b0af9a6b34..a2468caba6 100644 --- a/src/vm/wks/CMakeLists.txt +++ b/src/vm/wks/CMakeLists.txt @@ -18,7 +18,7 @@ if (WIN32) endif(CLR_CMAKE_PLATFORM_ARCH_ARM64) endif (WIN32) -add_library(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM}) +add_library_clr(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM}) if (WIN32) # Get the current list of definitions diff --git a/src/zap/crossgen/CMakeLists.txt b/src/zap/crossgen/CMakeLists.txt index 7df599a12e..8cc6b38ad3 100644 --- a/src/zap/crossgen/CMakeLists.txt +++ b/src/zap/crossgen/CMakeLists.txt @@ -25,4 +25,4 @@ if (FEATURE_READYTORUN) endif (FEATURE_READYTORUN) add_precompiled_header(common.h ../common.cpp ZAP_SOURCES) -add_library(corzap_crossgen STATIC ${ZAP_SOURCES}) +add_library_clr(corzap_crossgen STATIC ${ZAP_SOURCES}) |