Using Clang 16.0 or later, I would like to know what values could be used for the -march
argument.
The command clang --print-supported-cpus
shows for -mcpu=
, but I see no alternative for -march
.
I could check the LLVM code as well, but I want to know only related to my pre-built version of Clang.
What command could I use to obtain such information?
Using Clang 16.0 or later, I would like to know what values could be used for the -march
argument.
The command clang --print-supported-cpus
shows for -mcpu=
, but I see no alternative for -march
.
I could check the LLVM code as well, but I want to know only related to my pre-built version of Clang.
What command could I use to obtain such information?
Share Improve this question asked Mar 11 at 13:54 uilianriesuilianries 3,89920 silver badges31 bronze badges 1 |1 Answer
Reset to default 1On clang v18 and newer, there is now --print-supported-extensions
flag -
Docs: https://releases.llvm./18.1.8/tools/clang/docs/ClangCommandLineReference.html#cmdoption-clang-print-supported-extensions
$ clang --print-targets
Registered Targets:
aarch64 - AArch64 (little endian)
aarch64_32 - AArch64 (little endian ILP32)
aarch64_be - AArch64 (big endian)
...
$ clang --target=aarch64 --print-supported-extensions
Homebrew clang version 19.1.7
Target: aarch64
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/19.1.7_1/bin
All available -march extensions for AArch64
Name Architecture Feature(s) Description
aes FEAT_AES, FEAT_PMULL Enable AES support
b16b16 FEAT_SVE_B16B16 Enable SVE2.1 or SME2.1 non-widening BFloat16 to BFloat16 instructions
bf16 FEAT_BF16 Enable BFloat16 Extension
...
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744790459a4593882.html
For a list of available architectures for the target use ‘-mcpu=help’
– blurfus Commented Mar 11 at 14:02