Add cmake option to choose whether to use the builtin demangler
authorPavel Labath <labath@google.com>
Fri, 26 Aug 2016 09:47:58 +0000 (09:47 +0000)
committerPavel Labath <labath@google.com>
Fri, 26 Aug 2016 09:47:58 +0000 (09:47 +0000)
commit0e947eb636af23cfcb1791c1e2ff457da82c1c68
tree91bcae14496ca25b792734e7423b72e389d77fa7
parentea877d40b45ae3f77ceaa517ee8f878be45543bc
Add cmake option to choose whether to use the builtin demangler

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).

Reviewers: zturner, emaste, krytarowski

Subscribers: emaste, clayborg, lldb-commits

Differential Revision: https://reviews.llvm.org/D23830

llvm-svn: 279808
lldb/cmake/modules/LLDBConfig.cmake
lldb/source/Core/Mangled.cpp