pass options to clang in running unittests?


I'd like to run unit tests of clang under the CLANG/unittest directory by using "make check-all" command with additional options which I added into clang. How should I do it?

For example, on a single command line, I run clang with "clang -myoption". Now I want to add '-myoption' into the list of arguments that clang accepts when I run "make check-all".

Thanks very much,

Alright, I've finally figured it out after tracing the execution of test cases. The simplest way is to insert '-myoption' after -cc1 on line 202 containing 'config.substitutions.append...'.

For people who are curious about it, the actual clang command and its arguments are written into a *.script file in the Output directory and executed as bash scripts in lit.