Page MenuHomePhabricator

[CMake] Allow custom extensions for externalized debug info
ClosedPublic

Authored by sgraenitz on Apr 18 2019, 4:19 AM.

Details

Summary

Extra flexibility for emitting debug info to external files (remains Darwin only for now).
LLDB needs this functionality to emit a LLDB.framework.dSYM instead of LLDB.dSYM when building the framework, because the latter could conflict with the driver's lldb.dSYM when emitted in the same directory on case-insensitive file systems.

Diff Detail

Repository
rL LLVM

Event Timeline

sgraenitz created this revision.Apr 18 2019, 4:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2019, 4:19 AM
friss accepted this revision.Apr 18 2019, 7:44 AM

LGTM

This revision is now accepted and ready to land.Apr 18 2019, 7:44 AM
friss requested changes to this revision.Apr 18 2019, 8:14 AM

Actually, thinking more about this, how do you use it? LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION is a global but this would be different per target.

This revision now requires changes to proceed.Apr 18 2019, 8:14 AM

Actually, thinking more about this, how do you use it? LLVM_EXTERNALIZE_DEBUGINFO_EXTENSION is a global but this would be different per target.

It can be set in the scope of the add_lldb_library call as in the matching LLDB patch https://reviews.llvm.org/D60863

friss accepted this revision.Apr 18 2019, 9:11 AM

Interesting. Cmake scoping rules are still a mystery to me. So when you `set(FOO ...), it's set only for the current scope and in any functions/macros you call in that scope? Then this seems like an ok solution.

This revision is now accepted and ready to land.Apr 18 2019, 9:11 AM

Yes, scopes are per directory; macros operate on the caller's scope and functions add one.

Closed by commit rL358685: [CMake] Allow custom extensions for externalized debug info (authored by stefan.graenitz, committed by ). · Explain WhyApr 18 2019, 9:35 AM
This revision was automatically updated to reflect the committed changes.