This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO
ClosedPublic

Authored by beanz on Dec 1 2015, 4:23 PM.

Details

Summary

This adds support for generating dSYM files and stripping debug info from executables and dylibs. It also supports passing -object_path_lto to the linker to generate dSYMs for LTO builds.

Diff Detail

Repository
rL LLVM

Event Timeline

beanz updated this revision to Diff 41577.Dec 1 2015, 4:23 PM
beanz retitled this revision from to [CMake] Add option LLVM_EXTERNALIZE_DEBUGINFO.
beanz updated this object.
beanz added reviewers: bogner, friss.
beanz added a subscriber: llvm-commits.
beanz updated this revision to Diff 41660.Dec 2 2015, 1:01 PM

For LTO builds, dsymutil doesn't need to run against the intermediate object, we just need to make sure it sticks around.

friss edited edge metadata.Dec 2 2015, 1:39 PM

From what I understand this looks fine, but I fear that I'm not CMake-savvy enough to approve it.

cmake/modules/AddLLVM.cmake
1183 ↗(On Diff #41660)

I would make that ${name}-lto.o just to make it clear what it is if someone looks at the directory and is concerned about that huge object file.

beanz updated this revision to Diff 41669.Dec 2 2015, 1:41 PM
beanz edited edge metadata.

Updated object name to ${name}-lto.o as per Fred's suggestion.

beanz updated this revision to Diff 41677.Dec 2 2015, 2:11 PM

Updates based on feedback from bogner.

This revision was automatically updated to reflect the committed changes.
jevinskie added a subscriber: jevinskie.