Commits

mattip committed 291b3f0

explicitly list files not able to use precompiled headers (module files)

Comments (0)

Files changed (4)

rpython/translator/c/genc.py

         return self.executable_name
 
     def gen_makefile(self, targetdir, exe_name=None, headers_to_precompile=[]):
-        cfiles = [self.c_source_filename] + self.extrafiles + list(self.eci.separate_module_files)
-        xxx
+        module_files = self.eventually_copy(self.eci.separate_module_files)
+        self.eci.separate_module_files = []
+        cfiles = [self.c_source_filename] + self.extrafiles + list(module_files)
         if exe_name is not None:
             exe_name = targetdir.join(exe_name)
         mk = self.translator.platform.gen_makefile(
             cfiles, self.eci,
             path=targetdir, exe_name=exe_name,
             headers_to_precompile=headers_to_precompile,
+            no_precompile_cfiles = module_files,
             shared=self.config.translation.shared)
 
         if self.has_profopt():

rpython/translator/platform/__init__.py

         return ExecutionResult(returncode, stdout, stderr)
 
     def gen_makefile(self, cfiles, eci, exe_name=None, path=None,
-                     shared=False, headers_to_precompile=[]):
+                     shared=False, headers_to_precompile=[],
+                     no_precompile_cfiles = []):
         raise NotImplementedError("Pure abstract baseclass")
 
     def __repr__(self):

rpython/translator/platform/posix.py

         return [entry[2:] for entry in out.split()]
 
     def gen_makefile(self, cfiles, eci, exe_name=None, path=None,
-                     shared=False, headers_to_precompile=[]):
+                     shared=False, headers_to_precompile=[],
+                     no_precompile_cfiles = []):
         cfiles = self._all_cfiles(cfiles, eci)
 
         if path is None:

rpython/translator/platform/windows.py

 
 
     def gen_makefile(self, cfiles, eci, exe_name=None, path=None,
-                     shared=False, headers_to_precompile=[]):
+                     shared=False, headers_to_precompile=[],
+                     no_precompile_cfiles = []):
         cfiles = self._all_cfiles(cfiles, eci)
 
         if path is None:
             # create a rule for compiling each file from eci since they cannot use
             # precompiled headers :(
             no_precompile = []
-            for f in list(eci.separate_module_files):
+            for f in list(no_precompile_cfiles):
                 f = m.pathrel(py.path.local(f))
                 if f not in no_precompile and f.endswith('.c'):
                     no_precompile.append(f)