Refactored dep file name so Swift dependency tracking works.

pull/330/head
Jussi Pakkanen 9 years ago
parent d92504797f
commit 7ed515dacc
  1. 9
      compilers.py
  2. 2
      ninjabackend.py

@ -215,6 +215,9 @@ class CCompiler(Compiler):
def get_dependency_gen_args(self, outtarget, outfile):
return ['-MMD', '-MQ', outtarget, '-MF', outfile]
def depfile_for_object(self, objfile):
return objfile + '.' + self.get_depfile_suffix()
def get_depfile_suffix(self):
return 'd'
@ -985,6 +988,9 @@ class SwiftCompiler(Compiler):
def get_dependency_gen_args(self, outtarget, outfile):
return ['-emit-dependencies']
def depfile_for_object(self, objfile):
return os.path.splitext(objfile)[0] + '.' + self.get_depfile_suffix()
def get_depfile_suffix(self):
return 'd'
@ -1562,6 +1568,9 @@ end program prog
def get_module_outdir_args(self, path):
return ['-J' + path]
def depfile_for_object(self, objfile):
return objfile + '.' + self.get_depfile_suffix()
def get_depfile_suffix(self):
return 'd'

@ -1269,7 +1269,7 @@ rule FORTRAN_DEP_HACK
obj_basename = src_filename.replace('/', '_').replace('\\', '_')
rel_obj = os.path.join(self.get_target_private_dir(target), obj_basename)
rel_obj += '.' + self.environment.get_object_suffix()
dep_file = rel_obj + '.' + compiler.get_depfile_suffix()
dep_file = compiler.depfile_for_object(rel_obj)
if self.environment.coredata.get_builtin_option('use_pch'):
pchlist = target.get_pch(compiler.language)
else:

Loading…
Cancel
Save