21

With GCC one is able to print out the specific flags that -march=native triggers. Is it possible to have Clang print similar information?

Community
  • 1
  • 1

1 Answers1

20

Instead of using the (non-existent in clang) -help=target flag, you can use echo | clang -E - -march=native -### to print out the compilation command. While this doesn't list the non-triggered flags and it's not pretty, it does list all the enabled flags.

Avi Ginsburg
  • 10,323
  • 3
  • 29
  • 56