[cfe-commits] [PATCH] [clang] add --supported-targets option for clang
Argyrios Kyrtzidis
akyrtzi at gmail.com
Fri Jan 4 12:19:52 PST 2013
On Jan 4, 2013, at 11:41 AM, John McCall <rjmccall at apple.com> wrote:
> On Dec 20, 2012, at 11:25 PM, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
>> Add a new driver-only option `--supported-targets` which enumerates the supported targets to stdout. This is an often requested feature, allowing for a quick inspection of supported target architectures supported by a particular build of clang.
>
> Is this for users or scripts?
>
> For users, it would be better to squeeze this into some existing help/version option, like clang -v or clang --help. Unfortunately, I think the format of clang -v might be tightly constrained by existing scripts to follow GCC's lead, which is why we have nonsense things like a threading model in there.
There is also clang -cc1 -version:
$ clang -cc1 -version
LLVM (http://llvm.org/):
LLVM version 3.3svn
DEBUG build with assertions.
Built Jan 2 2013 (11:20:15).
Default target: x86_64-apple-darwin12.2.0
Host CPU: corei7
Can't we just extend it like llc ? :
$ llc -version
LLVM (http://llvm.org/):
LLVM version 3.3svn
DEBUG build with assertions.
Built Jan 2 2013 (11:20:15).
Default target: x86_64-apple-darwin12.2.0
Host CPU: corei7
Registered Targets:
arm - ARM
thumb - Thumb
x86 - 32-bit X86: Pentium-Pro and above
x86-64 - 64-bit X86: EM64T and AMD64
>
> For scripts, rather than making a new top-level option (unless there's precedent for this one in particular), it would be better to introduce a general querying option and just make this the first parameter for it. e.g.
> clang --show targets
>
> John.
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list