[cfe-dev] Compiler arguments for clang_parseTranslationUnit
Stefan Seefeld
seefeld at sympatico.ca
Tue Feb 15 14:30:44 PST 2011
On 2011-02-15 17:11, Douglas Gregor wrote:
>
> However, you'll likely need to use -nostdinc/-nostdinc++ and a bunch of -isystem options to teach Clang to look in the right include directories.
I see, thanks. How are the built-in macros determined that clang defines
? Can I disable them with something similar to -nostdinc ?
The current Synopsis logic allows users to specify a compiler to emulate.
If this is a GCC variant, I query the compiler itself for macros and
headers (via `g++ -E -v -dD ...`)
If it is a MSVC compiler, I use hardcoded sets of flags.
This logic requires that the parser then doesn't add its own set of
macros, as those may actually conflict with what I feed in from the above.
Thanks,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the cfe-dev
mailing list