You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Neil Conway <ne...@gmail.com> on 2017/04/09 00:17:50 UTC

Requiring XCode >= 8.0 on OSX

XCode < 8 does not support the C++11 `thread_local` construct. As a
result, we added a workaround to use `__thread` on OSX and
`thread_local` on other platforms:

https://reviews.apache.org/r/36845/

Since that workaround was added, XCode 8 has been released (in
September 2016) with support for `thread_local`.

If we required XCode >= 8.0 for building Mesos, we could remove this
workaround and use `thread_local` on all platforms. This would have
some advantages, such as:

(1) More uniform, standards-compliant code between OSX and other platforms.

(2) `thread_local` supports a few features that `__thread` does not,
such as support for non-POD data types.

Therefore, I'd like to propose we make XCode 8 a requirement for
building Mesos on OSX, and then get rid of the `THREAD_LOCAL`
workaround. Since XCode 8.0 requires OSX 10.11.5, this would also
imply dropping support for OSX 10.10.

Feedback welcome.

Neil

Re: Requiring XCode >= 8.0 on OSX

Posted by tommy xiao <xi...@gmail.com>.
support +1

2017-04-09 8:17 GMT+08:00 Neil Conway <ne...@gmail.com>:

> XCode < 8 does not support the C++11 `thread_local` construct. As a
> result, we added a workaround to use `__thread` on OSX and
> `thread_local` on other platforms:
>
> https://reviews.apache.org/r/36845/
>
> Since that workaround was added, XCode 8 has been released (in
> September 2016) with support for `thread_local`.
>
> If we required XCode >= 8.0 for building Mesos, we could remove this
> workaround and use `thread_local` on all platforms. This would have
> some advantages, such as:
>
> (1) More uniform, standards-compliant code between OSX and other platforms.
>
> (2) `thread_local` supports a few features that `__thread` does not,
> such as support for non-POD data types.
>
> Therefore, I'd like to propose we make XCode 8 a requirement for
> building Mesos on OSX, and then get rid of the `THREAD_LOCAL`
> workaround. Since XCode 8.0 requires OSX 10.11.5, this would also
> imply dropping support for OSX 10.10.
>
> Feedback welcome.
>
> Neil
>



-- 
Deshi Xiao
Twitter: xds2000
E-mail: xiaods(AT)gmail.com