When building on OS X, you tell the compiler what the lowest OS X version
is that you want to support – this is the mac_deployment_target thing Jakob
mentioned. The SDK then makes certain functionality available only as weak
symbols (e.g. if you want to support running all the way back on 10.6, but
some function was introduced in 10.8, then that function is a weak symbol
and you have to make sure you check it to be non-NULL before you call it).
libc++ is the system library, so these weak symbol tricks don't work and
you need to explicitly tell the compiler which C++ standard library to use.
OS X started shipping a system libc++ in parallel to its very old libstdc++
4.2 in OS X 10.7. So if your deployment target is older than 10.7, you
cannot use the system libc++. If your deployment target is 10.9+ (I think),
then the compiler will use libc++ by default. If your deployment target is
10.7 or 10.8 (iirc), you can opt in to libc++ but the default is still
libstdc++.

All the C++11 stuff requires libc++, since Apple stopped updating their
libstdc++ long ago.

For v8, the best recommendation is probably to drop support for 10.5 and
10.6 (and maybe 10.7 and 10.8 too – Chromium is dropping support for
10.6-10.8 in the next release), if you're able to do this.

In Chromium, we jumped through some hoops to link against libc++ and still
target 10.6 for a few releases so we could use C++11 stuff earlier.
https://docs.google.com/document/d/1cFVCLYqpVV0pn2aX09SALcE3BN351sFN_rTcPcHRg3U/edit
documents the approach, and Chromium's build files show how this was
implemented if you want to do that. But easiest is to just up your
deployment target to 10.7 and tell the compiler to use libc++. (To do this,
in gyp add  'CLANG_CXX_LIBRARY': 'libc++' to your xcode_settings block, and
in gn add "-stdlib=libc++" to your cflags_cc and ldflags.)

On Wed, Mar 9, 2016 at 1:16 AM, Jakob Kummerow <[email protected]>
wrote:

> I think what Daniel was referring to is 'mac_deployment_target%': '10.5'
> in standalone.gypi, not the OS version that's actually installed on the
> bots.
>
> Maybe it's time to bump up the deployment target. Traditionally V8 has
> supported older OS versions than Chromium, but lacking tools like UMA it's
> really hard to estimate how important support for any given OS is in
> practice.
>
>
> On Wed, Mar 9, 2016 at 8:37 AM, Michael Achenbach <[email protected]
> > wrote:
>
>> The bots have all version 10.9.5.
>>
>> @Nico, what else would be required? Maybe there's something missing in
>> our standalone.gypi?
>>
>> On Mon, Mar 7, 2016 at 8:50 PM, Adam Klein <[email protected]> wrote:
>>
>>> +machenbach, who maintains the bots.
>>>
>>> On Mon, Mar 7, 2016 at 11:18 AM, Daniel Cheng <[email protected]>
>>> wrote:
>>>
>>>> Who's responsible for maintaining these bots? It looks like v8_mac_rel
>>>> doesn't understand C++11 constructs still:
>>>> https://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/16596
>>>>
>>>> This seems to be related to -mmacosx-version-min=10.5: is there any
>>>> chance that we'll be dropping support for older OS X in V8 at some point?
>>>>
>>>> Daniel
>>>>
>>>> --
>>>> --
>>>> v8-dev mailing list
>>>> [email protected]
>>>> http://groups.google.com/group/v8-dev
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "v8-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> --
>>> v8-dev mailing list
>>> [email protected]
>>> http://groups.google.com/group/v8-dev
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "v8-dev" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> --
>> v8-dev mailing list
>> [email protected]
>> http://groups.google.com/group/v8-dev
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "v8-dev" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to