env2mfile: move language args to `built-in options`

As putting them in the `properties` section is considered deprecated,
and Meson would then complain when trying to consume the resulting
machine file.
pull/12263/head
Ole André Vadla Ravnås 1 year ago committed by Dylan Baker
parent 20c9f3e621
commit 6cd2ba42ff
  1. 5
      mesonbuild/scripts/env2mfile.py

@ -238,7 +238,7 @@ 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:
@ -246,6 +246,9 @@ def write_machine_file(infos: MachineInfo, ofilename: str, write_system_info: bo
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')

Loading…
Cancel
Save