Commits

Amaury Forgeot d'Arc committed 3d4fb2d

This hack is not needed anymore :-)

  • Participants
  • Parent commits 8144ea8
  • Branches remove-PYPY_NOT_MAIN_FILE

Comments (0)

Files changed (3)

File pypy/rpython/tool/rffi_platform.py

 """
 
 def run_example_code(filepath, eci, ignore_errors=False):
-    eci = eci.convert_sources_to_files(being_main=True)
+    eci = eci.convert_sources_to_files()
     files = [filepath]
     output = build_executable_cache(files, eci, ignore_errors=ignore_errors)
     section = None

File pypy/translator/c/genc.py

     #
     # Header
     #
-    print >> f, '#define PYPY_MAIN_IMPLEMENTATION_FILE'
     print >> f, '#include "common_header.h"'
     print >> f
     commondefs(defines)
         fi.close()
 
     eci = add_extra_files(eci)
-    eci = eci.convert_sources_to_files(being_main=True)
+    eci = eci.convert_sources_to_files()
     files, eci = eci.get_module_files()
     return eci, filename, sg.getextrafiles() + list(files)

File pypy/translator/tool/cbuild.py

             d[attr] = getattr(self, attr)
         return d
 
-    def convert_sources_to_files(self, cache_dir=None, being_main=False):
+    def convert_sources_to_files(self, cache_dir=None):
         if not self.separate_module_sources:
             return self
         if cache_dir is None:
                 if not filename.check():
                     break
             f = filename.open("w")
-            if not being_main:
-                # This eci is being built independently from a larger
-                # target, so it has to include a copy of the C RPython
-                # helper functions when needed.
-                f.write("#define PYPY_MAIN_IMPLEMENTATION_FILE\n")
             self.write_c_header(f)
             source = str(source)
             f.write(source)