[pypy-commit] pypy kill-someobject: (fijal, arigo) fix secondary entrypoints
fijal
noreply at buildbot.pypy.org
Mon Oct 8 13:20:11 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: kill-someobject
Changeset: r57897:576f96610252
Date: 2012-10-08 13:17 +0200
http://bitbucket.org/pypy/pypy/changeset/576f96610252/
Log: (fijal, arigo) fix secondary entrypoints
diff --git a/pypy/translator/driver.py b/pypy/translator/driver.py
--- a/pypy/translator/driver.py
+++ b/pypy/translator/driver.py
@@ -467,24 +467,20 @@
if translator.annotator is not None:
translator.frozen = True
- if self.libdef is not None:
- cbuilder = self.libdef.getcbuilder(self.translator, self.config)
- self.standalone = False
- standalone = False
+ standalone = self.standalone
+
+ if standalone:
+ from pypy.translator.c.genc import CStandaloneBuilder
+ cbuilder = CStandaloneBuilder(self.translator, self.entry_point,
+ config=self.config,
+ secondary_entrypoints=self.secondary_entrypoints)
else:
- standalone = self.standalone
-
- if standalone:
- from pypy.translator.c.genc import CStandaloneBuilder
- cbuilder = CStandaloneBuilder(self.translator, self.entry_point,
- config=self.config,
- secondary_entrypoints=self.secondary_entrypoints)
- else:
- from pypy.translator.c.dlltool import CLibraryBuilder
- cbuilder = CLibraryBuilder(self.translator, self.entry_point,
- functions=[(self.entry_point, None)],
- name='lib',
- config=self.config)
+ from pypy.translator.c.dlltool import CLibraryBuilder
+ functions = [(self.entry_point, None)] + self.secondary_entrypoints
+ cbuilder = CLibraryBuilder(self.translator, self.entry_point,
+ functions=functions,
+ name='libtesting',
+ config=self.config)
if not standalone: # xxx more messy
cbuilder.modulename = self.extmod_name
database = cbuilder.build_database()
More information about the pypy-commit
mailing list