[pypy-commit] pypy ec-threadlocal: Use a more reasonable default for "no__thread", right now True on all

arigo noreply at buildbot.pypy.org
Mon Jun 23 19:39:24 CEST 2014


Author: Armin Rigo <arigo at tunes.org>
Branch: ec-threadlocal
Changeset: r72168:163fed2c37f8
Date: 2014-06-23 19:38 +0200
http://bitbucket.org/pypy/pypy/changeset/163fed2c37f8/

Log:	Use a more reasonable default for "no__thread", right now True on
	all platforms apart from Linux.

diff --git a/rpython/config/translationoption.py b/rpython/config/translationoption.py
--- a/rpython/config/translationoption.py
+++ b/rpython/config/translationoption.py
@@ -22,6 +22,12 @@
 
 IS_64_BITS = sys.maxint > 2147483647
 
+SUPPORT__THREAD = (    # whether the particular C compiler supports __thread
+    sys.platform.startswith("linux"))     # Linux works
+    # OS/X doesn't work, because we still target 10.5/10.6 and the
+    # minimum required version is 10.7.  Windows doesn't work.  Please
+    # add other platforms here if it works on them.
+
 MAINDIR = os.path.dirname(os.path.dirname(__file__))
 CACHE_DIR = os.path.realpath(os.path.join(MAINDIR, '_cache'))
 
@@ -156,7 +162,8 @@
     # portability options
     BoolOption("no__thread",
                "don't use __thread for implementing TLS",
-               default=False, cmdline="--no__thread", negation=False),
+               default=not SUPPORT__THREAD, cmdline="--no__thread",
+               negation=False),
     IntOption("make_jobs", "Specify -j argument to make for compilation"
               " (C backend only)",
               cmdline="--make-jobs", default=detect_number_of_processors()),


More information about the pypy-commit mailing list