diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-11-20 15:53:27 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-02-23 13:20:22 +0530 |
commit | 60dfa565e4d9075ca686c0ac1bd538cda430d101 (patch) | |
tree | be0d19d48dea3daf08a9e18537f958cd6118b5b8 | |
parent | b178c60f531711dc9a75947ac6cdaadd050b465e (diff) | |
download | meson-nirbheek/gnome-mkenums-rspfile.zip meson-nirbheek/gnome-mkenums-rspfile.tar.gz meson-nirbheek/gnome-mkenums-rspfile.tar.bz2 |
gnome.mkenums: Use rspfiles when possiblenirbheek/gnome-mkenums-rspfile
-rw-r--r-- | mesonbuild/modules/gnome.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 4473bcb..eecaf5b 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -1581,8 +1581,7 @@ G_END_DECLS''' return ModuleReturnValue([c_file, h_file], [c_file, h_file]) - @staticmethod - def _make_mkenum_custom_target(state, sources, output, cmd, kwargs): + def _make_mkenum_custom_target(self, state, sources, output, cmd, kwargs): custom_kwargs = { 'input': sources, 'output': output, @@ -1590,9 +1589,14 @@ G_END_DECLS''' 'command': cmd } custom_kwargs.update(kwargs) - return build.CustomTarget(output, state.subdir, state.subproject, custom_kwargs, + ct = build.CustomTarget(output, state.subdir, state.subproject, custom_kwargs, # https://github.com/mesonbuild/meson/issues/973 absolute_paths=True) + # Use rspfiles on Windows to avoid exceeding the maximum commandline length limit + can_rspfile = mesonlib.version_compare(self._get_native_glib_version(state), '>= 2.59.1') + if state.build_machine.system == 'windows' and can_rspfile: + ct.can_rspfile = True + return ct @permittedKwargs({'sources', 'prefix', 'install_header', 'install_dir', 'stdinc', 'nostdinc', 'internal', 'skip_source', 'valist_marshallers', |