summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--CMakeLists.txt35
-rw-r--r--build.cmd3
-rwxr-xr-xbuild.sh7
-rw-r--r--clr.props1
-rw-r--r--dir.props3
-rw-r--r--src/mscorlib/mscorlib.csproj3
-rw-r--r--src/pal/tools/clang-compiler-override.txt5
-rwxr-xr-xsrc/pal/tools/gen-buildsys-clang.sh4
-rw-r--r--src/pal/tools/windows-compiler-override.txt7
-rw-r--r--src/vm/CMakeLists.txt10
-rw-r--r--src/vm/gchelpers.cpp2
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/buildtest.cmd4
-rw-r--r--tests/runtest.cmd3
-rw-r--r--tests/src/dir.common.props6
16 files changed, 78 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index 2934c40cc2..da64285893 100644
--- a/.gitignore
+++ b/.gitignore
@@ -259,6 +259,7 @@ Temporary Items
# Ignore folders created by the test build
TestWrappers_x64_debug
+TestWrappers_x64_checked
TestWrappers_x64_release
Vagrantfile
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b70d0955ba..4bdc49fb52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -204,10 +204,18 @@ endfunction()
# Includes
+if (CMAKE_CONFIGURATION_TYPES) # multi-configuration generator?
+ set(CMAKE_CONFIGURATION_TYPES "Debug;Checked;Release;RelWithDebInfo" CACHE STRING "" FORCE)
+endif (CMAKE_CONFIGURATION_TYPES)
+set(CMAKE_C_FLAGS_CHECKED "")
+set(CMAKE_CXX_FLAGS_CHECKED "")
+set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
+set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
+
if (WIN32)
# For multi-configuration toolset (as Visual Studio)
# set the different configuration defines.
- foreach (Config DEBUG RELEASE RELWITHDEBINFO)
+ foreach (Config DEBUG CHECKED RELEASE RELWITHDEBINFO)
foreach (Definition IN LISTS CLR_DEFINES_${Config}_INIT)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${Config}>:${Definition}>)
endforeach (Definition)
@@ -215,7 +223,7 @@ if (WIN32)
elseif (CLR_CMAKE_PLATFORM_UNIX)
# Set the values to display when interactively configuring CMAKE_BUILD_TYPE
- set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "DEBUG;RELEASE;RELWITHDEBINFO")
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "DEBUG;CHECKED;RELEASE;RELWITHDEBINFO")
# Use uppercase CMAKE_BUILD_TYPE for the string comparisons below
string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_CMAKE_BUILD_TYPE)
@@ -225,6 +233,9 @@ elseif (CLR_CMAKE_PLATFORM_UNIX)
if (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG)
# First DEBUG
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${CLR_DEFINES_DEBUG_INIT})
+ elseif (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
+ # Then CHECKED
+ set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${CLR_DEFINES_CHECKED_INIT})
elseif (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE)
# Then RELEASE
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS ${CLR_DEFINES_RELEASE_INIT})
@@ -232,7 +243,7 @@ elseif (CLR_CMAKE_PLATFORM_UNIX)
# And then RELWITHDEBINFO
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS ${CLR_DEFINES_RELWITHDEBINFO_INIT})
else ()
- message(FATAL_ERROR "Unknown build type! Set CMAKE_BUILD_TYPE to DEBUG, RELEASE, or RELWITHDEBINFO!")
+ message(FATAL_ERROR "Unknown build type! Set CMAKE_BUILD_TYPE to DEBUG, CHECKED, RELEASE, or RELWITHDEBINFO!")
endif ()
endif(WIN32)
@@ -281,7 +292,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
#-fms-extensions Accept some non-standard constructs supported by the Microsoft compiler
# set the CLANG sanitizer flags for debug build
- if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG)
+ if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
# obtain settings from running enablesanitizers.sh
string(FIND "$ENV{DEBUG_SANITIZERS}" "asan" __ASAN_POS)
string(FIND "$ENV{DEBUG_SANITIZERS}" "ubsan" __UBSAN_POS)
@@ -303,13 +314,16 @@ if (CLR_CMAKE_PLATFORM_UNIX)
# -fPIC: enable Position Independent Code normally just for shared libraries but required when linking with address sanitizer
# -O1: optimization level used instead of -O0 to avoid compile error "invalid operand for inline asm constraint"
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CLR_SANITIZE_CXX_FLAGS} -fdata-sections -ffunction-sections -fPIC -O1")
+ set(CMAKE_CXX_FLAGS_CHECKED "${CMAKE_CXX_FLAGS_CHECKED} ${CLR_SANITIZE_CXX_FLAGS} -fdata-sections -ffunction-sections -fPIC -O1")
set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${CLR_SANITIZE_LINK_FLAGS}")
+ set(CMAKE_EXE_LINKER_FLAGS_CHECKED "${CMAKE_EXE_LINKER_FLAGS_CHECKED} ${CLR_SANITIZE_LINK_FLAGS}")
# -Wl and --gc-sections: drop unused sections\functions (similar to Windows /Gy function-level-linking)
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} ${CLR_SANITIZE_LINK_FLAGS} -Wl,--gc-sections")
+ set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "${CMAKE_SHARED_LINKER_FLAGS_CHECKED} ${CLR_SANITIZE_LINK_FLAGS} -Wl,--gc-sections")
endif ()
- endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG)
+ endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
add_subdirectory(src/ToolBox/SOS/lldbplugin)
add_subdirectory(src/pal)
@@ -383,7 +397,7 @@ if (CLR_CMAKE_PLATFORM_ARCH_I386)
endif (CLR_CMAKE_PLATFORM_ARCH_I386)
add_compile_options($<$<OR:$<CONFIG:Release>,$<CONFIG:Relwithdebinfo>>:/GL>)
-add_compile_options($<$<OR:$<CONFIG:Release>,$<CONFIG:Relwithdebinfo>>:/O1>)
+add_compile_options($<$<OR:$<OR:$<CONFIG:Release>,$<CONFIG:Relwithdebinfo>>,$<CONFIG:Checked>>:/O1>)
if (IS_64BIT_BUILD EQUAL 1)
# The generator expression in the following command means that the /homeparams option is added only for debug builds
@@ -416,6 +430,11 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1572864")
# Debug build specific flags
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "/NOVCFEATURE")
+# Checked build specific flags
+set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "${CMAKE_SHARED_LINKER_FLAGS_CHECKED} /OPT:REF /OPT:NOICF /NOVCFEATURE")
+set(CMAKE_STATIC_LINKER_FLAGS_CHECKED "${CMAKE_STATIC_LINKER_FLAGS_CHECKED} /OPT:REF /OPT:NOICF")
+set(CMAKE_EXE_LINKER_FLAGS_CHECKED "${CMAKE_EXE_LINKER_FLAGS_CHECKED} /OPT:REF /OPT:NOICF")
+
# Release build specific flags
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG /OPT:REF /OPT:ICF")
set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS_RELEASE} /LTCG")
@@ -510,8 +529,8 @@ endif (CLR_CMAKE_PLATFORM_UNIX)
# Libraries
if (WIN32)
- set(STATIC_MT_CRT_LIB "libcmt$<$<CONFIG:Debug>:d>.lib")
- set(STATIC_MT_CPP_LIB "libcpmt$<$<CONFIG:Debug>:d>.lib")
+ set(STATIC_MT_CRT_LIB "libcmt$<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:d>.lib")
+ set(STATIC_MT_CPP_LIB "libcpmt$<$<OR:$<CONFIG:Debug>,$<CONFIG:Checked>>:d>.lib")
endif(WIN32)
# Definition directives
diff --git a/build.cmd b/build.cmd
index 88e5194bd2..55932be1fb 100644
--- a/build.cmd
+++ b/build.cmd
@@ -35,6 +35,7 @@ if /i "%1" == "arm64" (set __BuildArch=arm64&&shift&goto Arg_Loop)
if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop)
if /i "%1" == "release" (set __BuildType=Release&shift&goto Arg_Loop)
+if /i "%1" == "checked" (set __BuildType=Checked&shift&goto Arg_Loop)
if /i "%1" == "clean" (set __CleanBuild=1&shift&goto Arg_Loop)
@@ -292,7 +293,7 @@ echo Usage:
echo %0 BuildArch BuildType [clean] [vsversion] where:
echo.
echo BuildArch can be: x64, x86, arm64
-echo BuildType can be: Debug, Release
+echo BuildType can be: Debug, Release, Checked
echo Clean - optional argument to force a clean build.
echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2015)
echo windowsmscorlib - Build mscorlib for Windows
diff --git a/build.sh b/build.sh
index 2141ffb168..5f9b4cc7be 100755
--- a/build.sh
+++ b/build.sh
@@ -4,7 +4,7 @@ usage()
{
echo "Usage: $0 [BuildArch] [BuildType] [clean] [verbose] [coverage] [cross] [clangx.y] [ninja] [skipcoreclr] [skipmscorlib] [skiptests]"
echo "BuildArch can be: x64, x86, arm, arm64"
- echo "BuildType can be: Debug, Release"
+ echo "BuildType can be: Debug, Checked, Release"
echo "clean - optional argument to force a clean build."
echo "verbose - optional argument to enable verbose build output."
echo "coverage - optional argument to enable code coverage build (currently supported only for Linux and OSX)."
@@ -181,7 +181,7 @@ echo "Commencing CoreCLR Repo build"
# Argument types supported by this script:
#
# Build architecture - valid values are: x64, ARM.
-# Build Type - valid values are: Debug, Release
+# Build Type - valid values are: Debug, Checked, Release
#
# Set the default arguments for build
@@ -296,6 +296,9 @@ for i in "$@"
debug)
__BuildType=Debug
;;
+ checked)
+ __BuildType=Checked
+ ;;
release)
__BuildType=Release
;;
diff --git a/clr.props b/clr.props
index 707d1cc3e5..03d11c3d8b 100644
--- a/clr.props
+++ b/clr.props
@@ -185,7 +185,6 @@
</PropertyGroup>
<PropertyGroup Condition="'$(_BUILDOPT)' == 'no opt'">
- <CDefines>$(CDefines);WRITE_BARRIER_CHECK=1</CDefines>
<Optimize>false</Optimize>
</PropertyGroup>
</When>
diff --git a/dir.props b/dir.props
index e61e23f4ca..b21f7545d8 100644
--- a/dir.props
+++ b/dir.props
@@ -32,7 +32,8 @@
<BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
<BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
<BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
-
+ <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
+
<BuildOS>$(__BuildOS)</BuildOS>
<BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
diff --git a/src/mscorlib/mscorlib.csproj b/src/mscorlib/mscorlib.csproj
index a41f7b079e..423a4e48f8 100644
--- a/src/mscorlib/mscorlib.csproj
+++ b/src/mscorlib/mscorlib.csproj
@@ -66,7 +66,7 @@
</PropertyGroup>
<!-- Configuration specific properties -->
- <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
+ <PropertyGroup Condition="'$(Configuration)' == 'Debug' or '$(Configuration)' == 'Checked'">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineConstants>DBG;_DEBUG;_LOGGING;DEBUG;TRACE;$(DefineConstants)</DefineConstants>
@@ -125,6 +125,7 @@
<!-- These are needed by BCLRewriter -->
<_BuildType Condition="'$(Configuration)' == 'Debug'">chk</_BuildType>
+ <_BuildType Condition="'$(Configuration)' == 'Checked'">chk</_BuildType>
<_BuildType Condition="'$(Configuration)' == 'Release'">ret</_BuildType>
<!-- These are needed to make sure we have the right set of defines -->
diff --git a/src/pal/tools/clang-compiler-override.txt b/src/pal/tools/clang-compiler-override.txt
index 7d99902be5..349bd07209 100644
--- a/src/pal/tools/clang-compiler-override.txt
+++ b/src/pal/tools/clang-compiler-override.txt
@@ -1,14 +1,17 @@
SET (CMAKE_C_FLAGS_INIT "-Wall -std=c11")
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g -O0")
+SET (CMAKE_C_FLAGS_CHECKED_INIT "-g -O1")
SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g")
SET (CMAKE_CXX_FLAGS_INIT "-Wall -Wno-null-conversion -std=c++11")
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g -O0")
+SET (CMAKE_CXX_FLAGS_CHECKED_INIT "-g -O1")
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2")
-SET (CLR_DEFINES_DEBUG_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1 WRITE_BARRIER_CHECK=1)
+SET (CLR_DEFINES_DEBUG_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1)
+SET (CLR_DEFINES_CHECKED_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1)
SET (CLR_DEFINES_RELEASE_INIT NDEBUG URTBLDENV_FRIENDLY=Retail)
SET (CLR_DEFINES_RELWITHDEBINFO_INIT NDEBUG URTBLDENV_FRIENDLY=Retail)
diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh
index 326b01c353..ea8194fc1f 100755
--- a/src/pal/tools/gen-buildsys-clang.sh
+++ b/src/pal/tools/gen-buildsys-clang.sh
@@ -43,8 +43,8 @@ generator="Unix Makefiles"
for i in "${@:5}"; do
upperI="$(echo $i | awk '{print toupper($0)}')"
case $upperI in
- # Possible build types are DEBUG, RELEASE, RELWITHDEBINFO, MINSIZEREL.
- DEBUG | RELEASE | RELWITHDEBINFO | MINSIZEREL)
+ # Possible build types are DEBUG, CHECKED, RELEASE, RELWITHDEBINFO, MINSIZEREL.
+ DEBUG | CHECKED | RELEASE | RELWITHDEBINFO | MINSIZEREL)
buildtype=$upperI
;;
COVERAGE)
diff --git a/src/pal/tools/windows-compiler-override.txt b/src/pal/tools/windows-compiler-override.txt
index 071f3043e2..f76601bc49 100644
--- a/src/pal/tools/windows-compiler-override.txt
+++ b/src/pal/tools/windows-compiler-override.txt
@@ -1,16 +1,17 @@
SET (CMAKE_C_FLAGS_INIT "/Wall /FC")
SET (CMAKE_C_FLAGS_DEBUG_INIT "/Od /Zi")
+SET (CMAKE_C_FLAGS_CHECKED_INIT "/O1 /Zi")
SET (CMAKE_C_FLAGS_RELEASE_INIT "/Ox")
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/O2 /Zi")
SET (CMAKE_CXX_FLAGS_INIT "/Wall /FC")
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/Od /Zi")
+SET (CMAKE_CXX_FLAGS_CHECKED_INIT "/O1 /Zi")
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/Ox")
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/O2 /Zi")
-SET (CLR_DEFINES_DEBUG_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1 WRITE_BARRIER_CHECK=1)
+SET (CLR_DEFINES_DEBUG_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1)
+SET (CLR_DEFINES_CHECKED_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1)
SET (CLR_DEFINES_RELEASE_INIT NDEBUG URTBLDENV_FRIENDLY=Retail)
SET (CLR_DEFINES_RELWITHDEBINFO_INIT NDEBUG URTBLDENV_FRIENDLY=Retail)
SET (CMAKE_INSTALL_PREFIX $ENV{__CMakeBinDir})
-
-
diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt
index 9e9dd68a07..e6238ed56f 100644
--- a/src/vm/CMakeLists.txt
+++ b/src/vm/CMakeLists.txt
@@ -39,6 +39,16 @@ add_definitions(-D_UNICODE)
# Add the Merge flag here is needed
add_definitions(-DFEATURE_MERGE_JIT_AND_ENGINE)
+if(CMAKE_CONFIGURATION_TYPES) # multi-configuration generator?
+ foreach (Config DEBUG CHECKED)
+ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:${Config}>:WRITE_BARRIER_CHECK=1>)
+ endforeach (Config)
+else()
+ if(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
+ add_definitions(-DWRITE_BARRIER_CHECK=1)
+ endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL DEBUG OR UPPERCASE_CMAKE_BUILD_TYPE STREQUAL CHECKED)
+endif(CMAKE_CONFIGURATION_TYPES)
+
if(CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-fPIC)
endif(CLR_CMAKE_PLATFORM_UNIX)
diff --git a/src/vm/gchelpers.cpp b/src/vm/gchelpers.cpp
index d7a1cacefe..8f9315a12c 100644
--- a/src/vm/gchelpers.cpp
+++ b/src/vm/gchelpers.cpp
@@ -1314,7 +1314,7 @@ void ErectWriteBarrierForMT(MethodTable **dst, MethodTable *ref)
*dst = ref;
-#ifdef _DEBUG
+#ifdef WRITE_BARRIER_CHECK
updateGCShadow((Object **)dst, (Object *)ref); // support debugging write barrier, updateGCShadow only cares that these are pointers
#endif
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 2021fd1add..c45f42431c 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,14 @@
# Require at least version 2.8.12 of CMake
cmake_minimum_required(VERSION 2.8.12)
+if (CMAKE_CONFIGURATION_TYPES) # multi-configuration generator?
+ set(CMAKE_CONFIGURATION_TYPES "Debug;Checked;Release;RelWithDebInfo" CACHE STRING "" FORCE)
+endif (CMAKE_CONFIGURATION_TYPES)
+set(CMAKE_C_FLAGS_CHECKED "")
+set(CMAKE_CXX_FLAGS_CHECKED "")
+set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
+set(CMAKE_SHARED_LINKER_FLAGS_CHECKED "")
+
set(INC_PLATFORM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/Common/Platform)
if (WIN32)
add_definitions(-DWINDOWS=1)
diff --git a/tests/buildtest.cmd b/tests/buildtest.cmd
index 795d287eb6..08bedebe5a 100644
--- a/tests/buildtest.cmd
+++ b/tests/buildtest.cmd
@@ -25,6 +25,7 @@ if /i "%1" == "x64" (set __BuildArch=x64&shift&goto Arg_Loop)
if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop)
if /i "%1" == "release" (set __BuildType=Release&shift&goto Arg_Loop)
+if /i "%1" == "checked" (set __BuildType=Checked&shift&goto Arg_Loop)
if /i "%1" == "clean" (set __CleanBuild=1&shift&goto Arg_Loop)
@@ -161,7 +162,6 @@ setlocal
call "!VS%__VSProductVersion%COMNTOOLS!\VsDevCmd.bat"
if not defined VSINSTALLDIR echo Error: build.cmd should be run from a Visual Studio Command Prompt. Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions. && exit /b 1
-
:BuildTests
echo Starting the Managed Tests Build
@@ -215,7 +215,7 @@ echo Usage:
echo %0 BuildArch BuildType [clean] [vsversion] [crossgen] [priority N] [verbose] where:
echo.
echo BuildArch can be: x64
-echo BuildType can be: Debug, Release
+echo BuildType can be: Debug, Release, Checked
echo Clean - optional argument to force a clean build.
echo VSVersion - optional argument to use VS2013 or VS2015 (default VS2015)
echo CrossGen - Enables the tests to run crossgen on the test executables before executing them.
diff --git a/tests/runtest.cmd b/tests/runtest.cmd
index 7414e46193..0f92eb25b3 100644
--- a/tests/runtest.cmd
+++ b/tests/runtest.cmd
@@ -18,6 +18,7 @@ if /i "%1" == "x86" (set __BuildArch=x86&set __MSBuildBuildArch=x86&shift&got
if /i "%1" == "debug" (set __BuildType=debug&shift&goto Arg_Loop)
if /i "%1" == "release" (set __BuildType=release&shift&goto Arg_Loop)
+if /i "%1" == "checked" (set __BuildType=checked&shift&goto Arg_Loop)
if /i "%1" == "SkipWrapperGeneration" (set __SkipWrapperGeneration=true&shift&goto Arg_Loop)
if /i "%1" == "Exclude" (set __Exclude=%2&shift&shift&goto Arg_Loop)
if /i "%1" == "Exclude0" (set __Exclude0=%2&shift&shift&goto Arg_Loop)
@@ -153,7 +154,7 @@ echo Usage:
echo %0 BuildArch BuildType [SkipWrapperGeneration] [Exclude EXCLUSION_TARGETS] [TestEnv TEST_ENV_SCRIPT] [vsversion] CORE_ROOT where:
echo.
echo BuildArch is x64, x86
-echo BuildType can be: Debug, Release
+echo BuildType can be: Debug, Release, Checked
echo SkipWrapperGeneration- Optional parameter - this will run the same set of tests as the last time it was run
echo Exclude0- Optional parameter - specify location of default exclusion file (defaults to issues.targets if not specified)
echo Set to "" to disable default exclusion file.
diff --git a/tests/src/dir.common.props b/tests/src/dir.common.props
index 4f332e41d4..a04f439244 100644
--- a/tests/src/dir.common.props
+++ b/tests/src/dir.common.props
@@ -26,6 +26,12 @@
<DebugType Condition="'$(DebugType)' == ''">pdbonly</DebugType>
<DefineConstants>$(DefineConstants);TRACE</DefineConstants>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)' == 'Checked'">
+ <DebugSymbols Condition="'$(DebugSymbols)' == ''">true</DebugSymbols>
+ <Optimize Condition="'$(Optimize)' == ''">true</Optimize>
+ <DebugType Condition="'$(DebugType)' == ''">full</DebugType>
+ <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
+ </PropertyGroup>
<!-- Setup the default output and intermediate paths -->
<PropertyGroup>