[cfe-dev] Compiler arguments for clang_parseTranslationUnit

Douglas Gregor dgregor at apple.com
Tue Feb 15 13:19:20 PST 2011


On Feb 15, 2011, at 1:10 PM, Ehsan Akhgari wrote:

> I think the idea is that you just pass in argc and argv to that function so that your tool can be used as a drop-in replacement for a real compiler.

Yes, this is the intent.

And the best place to look for documentation on the command-line options Clang accepts is... the GCC documentation. Clang doesn't have a user manual describing all of its command-line options :)

	- Doug

> --
> Ehsan
> <http://ehsanakhgari.org/>
> 
> 
> On Tue, Feb 15, 2011 at 3:52 PM, Stefan Seefeld <seefeld at sympatico.ca> wrote:
> Where can I find detailed information about the accepted options for the
> "command_line_args" parameter of the clang_parseTranslationUnit function ?
> 
> In particular, it appears that by default this function picks up flags
> (include search paths, macros) from the system compiler installed on my
> platform (Fedora 14). How can I override that ? For example, may I
> invoke this function to use flags for a non-system compiler ? (I'm in
> particular interested into a variety of cross-compilers I have installed.)
> 
> Also, how can I choose the language and language flags to be used for
> lexing and parsing ("C", "C99", "C++", etc.) ?
> 
> Thanks,
>         Stefan
> 
> --
> 
>       ...ich hab' noch einen Koffer in Berlin...
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110215/41cf5021/attachment.html>


More information about the cfe-dev mailing list