[Lldb-commits] [PATCH] D47625: [cmake] Detect presence of wide-char libedit at build time

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu Feb 28 08:12:01 PST 2019

On 28/02/2019 16:18, Pavel Labath via lldb-commits wrote:
> On 28/02/2019 02:37, Davide Italiano via Phabricator wrote:
>> davide added a comment.
>> Herald added a subscriber: jdoerfert.
>> Herald added a project: LLVM.
>> Pavel, this broke unicode handling for lldb on MacOS. If you type 
>> something in the lldb cmdline, it won't print the right character but 
>> a series of unicode sequences.
>> The main concern is that this also breaks the Swift REPL (powered by 
>> lldb).
>> Looks like something like this:
>>    $ git diff
>>    diff --git a/lldb/include/lldb/Host/Editline.h 
>> b/lldb/include/lldb/Host/Editline.h
>>    index cb40f1e6917..e53991c450f 100644
>>    --- a/lldb/include/lldb/Host/Editline.h
>>    +++ b/lldb/include/lldb/Host/Editline.h
>>    @@ -51,6 +51,7 @@
>>     #include <string>
>>     #include <vector>
>>    +#include "lldb/Host/Config.h"
>>     #include "lldb/Host/ConnectionFileDescriptor.h"
>>     #include "lldb/Host/Predicate.h"
>>     #include "lldb/Utility/FileSpec.h"
>> "fixes" the CMake build. I'm seeing failures if I apply the same patch 
>> to the Xcode project.
> Have you tried putting the `#include "lldb/Host/Config.h"` at the top of 
> Editline.h, so that LLDB_EDITLINE_USE_WCHAR is defined before the
> ```
> #include <codecvt>
> #endif
> ```
> block ?

Ok, I've done some more experiments, and I'm pretty sure this will fix 
things. I didn't commit that yet because I found that this breaks the 
modules build. I am not sure why is that, but I suspect this is because 
we don't have a modulemap file for the lldb/Host/Config.h file. I am not 
sure if I'll have time to fix that today.


More information about the lldb-commits mailing list