Skip to content

Commit 38162e7

Browse files
bonzinieli-schwartz
authored andcommitted
environment: allow setting build options with "build." prefix
This is allowed -- it is already deprecated for the cross file, but it should not assert. Add a deprecation for the native file too, and remove the assert. Fixes: d37d649 Fixes: mesonbuild#14789 Signed-off-by: Paolo Bonzini <[email protected]> (cherry picked from commit 6eb1f2d)
1 parent 11ed299 commit 38162e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

mesonbuild/environment.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -735,6 +735,8 @@ def mfilestr2key(self, machine_file_string: str, section: T.Optional[str], secti
735735
if section_subproject:
736736
key = key.evolve(subproject=section_subproject)
737737
if machine == MachineChoice.BUILD:
738+
if key.machine == MachineChoice.BUILD:
739+
mlog.deprecation('Setting build machine options in the native file does not need the "build." prefix', once=True)
738740
return key.evolve(machine=machine)
739741
return key
740742

0 commit comments

Comments
 (0)