[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 18:52:11 PST 2018
takuto.ikuta accepted this revision.
takuto.ikuta added a comment.
This revision is now accepted and ready to land.
LGTM, thank you for follow up.
================
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()
----------------
rongjiecomputer wrote:
> 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?
I see. If ICF is problem on profiled result, I'll disable it in my local or introduce another option.
https://reviews.llvm.org/D43156
More information about the llvm-commits
mailing list