[lldb-dev] Fixing messed-up include lines

Jean-Daniel Dupas devlists at shadowlab.org
Wed Jun 9 13:41:11 PDT 2010


Le 9 juin 2010 à 20:13, Greg Clayton a écrit :

> 
> On Jun 9, 2010, at 9:43 AM, Jean-Daniel Dupas wrote:
> 
>> 
>> Le 9 juin 2010 à 09:02, Eric Christopher a écrit :
>> 
>>> 
>>> On Jun 9, 2010, at 12:00 AM, Jason Molenda wrote:
>>> 
>>>> 
>>>> On Jun 8, 2010, at 11:56 PM, Jean-Daniel Dupas wrote:
>>>> 
>>>>> 
>>>>> Le 9 juin 2010 à 08:41, Eric Christopher a écrit :
>>>>> 
>>>>>> 
>>>>>> On Jun 8, 2010, at 11:40 PM, Jason Molenda wrote:
>>>>>> 
>>>>>>> Hi Eli,
>>>>>>> 
>>>>>>> This patch is fine.  If it breaks the Xcode build I'll fix it.
>>>>>> 
>>>>>> Looks like Driver.cpp needs the include directory but that's it.
>>>>> 
>>>>> 
>>>>> Yes, as it would be for all projects that would like to use the LLDB framework. This is unfortunate as this is not the way it works with frameworks on OS X :-(
>>>> 
>>>> Yeah, lldb builds an LLDB.framework which probably explains the #include <LLDB/...> pathnames.  We'll see if it still builds with more traditional pathnames Eli checked in.  I'm waiting for the 42MB llvm.zip file to download to my computer right now. :)
>>> 
>>> Yeah, it doesn't :)
>>> 
>>> Since you're looking though I'll let you worry. :)
>> 
>> Just a though, but as the OS X syntax is only useful when working with the framework, one way to workaround this problem may be to add a new "script build step" after the "Copy Headers" step in the Xcode framework target to patch the installed headers.
>> 
>> A sed script like the following one should do the trick:
>> 
>> sed -e 's/\(#include[ ]*\)"lldb\/\(API\/\)\{0,1\}\(.*\)"/\1 <LLDB\/\3>/1' *.h
> 
> Thanks for that Jean-Daniel, I will work this into the Xcode project for the framework build.

Thanks. Just in case, in the previous command, I meant "sed -i '' " not "sed -e".

sed -i '' 's/\(#include[ ]*\)"lldb\/\(API\/\)\{0,1\}\(.*\)"/\1 <LLDB\/\3>/1' "$(TARGET_BUILD_DIR)/$(PUBLIC_HEADERS_FOLDER_PATH)/*.h"

And as I'm not a sed expert, this script may possibly be improved ;-)

-- Jean-Daniel




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20100609/435d6d46/attachment.html>


More information about the lldb-dev mailing list