With GCC one is able to print out the specific flags that -march=native
triggers. Is it possible to have Clang print similar information?
Asked
Active
Viewed 9,886 times
21

Community
- 1
- 1

Christopher Johnson
- 655
- 4
- 9
1 Answers
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