Skip to content

Commit

Permalink
env2mfile: move language args to built-in options
Browse files Browse the repository at this point in the history
As putting them in the `properties` section is considered deprecated,
and Meson would then complain when trying to consume the resulting
machine file.
  • Loading branch information
oleavr committed Feb 9, 2024
1 parent 3bee5ee commit 2169702
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mesonbuild/scripts/env2mfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,17 @@ def write_machine_file(infos: MachineInfo, ofilename: str, write_system_info: bo
write_args_line(ofile, exename, exe)
ofile.write('\n')

ofile.write('[properties]\n')
ofile.write('[built-in options]\n')
all_langs = list(set(infos.compile_args.keys()).union(set(infos.link_args.keys())))
all_langs.sort()
for lang in all_langs:
if lang in infos.compile_args:
write_args_line(ofile, lang + '_args', infos.compile_args[lang])
if lang in infos.link_args:
write_args_line(ofile, lang + '_link_args', infos.link_args[lang])
ofile.write('\n')

ofile.write('[properties]\n')
for k, v in infos.properties.items():
write_args_line(ofile, k, v)
ofile.write('\n')
Expand Down

0 comments on commit 2169702

Please sign in to comment.