[PATCH] D33900: Print registered targets in clang's version information

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 24 12:04:43 PDT 2017


dim added a comment.

In https://reviews.llvm.org/D33900#818957, @thakis wrote:

> Sorry, I just noticed this weeks later. Why are we adding this to `--version` instead of adding some new flag for printing this? When I pass `--version`, I'm usually interested in clang's version and don't need a screenful of other information below it (which makes the output I do care about scroll off the screen).


I added it there, for consistency with other LLVM tools, for example:

  $ llc -version
  LLVM (http://llvm.org/):
    LLVM version 5.0.0svn-r308421
    Optimized build with assertions.
    Default target: x86_64-unknown-freebsd12.0
    Host CPU: ivybridge
  
    Registered Targets:
      aarch64    - AArch64 (little endian)
      aarch64_be - AArch64 (big endian)
      arm        - ARM
      arm64      - ARM64 (little endian)
      armeb      - ARM (big endian)
      mips       - Mips
      mips64     - Mips64 [experimental]
      mips64el   - Mips64el [experimental]
      mipsel     - Mipsel
      ppc32      - PowerPC 32
      ppc64      - PowerPC 64
      ppc64le    - PowerPC 64 LE
      sparc      - Sparc
      sparcel    - Sparc LE
      sparcv9    - Sparc V9
      thumb      - Thumb
      thumbeb    - Thumb (big endian)
      x86        - 32-bit X86: Pentium-Pro and above
      x86-64     - 64-bit X86: EM64T and AMD64
  $ llvm-mc -version
  LLVM (http://llvm.org/):
    LLVM version 5.0.0svn-r308421
    Optimized build with assertions.
    Default target: x86_64-unknown-freebsd12.0
    Host CPU: ivybridge
  
    Registered Targets:
      aarch64    - AArch64 (little endian)
      aarch64_be - AArch64 (big endian)
      arm        - ARM
      arm64      - ARM64 (little endian)
      armeb      - ARM (big endian)
      mips       - Mips
      mips64     - Mips64 [experimental]
      mips64el   - Mips64el [experimental]
      mipsel     - Mipsel
      ppc32      - PowerPC 32
      ppc64      - PowerPC 64
      ppc64le    - PowerPC 64 LE
      sparc      - Sparc
      sparcel    - Sparc LE
      sparcv9    - Sparc V9
      thumb      - Thumb
      thumbeb    - Thumb (big endian)
      x86        - 32-bit X86: Pentium-Pro and above
      x86-64     - 64-bit X86: EM64T and AMD64

etc.  I'm fine with a separate flag for clang, but it would be nice if the other LLVM tools used the same flag.


https://reviews.llvm.org/D33900





More information about the cfe-commits mailing list