[PATCH] D43156: Allow disabling PDB generation in Release build

Takuto Ikuta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 10 16:41:37 PST 2018


takuto.ikuta added inline comments.


================
Comment at: cmake/modules/HandleLLVMOptions.cmake:360
     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")
+    append("/DEBUG /OPT:REF /OPT:ICF" CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+  endif()
----------------
Can I ask you to change /OPT:NOICF here also, recommended by docs?
https://docs.microsoft.com/en-us/cpp/build/reference/opt-optimizations#arguments
/DEBUG in release build is for profiling, and I want to preserve original function name in stacktrace.


https://reviews.llvm.org/D43156





More information about the llvm-commits mailing list