[PATCH] D42632: Generate PDB files for profiling even in Release build

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 11:40:28 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL324504: Generate PDB files for profiling even in Release build. (authored by zturner, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D42632?vs=131811&id=133269#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D42632

Files:
  llvm/trunk/cmake/modules/HandleLLVMOptions.cmake


Index: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
@@ -353,6 +353,12 @@
 
   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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42632.133269.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180207/fd08896e/attachment.bin>


More information about the llvm-commits mailing list