[PATCH] D43156: Allow disabling PDB generation in Release build
Loo Rong Jie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 10 18:20:53 PST 2018
rongjiecomputer 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()
----------------
takuto.ikuta wrote:
> 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.
But won't that penalize everyone with bigger binary size (due to less folding) if they do not know `LLVM_ENABLE_PDB` flag exists?
https://reviews.llvm.org/D43156
More information about the llvm-commits
mailing list