[cfe-dev] About the “unsupported argumnet” Error in developping with clang

redder_0210 redder_0210 at yeah.net
Thu Nov 3 21:19:14 PDT 2011


Thanks a lot!
-----Redder.
在 2011-11-03 23:27:04,"John Criswell" <criswell at illinois.edu> 写道:
>On 11/2/11 10:34 PM, redder_0210 at yeah.net wrote:
>> Dear All,
>> 	I'm trying to add a command line option to Clang/Clang++.
>>          What I have done is that I have modified the driver of Clang. But the compilation instance(perhaps named clang cc1) of Clang cannot identify the new option. And the console prints the ERROR:" unsupported argumnet".
>>         what's more,  when I have add the new command line argumnet to the "CC1Options.td", the console prints the "ast infomation"(in my opinion) of the source File. I have no idea about the reason.
>>         What should I do to solve the problem now?
>> Thanks in advance.
>>         ------Redder.
>
>When you add a command line argument to Clang, you need to add it to 
>both Clang (the compiler driver) and cc1 (the actual compiler).
>
>Take a look at 
>http://lists.cs.uiuc.edu/pipermail/sva-commits/2011-October/000563.html.  Notice 
>how I had to add options to Options.td and CC1Options.td and how I had 
>to modify lib/Driver/Tools.cpp to propagate the logfile argument from 
>Clang to CC1.
>
>BTW, you should send questions to the Clang Developer's list 
>(http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev) instead of to me 
>personally.  You're more likely to get an answer from people on the list 
>(as they're more expert in clang than I am).
>:)
>
>-- John T.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111104/09e81900/attachment.html>


More information about the cfe-dev mailing list