Run postconf scripts absolutely last.

Introspection is broken if they are run any earlier.
This commit is contained in:
Elliott Sales de Andrade 2019-04-12 02:07:15 -04:00 committed by Nirbheek Chauhan
parent e9b4344aee
commit eaed4aecbe
1 changed files with 3 additions and 2 deletions

View File

@ -209,8 +209,6 @@ class MesonApp:
else:
intr.backend.generate(intr)
build.save(b, dumpfile)
# Post-conf scripts must be run after writing coredata or else introspection fails.
intr.backend.run_postconf_scripts()
if env.first_invocation:
coredata.write_cmd_line_file(self.build_dir, self.options)
else:
@ -223,6 +221,9 @@ class MesonApp:
else:
mintro.generate_introspection_file(b, intr.backend)
mintro.write_meson_info_file(b, [], True)
# Post-conf scripts must be run after writing coredata or else introspection fails.
intr.backend.run_postconf_scripts()
except Exception as e:
mintro.write_meson_info_file(b, [e])
if 'cdf' in locals():