Bug 1908558 - Fix building with --disable-mapi. r=dandarnell

When --disable-mapi is set in mozconfig, the build fails with a Python KeyError due
to buildconfig.substs not having a "MOZ_MAPI_SUPPORT" key.

Using defined() here correctly handles non-present key.

Differential Revision: https://phabricator.services.mozilla.com/D216882

--HG--
extra : amend_source : 1fb1ee525555ad9525ce07d96384692a0580d383
This commit is contained in:
Rob Lemley 2024-07-17 22:54:48 +00:00
Родитель 2ac253fedc
Коммит 243e39b494
2 изменённых файлов: 2 добавлений и 2 удалений

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

@ -110,7 +110,7 @@ if buildconfig.substs["OS_ARCH"] == "Darwin":
},
]
if buildconfig.substs["OS_ARCH"] == "WINNT" and buildconfig.substs["MOZ_MAPI_SUPPORT"]:
if buildconfig.substs["OS_ARCH"] == "WINNT" and defined("MOZ_MAPI_SUPPORT"):
Classes += [
{
"cid": "{9cc57822-0599-4c47-a399-1c6fa185a05c}",

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

@ -48,7 +48,7 @@ if buildconfig.substs["OS_ARCH"] == "WINNT":
},
]
if buildconfig.substs["MOZ_MAPI_SUPPORT"]:
if defined("MOZ_MAPI_SUPPORT"):
Classes += [
{
"cid": "{1db469a0-8b00-11d3-a206-00a0cc26da63}",