[cfe-dev] notes without warnings and a question to -cc1

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Mon Mar 28 01:18:09 PDT 2011


Hi,

Am 25.03.2011 20:16, schrieb Argyrios Kyrtzidis:
>> CompilerInvocation::CreateFromArgs(...);
>>
>> to get a compiler invocation.
>> But CreateFromArgs uses the cc1 option table hard-coded and thus I can't
>> pass options like "-msse2" to the compiler. This in turn forbids the
>> handling of files which includes<xmmintrin.h>  and similiar headers.
>> Is there a reason for using the cc1 option table there and is it
>> possible to change it so that it is optionally possible to use the
>> driver option table instead?
>
> If you look into ASTUnit::LoadFromCommandLine you can find code to get a CompilerInvocation out of driver options.
> This code should be factored out into its own function like a static driver::Compilation::createInvocationFromArgs.
Hmm, the code there filters out the driver options but I can't find the 
part where these filtered-out options are reinjected in the 
CompilerInvocation.
Generally speaking I don't get the point of the stripped down cc1 option 
list. Judging from the mails here I guess these are the options 
sufficiently for parsing a C file. However then something like "-msse2" 
(or something similiar if you want to emanzipate from gcc) is clearly 
missing, because some files are not parseable without that options.

Best regards
Olaf Krzikalla



More information about the cfe-dev mailing list