summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt14
-rw-r--r--build.cmd39
-rw-r--r--src/CMakeLists.txt37
-rw-r--r--src/ToolBox/SOS/Strike/CMakeLists.txt2
-rw-r--r--src/ToolBox/SOS/diasdk/CMakeLists.txt2
-rw-r--r--src/binder/v3binder/CMakeLists.txt2
-rw-r--r--src/binder/v3binder_crossgen/CMakeLists.txt2
-rw-r--r--src/classlibnative/bcltype/CMakeLists.txt2
-rw-r--r--src/classlibnative/cryptography/CMakeLists.txt2
-rw-r--r--src/classlibnative/float/CMakeLists.txt2
-rw-r--r--src/classlibnative/nls/CMakeLists.txt2
-rw-r--r--src/debug/daccess/CMakeLists.txt2
-rw-r--r--src/debug/dbgutil/CMakeLists.txt2
-rw-r--r--src/debug/di/CMakeLists.txt2
-rw-r--r--src/debug/ee/dac/CMakeLists.txt2
-rw-r--r--src/debug/ee/wks/CMakeLists.txt10
-rw-r--r--src/debug/ildbsymlib/CMakeLists.txt2
-rw-r--r--src/debug/shim/CMakeLists.txt2
-rw-r--r--src/dlls/clretwrc/CMakeLists.txt3
-rw-r--r--src/dlls/dbgshim/CMakeLists.txt2
-rw-r--r--src/dlls/mscordac/CMakeLists.txt2
-rw-r--r--src/dlls/mscordbi/CMakeLists.txt2
-rw-r--r--src/dlls/mscoree/coreclr/CMakeLists.txt2
-rw-r--r--src/dlls/mscorpe/CMakeLists.txt2
-rw-r--r--src/dlls/mscorrc/full/CMakeLists.txt4
-rw-r--r--src/dlls/mscorrc/small/CMakeLists.txt2
-rw-r--r--src/gcinfo/crossgen/CMakeLists.txt2
-rw-r--r--src/gcinfo/lib/CMakeLists.txt2
-rw-r--r--src/ildasm/rcdll/CMakeLists.txt2
-rw-r--r--src/ipcman/ipcman-staticcrt/CMakeLists.txt2
-rw-r--r--src/jit/crossgen/CMakeLists.txt2
-rw-r--r--src/jit/dll/CMakeLists.txt6
-rw-r--r--src/jit/protojit/CMakeLists.txt2
-rw-r--r--src/jit/standalone/CMakeLists.txt2
-rw-r--r--src/md/ceefilegen/CMakeLists.txt2
-rw-r--r--src/md/compiler/crossgen/CMakeLists.txt2
-rw-r--r--src/md/compiler/dac/CMakeLists.txt2
-rw-r--r--src/md/compiler/dbi/CMakeLists.txt2
-rw-r--r--src/md/compiler/wks/CMakeLists.txt2
-rw-r--r--src/md/datasource/dbi/CMakeLists.txt2
-rw-r--r--src/md/enc/crossgen/CMakeLists.txt2
-rw-r--r--src/md/enc/dac/CMakeLists.txt2
-rw-r--r--src/md/enc/dbi/CMakeLists.txt2
-rw-r--r--src/md/enc/wks/CMakeLists.txt2
-rw-r--r--src/md/hotdata/crossgen/CMakeLists.txt2
-rw-r--r--src/md/hotdata/dac/CMakeLists.txt2
-rw-r--r--src/md/hotdata/full-staticcrt/CMakeLists.txt2
-rw-r--r--src/md/hotdata/full/CMakeLists.txt2
-rw-r--r--src/md/runtime/crossgen/CMakeLists.txt2
-rw-r--r--src/md/runtime/dac/CMakeLists.txt2
-rw-r--r--src/md/runtime/dbi/CMakeLists.txt2
-rw-r--r--src/md/runtime/wks/CMakeLists.txt2
-rw-r--r--src/md/winmd/crossgen/CMakeLists.txt2
-rw-r--r--src/md/winmd/dac/CMakeLists.txt2
-rw-r--r--src/md/winmd/dbi/CMakeLists.txt2
-rw-r--r--src/md/winmd/wks/CMakeLists.txt2
-rw-r--r--src/nativeresources/CMakeLists.txt2
-rw-r--r--src/pal/tools/probe-win.ps114
-rw-r--r--src/palrt/CMakeLists.txt2
-rw-r--r--src/strongname/api/crossgen/CMakeLists.txt2
-rw-r--r--src/strongname/api/dac/CMakeLists.txt2
-rw-r--r--src/strongname/api/wks/CMakeLists.txt2
-rw-r--r--src/tools/crossgen/CMakeLists.txt2
-rw-r--r--src/unwinder/dac/CMakeLists.txt2
-rw-r--r--src/unwinder/dac/hostwinamd64/CMakeLists.txt2
-rw-r--r--src/unwinder/wks/CMakeLists.txt2
-rw-r--r--src/utilcode/crossgen/CMakeLists.txt2
-rw-r--r--src/utilcode/dac/CMakeLists.txt4
-rw-r--r--src/utilcode/dyncrt/CMakeLists.txt4
-rw-r--r--src/utilcode/staticnohost/CMakeLists.txt2
-rw-r--r--src/vm/CMakeLists.txt2
-rw-r--r--src/vm/crossgen/CMakeLists.txt2
-rw-r--r--src/vm/crossgen_mscorlib/CMakeLists.txt2
-rw-r--r--src/vm/dac/CMakeLists.txt2
-rw-r--r--src/vm/wks/CMakeLists.txt2
-rw-r--r--src/zap/crossgen/CMakeLists.txt2
76 files changed, 131 insertions, 136 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7b53ef911..18208770c3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,6 +7,8 @@ project(CoreCLR)
# Enable @rpath support for shared libraries.
set(MACOSX_RPATH ON)
+#SET_PROPERTY(GLOBAL PROPERTY GLOBAL_DEPENDS_DEBUG_MODE 1)
+
if(CMAKE_VERSION VERSION_EQUAL 3.0 OR CMAKE_VERSION VERSION_GREATER 3.0)
cmake_policy(SET CMP0042 NEW)
endif()
@@ -128,8 +130,20 @@ if(CLR_CMAKE_PLATFORM_UNIX)
endif (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL amd64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
endif(CLR_CMAKE_PLATFORM_UNIX)
+# Ensure that python is present
+find_program(PYTHON python)
+if (PYTHON STREQUAL "PYTHON-NOTFOUND")
+ message(FATAL_ERROR "PYTHON not found: Please install Python 2.7.9 or later from https://www.python.org/downloads/")
+endif()
+
if(WIN32)
enable_language(ASM_MASM)
+
+ # Ensure that MC is present
+ find_program(MC mc)
+ if (MC STREQUAL "MC-NOTFOUND")
+ message(FATAL_ERROR "MC not found")
+ endif()
else()
enable_language(ASM)
diff --git a/build.cmd b/build.cmd
index 0ffb18f30a..3751c18b8f 100644
--- a/build.cmd
+++ b/build.cmd
@@ -328,45 +328,6 @@ if not exist "%__IntermediatesDir%\install.vcxproj" (
REM =========================================================================================
REM ===
-REM === Build ETW infrastructure
-REM ===
-REM =========================================================================================
-
-echo %__MsgPrefix%Generating ETW files
-
-if not defined PythonPath (
- echo %__MsgPrefix%Error: Couldn't find Python.
- exit /b 1
-)
-
-:: Ensure there are no stale files in the Generated Directory
-if exist "%__GeneratedIntermediatesDir%" rd /s /q "%__GeneratedIntermediatesDir%"
-md "%__GeneratedIntermediatesDir%"
-md "%__GeneratedIntermediatesDir%\inc"
-set "genetw=%__SourceDir%\scripts\genWinEtw.py"
-
-mc -h "%__GeneratedIntermediatesDir%\inc" -r "%__GeneratedIntermediatesDir%" -b -co -um -p FireEtw "%__SourceDir%\VM\ClrEtwAll.man"
-IF ERRORLEVEL 1 goto FailedToGenEtwMetadata
-
-"%PythonPath%" "%genetw%" --man "%__SourceDir%\VM\ClrEtwAll.man" --exc "%__SourceDir%\VM\ClrEtwAllMeta.lst" --eventheader "%__GeneratedIntermediatesDir%\inc\ClrEtwAll.h" --macroheader "%__GeneratedIntermediatesDir%\inc\clretwallmain.h" --dummy "%__GeneratedIntermediatesDir%\inc\etmdummy.h"
-IF ERRORLEVEL 1 goto FailedToGenEtwMetadata
-
-:: Do not use this variable; it is used below to support incremental build.
-set "__GeneratedIntermediatesDirPresent=%__IntermediatesDir%\Generated"
-"%PythonPath%" -c "import sys;sys.path.insert(0,r\"%__SourceDir%\scripts\"); from Utilities import *;UpdateDirectory(r\"%__GeneratedIntermediatesDirPresent%\",r\"%__GeneratedIntermediatesDir%\")"
-IF ERRORLEVEL 1 goto FailedToGenEtwMetadata
-
-set __GeneratedIntermediatesDir="%__GeneratedIntermediatesDirPresent%"
-goto DoneGenEtwMetadata
-
-:FailedToGenEtwMetadata
-echo %__MsgPrefix%Error: failed to generate ETW files.
-exit /b %ERRORLEVEL%
-
-:DoneGenEtwMetadata
-
-REM =========================================================================================
-REM ===
REM === Build the CLR VM
REM ===
REM =========================================================================================
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5815ca1532..9231dc9a79 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,42 @@ include_directories("md/inc")
include_directories("classlibnative/bcltype")
include_directories("classlibnative/cryptography")
include_directories("classlibnative/inc")
+include_directories("${GENERATED_INCLUDE_DIR}")
+
+if(WIN32)
+ add_custom_command(
+ COMMENT "Generating Eventing Files"
+ OUTPUT ${GENERATED_INCLUDE_DIR}/ClrEtwAll.h
+ OUTPUT ${GENERATED_INCLUDE_DIR}/clretwallmain.h
+ OUTPUT ${GENERATED_INCLUDE_DIR}/etmdummy.h
+ COMMAND ${MC} -h ${GENERATED_INCLUDE_DIR} -r ${GENERATED_INCLUDE_DIR} -b -co -um -p FireEtw "${VM_DIR}/ClrEtwAll.man"
+ COMMAND ${PYTHON} -B -Wall -Werror "${CLR_DIR}/src/scripts/genWinEtw.py" --man "${VM_DIR}/ClrEtwAll.man" --exc "${VM_DIR}/ClrEtwAllMeta.lst" --eventheader "${GENERATED_INCLUDE_DIR}/ClrEtwAll.h" --macroheader "${GENERATED_INCLUDE_DIR}/clretwallmain.h" --dummy "${GENERATED_INCLUDE_DIR}/etmdummy.h"
+ DEPENDS "${CLR_DIR}/src/scripts/genWinEtw.py" "${VM_DIR}/ClrEtwAll.man" "${VM_DIR}/ClrEtwAllMeta.lst"
+ )
+elseif(CLR_CMAKE_PLATFORM_LINUX)
+ add_custom_command(
+ COMMENT "Generating Eventing Files"
+ OUTPUT ${GENERATED_INCLUDE_DIR}/ClrEtwAll.h
+ OUTPUT ${GENERATED_INCLUDE_DIR}/clretwallmain.h
+ OUTPUT ${GENERATED_INCLUDE_DIR}/etmdummy.h
+ COMMAND ${PYTHON} -B -Wall -Werror "${CLR_DIR}/src/scripts/genXplatEventing.py" --man "${VM_DIR}/ClrEtwAll.man" --exc "${VM_DIR}/ClrEtwAllMeta.lst" --eventheader "${GENERATED_INCLUDE_DIR}/ClrEtwAll.h" --macroheader "${GENERATED_INCLUDE_DIR}/clretwallmain.h" --dummy "${GENERATED_INCLUDE_DIR}/etmdummy.h"
+ DEPENDS "${CLR_DIR}/src/scripts/genWinEtw.py" "${VM_DIR}/ClrEtwAll.man" "${VM_DIR}/ClrEtwAllMeta.lst"
+ )
+endif()
+
+add_custom_target(
+ GeneratedEventingFiles
+ DEPENDS ${GENERATED_INCLUDE_DIR}/clretwallmain.h ${GENERATED_INCLUDE_DIR}/etmdummy.h ${GENERATED_INCLUDE_DIR}/ClrEtwAll.h)
+
+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..284b43715b 100644
--- a/src/dlls/clretwrc/CMakeLists.txt
+++ b/src/dlls/clretwrc/CMakeLists.txt
@@ -12,8 +12,7 @@ endif(WIN32)
add_definitions(-DFX_VER_INTERNALNAME_STR=clretwrc.dll)
-add_library(clretwrc SHARED
- clretwrc.rc
+add_library_clr(clretwrc SHARED
)
# 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/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/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})