[pypy-commit] pypy kill-exported-symbols-list: fix the obscure test
fijal
noreply at buildbot.pypy.org
Fri Oct 24 12:27:07 CEST 2014
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: kill-exported-symbols-list
Changeset: r74156:c1ac4fc62624
Date: 2014-10-24 12:26 +0200
http://bitbucket.org/pypy/pypy/changeset/c1ac4fc62624/
Log: fix the obscure test
diff --git a/rpython/rtyper/module/ll_os.py b/rpython/rtyper/module/ll_os.py
--- a/rpython/rtyper/module/ll_os.py
+++ b/rpython/rtyper/module/ll_os.py
@@ -25,6 +25,7 @@
from rpython.rtyper.lltypesystem.llmemory import itemoffsetof, offsetof
from rpython.rtyper.lltypesystem.rstr import STR
from rpython.rlib.objectmodel import specialize
+from rpython.translator import cdir
str0 = s_Str0
unicode0 = s_Unicode0
@@ -251,7 +252,7 @@
@registering_if(os, 'execv')
def register_os_execv(self):
eci = self.gcc_profiling_bug_workaround(
- 'int _noprof_execv(char *path, char *argv[])',
+ 'RPY_EXPORTED_FOR_TESTS int _noprof_execv(char *path, char *argv[])',
'return execv(path, argv);')
os_execv = self.llexternal('_noprof_execv',
[rffi.CCHARP, rffi.CCHARPP],
@@ -270,7 +271,7 @@
@registering_if(os, 'execve')
def register_os_execve(self):
eci = self.gcc_profiling_bug_workaround(
- 'int _noprof_execve(char *filename, char *argv[], char *envp[])',
+ 'RPY_EXPORTED_FOR_TESTS int _noprof_execve(char *filename, char *argv[], char *envp[])',
'return execve(filename, argv, envp);')
os_execve = self.llexternal(
'_noprof_execve', [rffi.CCHARP, rffi.CCHARPP, rffi.CCHARPP],
@@ -1729,7 +1730,7 @@
@registering_if(os, 'fork')
def register_os_fork(self):
from rpython.rlib import debug, rthread
- eci = self.gcc_profiling_bug_workaround('pid_t _noprof_fork(void)',
+ eci = self.gcc_profiling_bug_workaround('RPY_EXPORTED_FOR_TESTS pid_t _noprof_fork(void)',
'return fork();')
os_fork = self.llexternal('_noprof_fork', [], rffi.PID_T,
compilation_info = eci,
@@ -1939,10 +1940,12 @@
# like fork(), execv(), execve()
def gcc_profiling_bug_workaround(self, decl, body):
body = ('/*--no-profiling-for-this-file!--*/\n'
+ '#include "src/precommondefs.h"\n'
'%s {\n'
'\t%s\n'
'}\n' % (decl, body,))
return ExternalCompilationInfo(
+ include_dirs=[cdir],
post_include_bits = [decl + ';'],
separate_module_sources = [body])
More information about the pypy-commit
mailing list