summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-02-07 19:37:52 +0000
committerZachary Turner <zturner@google.com>2018-02-07 19:37:52 +0000
commit876dc7124db14425693f1e4927b3a43f6c8e871c (patch)
tree6791d6116ec968aa9e6354411ae7f0dbb2429801
parent1d4546c0ade6e949d2400252a5058fcfefe3c635 (diff)
downloadbcm5719-llvm-876dc7124db14425693f1e4927b3a43f6c8e871c.tar.gz
bcm5719-llvm-876dc7124db14425693f1e4927b3a43f6c8e871c.zip
Generate PDB files for profiling even in Release build.
This patch enables PDB generation for Release build, which has slightly different optimize option with RelWithDebInfo on windows. This helps to know slow part of Release build when profiling. Patch by Takuto Ikuta Differential Revision: https://reviews.llvm.org/D42632 llvm-svn: 324504
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 58347fd1fbb..51d266cdc7c 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -353,6 +353,12 @@ if( MSVC )
append("/Zc:inline" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ # Generate PDB even in release for profiling.
+ if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+ append("/Zi" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+ append("/DEBUG" CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+ endif (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
+
# /Zc:strictStrings is incompatible with VS12's (Visual Studio 2013's)
# debug mode headers. Instead of only enabling them in VS2013's debug mode,
# we'll just enable them for Visual Studio 2015 (VS 14, MSVC_VERSION 1900)
OpenPOWER on IntegriCloud