<div dir="ltr">Hi Felix,<div><br></div><div>The framework search path options (that correspond to -F) are stored in an instance of the HeaderSearchOptions class inside the CompilerInvocationBase class, and you can add an new -F search path using the <span style="color:rgb(0,0,0)">AddPath method.</span></div>
<div class="gmail_extra"><br><div class="gmail_quote">On 12 January 2017 at 07:35, Félix Cloutier via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Hi all,<div><br></div><div>I have code that builds a CompilerInvocation with the Clang static libraries. I would like to tell that invocation to use specific frameworks, just like using the -framework Clang front-end option. In particular, I'm looking for these "side effects" of using a framework:<br><div><ul><li>the compiler locates the framework on the system from its name using the framework search path;</li><li>the compiler knows where to find framework headers identified through a path like <Framework/Header.h>.</li></ul></div>At this point, I think that I've looked everywhere in the option sub-objects of the CompilerInvocation class, <wbr>and the closest thing that I can identify related to that is the header search path. I can't seem to find a way to tell the CompilerInvocation to look for a specific framework.<br><br>How is that supposed to happen? I'm using a manually-built <wbr>CompilerInvocation instead of building it through command-line arguments because that seems to be the only way to pass a memory buffer as a source unit instead of a file.</div></div></blockquote><div><br></div><div>I think you can still use the memory buffer as source even if you create the invocation using command line arguments if you remap the buffer to the filename after creating the invocation (<span style="color:rgb(0,0,0)">addRemappedFile in PreprocessorOptions).</span></div><div><br></div><div><span style="color:rgb(0,0,0)">Alex</span></div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>Thanks!</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>Félix</div></font></span></div><br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>