[cfe-dev] Passing command line options to LLVM only?

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Dec 17 11:36:40 PST 2012


On 6 November 2012 14:57, Sharlet, Dillon <dillon.sharlet at intel.com> wrote:
> Hey All,
>
> This is a bit of a dumb question but I'm struggling to figure out how to pass a command line option to LLVM only. The closest thing I've found is '-mllvm <option>' which does set the option correctly, however, this appears to also pass the option to the assembler, which throws me an error that my option is unrecognized.
>
> How can I pass a command line option from the clang driver such that it is *only* given to LLVM?

I cannot reproduce the problem. Running

clang -### -c -save-temps test.c -Xclang -mllvm -Xclang -mfoo -no-integrated-as

shows -mfoo being passed to "clang -cc1", but not to the assembler. Do
open a bug if you have a case where it is being passed.

> Thanks!
> Dillon

Cheers,
Rafael




More information about the cfe-dev mailing list