Commits

Manuel Jacob committed cad6810

Compile stack.c/threadlocal.c only when needed.

  • Participants
  • Parent commits 30511e4
  • Branches remove-PYPY_NOT_MAIN_FILE

Comments (0)

Files changed (2)

File pypy/rlib/rstack.py

 
 import inspect
 
+import py
+
 from pypy.rlib.objectmodel import we_are_translated
 from pypy.rlib.rarithmetic import r_uint
 from pypy.rlib import rgc
 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,

File pypy/translator/c/genc.py

         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',