Bug 1738845 - Add some missing combinations of conditions to GN processing. r=firefox-build-system-reviewers,andi

Ideally, the code would handle things in a more general way that doesn't
require manually dealing with these lists, but this would require more
testing than there is time left before 102 releases.

While here, remove HOST_CPU_ARCH, which is always the same and thus
never appears in a condition.

This changes none of the generated moz.builds for the current
configuration (but changes the outcome when adding new configurations)

Differential Revision: https://phabricator.services.mozilla.com/D149850
This commit is contained in:
Mike Hommey 2022-06-21 20:03:55 +00:00
Родитель 9524e20b3f
Коммит 0317120cba
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -175,7 +175,6 @@ def filter_gn_config(path, gn_result, sandbox_vars, input_vars, gn_target):
mozbuild_args = {
"MOZ_DEBUG": "1" if input_vars.get("is_debug") else None,
"OS_TARGET": oses[input_vars["target_os"]],
"HOST_CPU_ARCH": cpus.get(input_vars["host_cpu"], input_vars["host_cpu"]),
"CPU_ARCH": cpus.get(input_vars["target_cpu"], input_vars["target_cpu"]),
}
if "use_x11" in input_vars:
@ -506,6 +505,7 @@ def write_mozbuild(
# Start with attributes that will be a part of the mozconfig
# for every configuration, then factor by other potentially useful
# combinations.
# FIXME: this is a time-bomb. See bug 1775202.
for attrs in (
(),
("MOZ_DEBUG",),
@ -514,8 +514,9 @@ def write_mozbuild(
("MOZ_DEBUG", "OS_TARGET"),
("OS_TARGET", "MOZ_X11"),
("OS_TARGET", "CPU_ARCH"),
("OS_TARGET", "CPU_ARCH", "MOZ_X11"),
("OS_TARGET", "CPU_ARCH", "MOZ_DEBUG"),
("MOZ_DEBUG", "OS_TARGET", "CPU_ARCH", "HOST_CPU_ARCH"),
("OS_TARGET", "CPU_ARCH", "MOZ_DEBUG", "MOZ_X11"),
):
conditions = set()
for args in all_args: