From 11260f73d2ce7f66760ac11eeab289a070864ca7 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Tue, 1 Mar 2016 09:26:07 -0800 Subject: [PATCH] Enable source/line info on "release" builds The symbol info will be stripped and put into a separate *-dbg by dotnet cli (soon). Commit migrated from https://github.com/dotnet/coreclr/commit/1e86aaad7f673261553895f58f5bad461b06c720 --- src/coreclr/src/pal/CMakeLists.txt | 1 - src/coreclr/src/pal/tools/clang-compiler-override.txt | 8 ++++---- src/coreclr/src/pal/tools/windows-compiler-override.txt | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/coreclr/src/pal/CMakeLists.txt b/src/coreclr/src/pal/CMakeLists.txt index 619c74f..5d9ce4e 100644 --- a/src/coreclr/src/pal/CMakeLists.txt +++ b/src/coreclr/src/pal/CMakeLists.txt @@ -6,7 +6,6 @@ include_directories(${COREPAL_SOURCE_DIR}/inc) include_directories(${COREPAL_SOURCE_DIR}/src) include_directories(${COREPAL_SOURCE_DIR}/../inc) -add_compile_options(-gdwarf-3) add_compile_options(-fexceptions) add_subdirectory(src) diff --git a/src/coreclr/src/pal/tools/clang-compiler-override.txt b/src/coreclr/src/pal/tools/clang-compiler-override.txt index 35ed330..8bba4a9 100644 --- a/src/coreclr/src/pal/tools/clang-compiler-override.txt +++ b/src/coreclr/src/pal/tools/clang-compiler-override.txt @@ -1,14 +1,14 @@ SET (CMAKE_C_FLAGS_INIT "-Wall -std=c11") SET (CMAKE_C_FLAGS_DEBUG_INIT "-g -O0") SET (CLR_C_FLAGS_CHECKED_INIT "-g -O2") -SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3") -SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") +SET (CMAKE_C_FLAGS_RELEASE_INIT "-g -O3") +SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g -O2") SET (CMAKE_CXX_FLAGS_INIT "-Wall -Wno-null-conversion -std=c++11") SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g -O0") SET (CLR_CXX_FLAGS_CHECKED_INIT "-g -O2") -SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-O3") -SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O2") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-g -O3") +SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-g -O2") 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) diff --git a/src/coreclr/src/pal/tools/windows-compiler-override.txt b/src/coreclr/src/pal/tools/windows-compiler-override.txt index e50697c..7f3c63c 100644 --- a/src/coreclr/src/pal/tools/windows-compiler-override.txt +++ b/src/coreclr/src/pal/tools/windows-compiler-override.txt @@ -1,13 +1,13 @@ SET (CMAKE_C_FLAGS_INIT "/Wall /FC") SET (CMAKE_C_FLAGS_DEBUG_INIT "/Od /Zi") SET (CLR_C_FLAGS_CHECKED_INIT "/O1 /Zi") -SET (CMAKE_C_FLAGS_RELEASE_INIT "/Ox") +SET (CMAKE_C_FLAGS_RELEASE_INIT "/Ox /Zi") SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "/O2 /Zi") SET (CMAKE_CXX_FLAGS_INIT "/Wall /FC") SET (CMAKE_CXX_FLAGS_DEBUG_INIT "/Od /Zi") SET (CLR_CXX_FLAGS_CHECKED_INIT "/O1 /Zi") -SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/Ox") +SET (CMAKE_CXX_FLAGS_RELEASE_INIT "/Ox /Zi") SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "/O2 /Zi") SET (CLR_DEFINES_DEBUG_INIT DEBUG _DEBUG _DBG URTBLDENV_FRIENDLY=Checked BUILDENV_CHECKED=1) -- 2.7.4