Author: Amaury Forgeot d'Arc <[email protected]>
Branch: remove-PYPY_NOT_MAIN_FILE
Changeset: r59109:9b0d05677ee2
Date: 2012-11-28 23:00 +0100
http://bitbucket.org/pypy/pypy/changeset/9b0d05677ee2/
Log: Merged in mjacob changes around stacklet.c (pull request #91)
diff --git a/pypy/rlib/_rffi_stacklet.py b/pypy/rlib/_rffi_stacklet.py
--- a/pypy/rlib/_rffi_stacklet.py
+++ b/pypy/rlib/_rffi_stacklet.py
@@ -12,7 +12,7 @@
eci = ExternalCompilationInfo(
include_dirs = [cdir],
includes = ['src/stacklet/stacklet.h'],
- separate_module_sources = ['#include "src/stacklet/stacklet.c"\n'],
+ separate_module_files = [cdir / 'src' / 'stacklet' / 'stacklet.c'],
)
if 'masm' in dir(eci.platform): # Microsoft compiler
if is_emulated_long:
diff --git a/pypy/rlib/rstack.py b/pypy/rlib/rstack.py
--- a/pypy/rlib/rstack.py
+++ b/pypy/rlib/rstack.py
@@ -5,6 +5,8 @@
import inspect
+import py
+
from pypy.rlib.objectmodel import we_are_translated
from pypy.rlib.rarithmetic import r_uint
from pypy.rlib import rgc
@@ -12,11 +14,15 @@
from pypy.rpython.lltypesystem import lltype, rffi
from pypy.rpython.lltypesystem.lloperation import llop
from pypy.rpython.controllerentry import Controller, SomeControlledInstance
+from pypy.tool.autopath import pypydir
from pypy.translator.tool.cbuild import ExternalCompilationInfo
# ____________________________________________________________
-compilation_info = ExternalCompilationInfo(includes=['src/stack.h'])
+srcdir = py.path.local(pypydir) / 'translator' / 'c' / 'src'
+compilation_info = ExternalCompilationInfo(
+ includes=['src/stack.h'],
+ separate_module_files=[srcdir / 'stack.c', srcdir / 'threadlocal.c'])
def llexternal(name, args, res, _callable=None):
return rffi.llexternal(name, args, res, compilation_info=compilation_info,
diff --git a/pypy/translator/c/genc.py b/pypy/translator/c/genc.py
--- a/pypy/translator/c/genc.py
+++ b/pypy/translator/c/genc.py
@@ -765,8 +765,6 @@
srcdir / 'profiling.c',
srcdir / 'debug_print.c',
srcdir / 'debug_traceback.c', # ifdef HAVE_RTYPER
- srcdir / 'stack.c',
- srcdir / 'threadlocal.c',
srcdir / 'asm.c',
srcdir / 'instrument.c',
srcdir / 'int.c',
diff --git a/pypy/translator/c/src/stacklet/stacklet.c
b/pypy/translator/c/src/stacklet/stacklet.c
--- a/pypy/translator/c/src/stacklet/stacklet.c
+++ b/pypy/translator/c/src/stacklet/stacklet.c
@@ -2,7 +2,7 @@
* By Armin Rigo
*/
-#include "stacklet.h"
+#include "src/stacklet/stacklet.h"
#include <stddef.h>
#include <assert.h>
@@ -17,7 +17,7 @@
*/
#define STACK_DIRECTION 0
-#include "slp_platformselect.h"
+#include "src/stacklet/slp_platformselect.h"
#if STACK_DIRECTION != 0
# error "review this whole code, which depends on STACK_DIRECTION==0 so far"
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit