diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-02 19:27:20 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-06 22:03:29 +0100 |
commit | ab32f1fe0002885b7417230f6edf0d74574a9a2f (patch) | |
tree | 849ba0b066c01a15d857c71448d8341c47d9f4ca /mesonbuild/msetup.py | |
parent | 38241f5fceebb17e957c80085df4cbe2cf7816de (diff) | |
download | meson-ab32f1fe0002885b7417230f6edf0d74574a9a2f.zip meson-ab32f1fe0002885b7417230f6edf0d74574a9a2f.tar.gz meson-ab32f1fe0002885b7417230f6edf0d74574a9a2f.tar.bz2 |
Added meson-info.json
Diffstat (limited to 'mesonbuild/msetup.py')
-rw-r--r-- | mesonbuild/msetup.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 402f756..da7fce1 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -184,11 +184,15 @@ class MesonApp: mlog.log('Target machine cpu:', mlog.bold(intr.builtin['target_machine'].cpu_method([], {}))) 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([], {}))) - if self.options.profile: - fname = os.path.join(self.build_dir, 'meson-private', 'profile-interpreter.log') - profile.runctx('intr.run()', globals(), locals(), filename=fname) - else: - intr.run() + try: + if self.options.profile: + fname = os.path.join(self.build_dir, 'meson-private', 'profile-interpreter.log') + profile.runctx('intr.run()', globals(), locals(), filename=fname) + else: + intr.run() + except Exception as e: + mintro.write_meson_info_file(b, [e]) + raise # Print all default option values that don't match the current value for def_opt_name, def_opt_value, cur_opt_value in intr.get_non_matching_default_options(): mlog.log('Option', mlog.bold(def_opt_name), 'is:', @@ -223,7 +227,9 @@ class MesonApp: profile.runctx('mintro.generate_introspection_file(b, intr.backend)', globals(), locals(), filename=fname) else: mintro.generate_introspection_file(b, intr.backend) - except: + mintro.write_meson_info_file(b, [], True) + except Exception as e: + mintro.write_meson_info_file(b, [e]) if 'cdf' in locals(): old_cdf = cdf + '.prev' if os.path.exists(old_cdf): |