[pypy-commit] pypy win32-faulthandler: Faulthandler uses vmprof, pass the correct compilation flags.
amauryfa
pypy.commits at gmail.com
Thu Apr 6 11:18:54 EDT 2017
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: win32-faulthandler
Changeset: r90997:a59405c6a950
Date: 2017-04-06 17:18 +0200
http://bitbucket.org/pypy/pypy/changeset/a59405c6a950/
Log: Faulthandler uses vmprof, pass the correct compilation flags.
diff --git a/pypy/module/faulthandler/cintf.py b/pypy/module/faulthandler/cintf.py
--- a/pypy/module/faulthandler/cintf.py
+++ b/pypy/module/faulthandler/cintf.py
@@ -1,4 +1,5 @@
import py
+import sys
from rpython.rtyper.lltypesystem import lltype, llmemory, rffi, rstr
from rpython.translator import cdir
from rpython.translator.tool.cbuild import ExternalCompilationInfo
@@ -8,11 +9,15 @@
rvmp = cwd.join('../../..')
rvmp = rvmp.join('rpython/rlib/rvmprof/src')
+compile_extra = ['-DRPYTHON_VMPROF']
+if sys.platform == 'win32':
+ compile_extra.append('-DVMPROF_WINDOWS')
+
eci = ExternalCompilationInfo(
includes=[cwd.join('faulthandler.h')],
include_dirs=[str(cwd), cdir, rvmp],
separate_module_files=[cwd.join('faulthandler.c')],
- compile_extra=['-DRPYTHON_VMPROF=1'])
+ compile_extra=compile_extra)
eci_later = eci.merge(ExternalCompilationInfo(
pre_include_bits=['#define PYPY_FAULTHANDLER_LATER\n']))
More information about the pypy-commit
mailing list