About the “unsupported argumnet” Error in developping with clang

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.

Thanks a lot!
在 2011-11-03 23:27:04,“John Criswell” criswell@illinois.edu 写道: