[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    Re: [cfe-dev] Standalone tools
From:       Manuel Klimek <klimek () google ! com>
Date:       2014-04-28 16:55:03
Message-ID: CAOsfVvko86kRN1GcOxwb4qN4rvJmO0Fn+=_yYmyq83sLM1+93A () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Mon, Apr 28, 2014 at 9:51 AM, Olivier Goffart <ogoffart@kde.org> wrote:

> On Sunday 27 April 2014 15:31:53 Dmitri Gribenko wrote:
> > On Sun, Apr 27, 2014 at 3:09 PM, Jacob Carlborg <doob@me.com> wrote:
> > > It would be nice if the header files could be embedded in the tool (the
> > > executable).
> >
> > Now that Clang has a VFS, this should not be hard to implement.
>
> I have been doing that even before clang had a VFS.
>
> The idea is using cmake to put the content of the file in the binary
>
> Using this cmake script
> https://github.com/woboq/moc-ng/blob/master/src/CMakeLists.txt#L57
> and
> https://github.com/woboq/moc-ng/blob/master/src/embedded_includes.h.in
> This puts the file contents into the binary
>
> Then I added a "-I/builtins" to the command line, and used
> ToolInvocation::mapVirtualFile to expose the files:
> http://code.woboq.org/mocng/src/main.cpp.html#354


Btw, this is how we do it when we have tools that must run without a file
system.


>
>
> --
> Olivier
> _______________________________________________
> cfe-dev mailing list
> cfe-dev@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Apr 28, 2014 \
at 9:51 AM, Olivier Goffart <span dir="ltr">&lt;<a href="mailto:ogoffart@kde.org" \
target="_blank">ogoffart@kde.org</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="">On Sunday 27 April 2014 15:31:53 Dmitri \
Gribenko wrote:<br> &gt; On Sun, Apr 27, 2014 at 3:09 PM, Jacob Carlborg &lt;<a \
href="mailto:doob@me.com">doob@me.com</a>&gt; wrote:<br> &gt; &gt; It would be nice \
if the header files could be embedded in the tool (the<br> &gt; &gt; executable).<br>
&gt;<br>
&gt; Now that Clang has a VFS, this should not be hard to implement.<br>
<br>
</div>I have been doing that even before clang had a VFS.<br>
<br>
The idea is using cmake to put the content of the file in the binary<br>
<br>
Using this cmake script<br>
<a href="https://github.com/woboq/moc-ng/blob/master/src/CMakeLists.txt#L57" \
target="_blank">https://github.com/woboq/moc-ng/blob/master/src/CMakeLists.txt#L57</a><br>
 and<br>
<a href="https://github.com/woboq/moc-ng/blob/master/src/embedded_includes.h.in" \
target="_blank">https://github.com/woboq/moc-ng/blob/master/src/embedded_includes.h.in</a><br>
 This puts the file contents into the binary<br>
<br>
Then I added a &quot;-I/builtins&quot; to the command line, and used<br>
ToolInvocation::mapVirtualFile to expose the files:<br>
<a href="http://code.woboq.org/mocng/src/main.cpp.html#354" \
target="_blank">http://code.woboq.org/mocng/src/main.cpp.html#354</a></blockquote><div><br></div><div>Btw, \
this is how we do it when we have tools that must run without a file system.</div> \
<div>  </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"><br> <span class="HOEnZb"><font color="#888888"><br>
--<br>
Olivier<br>
</font></span><div class="HOEnZb"><div \
class="h5">_______________________________________________<br> cfe-dev mailing \
list<br> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" \
target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br> \
</div></div></blockquote></div><br></div></div>



_______________________________________________
cfe-dev mailing list
cfe-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic