Bug 1722454 - Simplify the handling of --enable-skia-pdf. r=firefox-build-system-reviewers,andi
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 29 Jul 2021 23:29:44 +0000
changeset 587098 b4e30230e7bbc199c84d9fa6f1bf983286c657f8
parent 587097 78c5d8124d557d7c2b864e29edaa866b9a3a0e1d
child 587099 f3935d46328e92b16bc1d4de9a5de00921e22a02
push id38655
push usernerli@mozilla.com
push dateFri, 30 Jul 2021 03:38:17 +0000
treeherdermozilla-central@d7b25de9e739 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, andi
bugs1722454
milestone92.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1722454 - Simplify the handling of --enable-skia-pdf. r=firefox-build-system-reviewers,andi Differential Revision: https://phabricator.services.mozilla.com/D120934
toolkit/moz.configure
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -934,31 +934,26 @@ set_define("MOZ_WEBSPEECH_TEST_BACKEND",
 option("--enable-ipdl-tests", help="Enable expensive IPDL tests")
 
 set_config("MOZ_IPDL_TESTS", depends_if("--enable-ipdl-tests")(lambda _: True))
 
 # Graphics
 # ==============================================================
 set_define("USE_SKIA", True)
 
-option("--enable-skia-pdf", help="Enable Skia PDF")
-
-
-@depends("--enable-skia-pdf", target, milestone)
-def skia_pdf(value, target, milestone):
-    if value.origin == "default":
-        if milestone.is_nightly and target.os != "WINNT":
-            return True
-    if value:
-        return True
-
-
-set_config("MOZ_ENABLE_SKIA_PDF", skia_pdf)
-set_define("MOZ_ENABLE_SKIA_PDF", skia_pdf)
-
+
+@depends(target, milestone)
+def skia_pdf_default(target, milestone):
+    return milestone.is_nightly and target.os != "WINNT"
+
+
+option("--enable-skia-pdf", default=skia_pdf_default, help="{Enable|Disable} Skia PDF")
+
+set_config("MOZ_ENABLE_SKIA_PDF", True, when="--enable-skia-pdf")
+set_define("MOZ_ENABLE_SKIA_PDF", True, when="--enable-skia-pdf")
 
 set_config(
     "SKIA_INCLUDES",
     [
         "/gfx/skia",
         "/gfx/skia/skia",
     ],
 )
@@ -970,17 +965,17 @@ system_lib_option(
 system_webp = pkg_check_modules(
     "MOZ_WEBP", "libwebp >= 1.0.2 libwebpdemux >= 1.0.2", when="--with-system-webp"
 )
 
 set_config("MOZ_SYSTEM_WEBP", depends(when=system_webp)(lambda: True))
 
 # Build Freetype in the tree
 # ==============================================================
-@depends(target, skia_pdf)
+@depends(target, "--enable-skia-pdf")
 def tree_freetype(target, skia_pdf):
     if target.os == "Android" or (skia_pdf and target.os == "WINNT"):
         return True
 
 
 set_define("MOZ_TREE_FREETYPE", tree_freetype)
 set_config("MOZ_TREE_FREETYPE", tree_freetype)
 add_old_configure_assignment("MOZ_TREE_FREETYPE", tree_freetype)