Merge "meson_to_hermetic: Fix package path and all meson options being loaded" into main am: 23a4ddd60d

Original change: https://android-review.googlesource.com/c/platform/external/mesa3d/+/3252913

Change-Id: I3672c88d8a06a9edaa597de3a23373faf5a3dd7c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Brandon Nguyen 2024-09-03 21:44:01 +00:00 committed by Automerger Merge Worker
commit ac809dc919

View file

@ -6,7 +6,7 @@ import tomllib
### Pull in the definitions meson is expecting
###
from meson_common import *
from meson_to_hermetic import *
from meson_to_hermetic.meson_to_hermetic import *
###
########################################################################################################################
{{ meson_options }}
@ -24,11 +24,11 @@ if __name__ == "__main__":
with open(value, 'rb') as f:
data = tomllib.load(f)
config_path = value
project_config = data.get('project_config')
for config in project_config:
meson_options = config.get('meson_options')
for key in meson_options:
set_option(key, meson_options[key])
# Data entry point of meson_translator global
load_meson_data(config_path)
meson_options = meson_translator.config.meson_options
for key in meson_options:
set_option(key, meson_options[key])
case _:
exit(f'Unhandled arg={flag} with value={value}')
@ -38,9 +38,6 @@ def get_variable(name: str):
return globals()[name]
### Load Metadata
load_meson_data(config_path)
meson = impl.Meson(meson_translator.generator)
host_machine = impl.Machine(meson_translator.host_machine)
build_machine = impl.Machine(meson_translator.build_machine)