[cfe-dev] -target or --target

Chandler Carruth chandlerc at google.com
Tue Sep 10 00:51:11 PDT 2013


Sorry for being late to the party...

I wrote up a doc that described the recommended flag spellings and mailed
it out. Renato, I could swear you reviewed it. ;] Anyways, you should be
able to refer to that document for a lot of this information. To sum up:

- Yes, use two-dash flag spellings for "high level" flags that are handled
by the driver and express general intent. This should apply to most cross
compiling flags.
- Yes, specifically '--target=...' would be my preference above '-target
...'.
- And '--sysroot=...' over '-isysroot ...' or '--sysroot ...'

On Tue, Sep 10, 2013 at 12:44 AM, Renato Golin <renato.golin at linaro.org>wrote:

> On 10 September 2013 03:57, Bob Wilson <bob.wilson at apple.com> wrote:
>
>> I personally prefer the two-dash versions of those options.  If we need
>> to continue accepting the single-dash versions for compatibility, that’s
>> fine, but at least it would be nice to only document the two-dash versions.
>>
>
> I've used the two dash versions on the doc.
>

Thanks, that sounds right to me.


>
>
> It’s a bit complicated.  On non-Apple platforms, -isysroot is like
>> —sysroot except that it only applies to the header search paths.  For
>> historical reasons, Apple ended up using -isysroot as the option to select
>> an SDK: it applies to both headers and libraries and does so in a way that
>> is different than —sysroot.  (I don’t remember the exact difference.)  I
>> have no idea what is the best way to document that.
>>
>
> I left it as --sysroot, since --isysroot doesn't behave like --sysroot on
> Linux (the platform of the how-to).
>

I suspect the right thing to do here is to document and recommend
--sysroot. Bob, you can probably make --sysroot do whatever you need it to
do on Apple platforms? It would be nice to have a single, and consistent
system root flag...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130910/0580e65a/attachment.html>


More information about the cfe-dev mailing list