How to know all supported values for clang -march argument? - Stack Overflow

Using Clang 16.0 or later, I would like to know what values could be used for the -march argument.The

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
  • In their documentation (clang.llvm./docs/ClangCommandLineReference.html) it says: For a list of available architectures for the target use ‘-mcpu=help’ – blurfus Commented Mar 11 at 14:02
Add a comment  | 

1 Answer 1

Reset to default 1

On 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

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信