This is an archive of the discontinued LLVM Phabricator instance.

Generate PDB files for profiling even in Release build
ClosedPublic

Authored by takuto.ikuta on Jan 28 2018, 10:07 PM.

Details

Summary

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.

Diff Detail

Event Timeline

takuto.ikuta created this revision.Jan 28 2018, 10:07 PM
takuto.ikuta edited the summary of this revision. (Show Details)Jan 28 2018, 10:09 PM
takuto.ikuta added reviewers: ruiu, zturner.
takuto.ikuta retitled this revision from Add LLVM_ENABLE_PDB option for profile in Release build to Generate PDB files for profiling even in Release build.
zturner accepted this revision.Jan 29 2018, 10:59 AM

True, link time would probably be affected. But I think if anyone is concerned about this, they can add -DLLVM_DISABLE_PDB. Having it generate a PDB should be the default IMO.

This revision is now accepted and ready to land.Jan 29 2018, 10:59 AM

Thanks. Could you merge this patch instead of me? I don't have permission.

This revision was automatically updated to reflect the committed changes.

I don't see LLVM_DISABLE_PDB option being added anywhere, was it accidentally omitted in this patch?

I want to avoid producing .pdb as I have to fit building LLVM under 1 hour due to CI limitation and it already takes 53 minutes without producing .pdb.

thakis added a subscriber: thakis.Feb 8 2018, 6:46 AM
thakis added inline comments.
llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
359 ↗(On Diff #133269)

Doesn't /DEBUG disable /OPT:REF and /OPT:ICF by default? I think you probably want "/DEBUG /OPT:REF /OPT:ICF" instead of just "/DEBUG".