Page MenuHomePhabricator

Add cmake option to choose whether to use the builtin demangler
ClosedPublic

Authored by labath on Aug 24 2016, 3:54 AM.

Details

Summary

Previously the builting demangler was on for platforms that explicitly set a flag by modifying
Mangled.cpp (windows, freebsd). The Xcode build always used builtin demangler by passing a
compiler flag. This adds a cmake flag (defaulting to ON) to configure the demangling library used
at build time. The flag is only available on non-windows platforms as there the system demangler
is not present (in the form we're trying to use it, at least).
The impact of this change is:

  • linux: switches to the builtin demangler
  • freebsd, windows: NFC (I hope)
  • netbsd: switches to the builtin demangler
  • osx cmake build: switches to the builtin demangler (matching the XCode build)

The main motivation for this is the cross-platform case, where it should bring more consistency
by removing the dependency on the host demangler (which can be completely unrelated to the debug
target).

Diff Detail

Repository
rL LLVM

Event Timeline

labath updated this revision to Diff 69093.Aug 24 2016, 3:54 AM
labath retitled this revision from to Add cmake option to choose whether to use the builtin demangler.
labath updated this object.
labath added reviewers: zturner, emaste, krytarowski.
labath added subscribers: lldb-commits, clayborg.

@krytarowski: I thought I'd switch netbsd as well, as all the other platforms are doing it already. However, if you want to stick with the system demangler by default, I can easily change it to OFF ...

Looks good to me.

krytarowski edited edge metadata.Aug 24 2016, 11:26 AM

@krytarowski: I thought I'd switch netbsd as well, as all the other platforms are doing it already. However, if you want to stick with the system demangler by default, I can easily change it to OFF ...

Thanks, I need to take a closer look at it.

Looks OK for NetBSD. @joerg are you fine with this?

joerg accepted this revision.Aug 25 2016, 10:43 AM
joerg added a reviewer: joerg.

LGTM

This revision is now accepted and ready to land.Aug 25 2016, 10:43 AM
This revision was automatically updated to reflect the committed changes.