summaryrefslogtreecommitdiff
path: root/src/pal
diff options
context:
space:
mode:
authorEugene Rozenfeld <erozen@microsoft.com>2015-12-15 17:40:43 -0800
committerEugene Rozenfeld <erozen@microsoft.com>2015-12-21 15:20:57 -0800
commit3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069 (patch)
tree0510ffcdfef296301d5c9e52a663453f5780afb1 /src/pal
parentea7f6d05953cd1660b07621dac11d4d204d3bbbb (diff)
downloadcoreclr-3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069.tar.gz
coreclr-3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069.tar.bz2
coreclr-3df44ef76ffc7d3c9932eb24e9e1e1d71f02c069.zip
Enable checked builds of CoreCLR.
In checked builds coreclr, mscorlib, and the test are built optimized but assertion checking is on. This adds additional coverage (the jit is optimizing and assertion checking is on), speeds up testing compared to debug, and allows testing JIT stress modes. This doesn't affect CoreFX. Several tests are currently failing in checked configuration due to newly discovered bugs (JIT asserts). We didn't see these asserts in debug mode because by default JIT is in minopt mode; we didn't see these bugs in release mode because assertion checking is off. I will file the bugs once checked build changes are in.
Diffstat (limited to 'src/pal')
-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
3 files changed, 10 insertions, 6 deletions
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 31e83ef029..8bb93f5990 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})
-
-