diff options
| author | Sean Callanan <scallanan@apple.com> | 2014-12-05 01:15:04 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2014-12-05 01:15:04 +0000 |
| commit | b1e1c62fac12bf5c48b57d5e90d65bf1e48170b7 (patch) | |
| tree | 22430c5c4cb147aef6a05464f1c4836c273a109a /lldb/source/Host/macosx | |
| parent | 0e2618857c81ab37cdfacdc407620449a17f12ef (diff) | |
| download | bcm5719-llvm-b1e1c62fac12bf5c48b57d5e90d65bf1e48170b7.tar.gz bcm5719-llvm-b1e1c62fac12bf5c48b57d5e90d65bf1e48170b7.zip | |
Add support for embedding Clang compiler headers
like tgmath.h and stdarg.h into the LLDB installation,
and then finding them through the Host infrastructure.
Also add a script to actually do this on Mac OS X.
llvm-svn: 223430
Diffstat (limited to 'lldb/source/Host/macosx')
| -rw-r--r-- | lldb/source/Host/macosx/HostInfoMacOSX.mm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/source/Host/macosx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/HostInfoMacOSX.mm index a6a65531454..a22674e63aa 100644 --- a/lldb/source/Host/macosx/HostInfoMacOSX.mm +++ b/lldb/source/Host/macosx/HostInfoMacOSX.mm @@ -208,6 +208,26 @@ HostInfoMacOSX::ComputePythonDirectory(FileSpec &file_spec) } bool +HostInfoMacOSX::ComputeClangDirectory(FileSpec &file_spec) +{ + FileSpec lldb_file_spec; + if (!GetLLDBPath (lldb::ePathTypeLLDBShlibDir, lldb_file_spec)) + return false; + + char raw_path[PATH_MAX]; + lldb_file_spec.GetPath (raw_path, sizeof (raw_path)); + + char *framework_pos = ::strstr (raw_path, "LLDB.framework"); + if (framework_pos) + { + framework_pos += strlen("LLDB.framework"); + ::strncpy (framework_pos, "/Resources/Clang", PATH_MAX - (framework_pos - raw_path)); + } + file_spec.SetFile (raw_path, true); + return true; +} + +bool HostInfoMacOSX::ComputeSystemPluginsDirectory(FileSpec &file_spec) { FileSpec lldb_file_spec; |

