Author: Remi Meier <[email protected]>
Branch: nogil-unsafe-2
Changeset: r90787:856f0f42a1ee
Date: 2017-03-22 09:15 +0100
http://bitbucket.org/pypy/pypy/changeset/856f0f42a1ee/
Log: do the previous workaround only in the problematic case
diff --git a/rpython/tool/gcc_cache.py b/rpython/tool/gcc_cache.py
--- a/rpython/tool/gcc_cache.py
+++ b/rpython/tool/gcc_cache.py
@@ -25,7 +25,8 @@
try:
if ignore_errors:
platform.log_errors = False
- result = platform.execute(platform.compile(c_files, eci))
+ result = platform.execute(platform.compile(c_files, eci,
+ all_modules=False))
if result.err:
sys.stderr.write(result.err)
finally:
diff --git a/rpython/translator/c/src/thread.h
b/rpython/translator/c/src/thread.h
--- a/rpython/translator/c/src/thread.h
+++ b/rpython/translator/c/src/thread.h
@@ -38,7 +38,6 @@
RPY_EXTERN void RPyGilLeaveMasterSection(void);
RPY_EXTERN void RPyGilMasterRequestSafepoint(void);
-
#define RPyGilAcquire _RPyGilAcquire
#define RPyGilRelease _RPyGilRelease
#define RPyFetchFastGil _RPyFetchFastGil
diff --git a/rpython/translator/platform/__init__.py
b/rpython/translator/platform/__init__.py
--- a/rpython/translator/platform/__init__.py
+++ b/rpython/translator/platform/__init__.py
@@ -50,8 +50,9 @@
raise TypeError("You should not instantiate Platform class
directly")
self.cc = cc
- def compile(self, cfiles, eci, outputfilename=None, standalone=True):
- ofiles = self._compile_o_files(cfiles, eci, standalone)
+ def compile(self, cfiles, eci, outputfilename=None, standalone=True,
+ all_modules=True):
+ ofiles = self._compile_o_files(cfiles, eci, standalone, all_modules)
return self._finish_linking(ofiles, eci, outputfilename, standalone)
def _all_cfiles(self, cfiles, eci):
@@ -64,12 +65,13 @@
result.append(cfile)
return result
- def _compile_o_files(self, cfiles, eci, standalone=True):
- # XXX: why does platform-check add all known C files here?
- # apparently it adds, e.g., thread.c if rthread is used. And then
- # compiles them already. Is this necessary? (thread.c does currently
- # not compile on its own...)
- # cfiles = self._all_cfiles(cfiles, eci)
+ def _compile_o_files(self, cfiles, eci, standalone=True, all_modules=True):
+ if all_modules:
+ # XXX: why does platform-check add all known C files here?
+ # apparently it adds, e.g., thread.c if rthread is used. And then
+ # compiles them already. Is this necessary? (thread.c does
currently
+ # not compile on its own...)
+ cfiles = self._all_cfiles(cfiles, eci)
compile_args = self._compile_args_from_eci(eci, standalone)
ofiles = []
for cfile in cfiles:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit