dump coredata to file before calling backend.generate()

This ensures that all build files always have a later timestamp than
coredata.dat, which is used to check if the build files must be
regenerated.
pull/419/head
Nicolas Schneider 9 years ago
parent bffc84e77e
commit ac5ee0c414
  1. 2
      mesonbuild/environment.py
  2. 2
      mesonbuild/mesonmain.py

@ -126,7 +126,7 @@ class Environment():
def is_cross_build(self):
return self.cross_info is not None
def generating_finished(self):
def dump_coredata(self):
cdf = os.path.join(self.get_build_dir(), Environment.coredata_file)
coredata.save(self.coredata, cdf)

@ -166,8 +166,8 @@ itself as required.'''
mlog.log('Build machine cpu family:', mlog.bold(intr.builtin['build_machine'].cpu_family_method([], {})))
mlog.log('Build machine cpu:', mlog.bold(intr.builtin['build_machine'].cpu_method([], {})))
intr.run()
env.dump_coredata()
g.generate(intr)
env.generating_finished()
dumpfile = os.path.join(env.get_scratch_dir(), 'build.dat')
pickle.dump(b, open(dumpfile, 'wb'))

Loading…
Cancel
Save