diff options
author | Simon McVittie <smcv@debian.org> | 2023-02-12 00:31:27 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gmail.com> | 2023-02-13 21:39:08 +0000 |
commit | f0472633702012b9cf75213b4e3bb272c21ec09f (patch) | |
tree | aa224f2a3fd4939944cf3d27cc838a94a12a1c00 | |
parent | 5b4ad723fa490c07d49d8b4862e7f388fd1a3354 (diff) | |
download | gobject-introspection-f0472633702012b9cf75213b4e3bb272c21ec09f.tar.gz |
gir: Generate GLib-2.0.gir using a --filelistwip/smcv/8k-not-enough-for-everybody
This was an attempt to bypass Windows' cmd.exe command-line length limit
(8191 characters according to Microsoft documentation) by ensuring we
only need enough space in argv for the list of files (passed to the
small script that generates the file-list) *or* all the other options
such as --include, but not both at the same time; but it seems that
limit is not the root cause of #456.
Signed-off-by: Simon McVittie <smcv@debian.org>
-rw-r--r-- | gir/meson.build | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/gir/meson.build b/gir/meson.build index 09714cc1..102768e4 100644 --- a/gir/meson.build +++ b/gir/meson.build @@ -232,10 +232,31 @@ if not get_option('gi_cross_use_prebuilt_gi') gir_giscanner_built_files = giscanner_built_files endif +print_argv = ''' +import sys +for x in sys.argv[1:]: + print(x) +''' + +# There are enough files in GLib and GObject to overflow the Windows cmd.exe +# command-line length limit of 8191 characters, so write them into a +# response file and pass that to g-ir-scanner instead +glib_filelist = custom_target( + input: glib_files, + output: 'glib-files.txt', + capture: true, + command: [ + python, + '-c', + print_argv, + '@INPUT@', + ], +) + glib_gir = custom_target('gir-glib', input: glib_files, output: 'GLib-2.0.gir', - depends: [gir_giscanner_pymod, glib_gir_dep], + depends: [gir_giscanner_pymod, glib_gir_dep, glib_filelist], depend_files: gir_giscanner_built_files, install: true, install_dir: girdir, @@ -247,8 +268,8 @@ glib_gir = custom_target('gir-glib', '-D__G_I18N_LIB_H__', '-DGETTEXT_PACKAGE=Dummy', '--cflags-end', - '@INPUT@', - ] + '--filelist' + ] + glib_filelist, ) gir_files += glib_gir |