[pypy-svn] r74347 - pypy/trunk/pypy/translator/tool
arigo at codespeak.net
arigo at codespeak.net
Mon May 3 16:33:54 CEST 2010
Author: arigo
Date: Mon May 3 16:33:53 2010
New Revision: 74347
Modified:
pypy/trunk/pypy/translator/tool/cbuild.py
Log:
Mac OS/X support. Temporary quick fix.
Modified: pypy/trunk/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/trunk/pypy/translator/tool/cbuild.py (original)
+++ pypy/trunk/pypy/translator/tool/cbuild.py Mon May 3 16:33:53 2010
@@ -270,14 +270,20 @@
if not file_name.check():
break
+ # XXX this logic should be moved to translator/platform/*.py
+ d = self._copy_attributes()
f = file_name.open("w")
- f.write("{\n")
- for sym in self.export_symbols:
- f.write("%s;\n" % (sym,))
- f.write("};")
+ if host.name.startswith('darwin'):
+ for sym in self.export_symbols:
+ f.write("_%s\n" % (sym,))
+ d['link_extra'] += ("-Wl,-exported_symbols_list,"+str(file_name), )
+ else:
+ f.write("{\n")
+ for sym in self.export_symbols:
+ f.write("%s;\n" % (sym,))
+ f.write("};")
+ d['link_extra'] += ("-Wl,--dynamic-list=" + str(file_name), )
f.close()
- d = self._copy_attributes()
- d['link_extra'] += ("-Wl,--dynamic-list=" + str(file_name), )
d['export_symbols'] = ()
return ExternalCompilationInfo(**d)
More information about the Pypy-commit
mailing list