[cfe-commits] [PATCH] [clang] add --supported-targets option for clang

Saleem Abdulrasool compnerd at compnerd.org
Sat Jan 5 09:55:43 PST 2013


On Fri, 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.

I can definitely move this to clang --help for users.

> 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

I think that this could be useful for scripts as well.  Introducing a
top-level option `show' which takes parameters sounds reasonable.

I will go ahead and rework the patch and resend an updated version later.

> John.

--
Saleem Abdulrasool
compnerd (at) compnerd (dot) org




More information about the cfe-commits mailing list