[cfe-dev] Standalone tools
kim.grasman at gmail.com
Fri Aug 1 00:36:56 PDT 2014
On Mon, Apr 28, 2014 at 6:55 PM, Manuel Klimek <klimek at google.com> wrote:
> On Mon, Apr 28, 2014 at 9:51 AM, Olivier Goffart <ogoffart at kde.org> wrote:
>> 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
>> 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:
> Btw, this is how we do it when we have tools that must run without a file
For reference, I tried to replicate Olivier's setup a while back and failed
miserably with MSVC.
The builtin string literals get too large -- MSVC appears to have a limit
of 64K -- so the generated header becomes invalid. :-/
For MSVC, I'd probably have to consider generating resource files, but then
the wiring becomes entirely different and much more convoluted. I'll save
it for a rainy day.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev