enable/disable features through clang

Is there a way to enable/disable target features through clang?

I found this, https://github.com/avr-llvm/llvm/issues/9, but this seems to be talking about llc -mattr=+feature1,-feature2…

Is there something equivalent for clang?

Have you tried using clang --help-hidden to print all of its options? There might be a -mllvm - option that will do what you want. Regards, John Criswell

You should pipe through command line options that you want via the driver. Take a look at pretty much every other target for a guideline on how to do this.

-mllvm -mattr=… is not for production use and you shouldn’t do this.

-eric

You should pipe through command line options that you want via the driver.

I'm not sure what you mean by "pipe through". Do you mind explaining it?

I’m pretty sure I’ve answered you on this before, but basically look at how the x86 target handles sse, or avx. Or how ppc handles vsx.

-eric