bug 1417646 - build geckodriver in cross-compile builds. r?ato draft
authorTed Mielczarek <ted@mielczarek.org>
Thu, 05 Jul 2018 07:19:24 -0400
changeset 822791 5786664586b67e2118e900408abb5e4a5aeeb6a7
parent 822790 39ac2aff9fc4f0fd87a44be43f994c6c89d8544b
push id117472
push userbmo:ted@mielczarek.org
push dateWed, 25 Jul 2018 22:46:17 +0000
reviewersato
bugs1417646
milestone63.0a1
bug 1417646 - build geckodriver in cross-compile builds. r?ato With patches from other bugs in place to use the right C compiler and cflags, we can enable geckodriver on cross-compiles such as macOS and Android builds. MozReview-Commit-ID: 5wqBiA6UCf
toolkit/moz.configure
toolkit/toolkit.mozbuild
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -1100,19 +1100,18 @@ set_config('ENABLE_MARIONETTE', marionet
 
 # geckodriver WebDriver implementation
 # ==============================================================
 option('--enable-geckodriver', help='Enable WebDriver implementation')
 
 @depends('--enable-geckodriver',
          'MOZ_AUTOMATION',
          compile_environment,
-         cross_compiling,
          hazard_analysis)
-def geckodriver(enable, automation, compile_env, cross_compile, hazard):
+def geckodriver(enable, automation, compile_env, hazard):
     """
     geckodriver is implied on supported platforms when MOZ_AUTOMATION
     is set, but we also provide the --enable-geckodriver option for
     developers to use.
 
     At the present time, we want individual developers to be able to
     opt-in to building geckodriver locally, and for it to be enabled by
     default on supported CI build platforms.
@@ -1120,17 +1119,17 @@ def geckodriver(enable, automation, comp
     if enable:
         if not compile_env:
             die("--enable-geckodriver is not available without a compile "
                 "environment. A geckodriver binary will be downloaded during "
                 "an artifact build by default where available.")
         return True
 
     if enable.origin == 'default':
-        broken_platforms = cross_compile or hazard
+        broken_platforms = hazard
 
         if automation and compile_env and not broken_platforms:
             return True
 
 set_config('ENABLE_GECKODRIVER', geckodriver)
 
 # WebRTC
 # ========================================================
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -160,17 +160,17 @@ if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']
     DIRS += ['/toolkit/system/gnome']
 
 if CONFIG['ENABLE_MARIONETTE']:
     DIRS += [
         '/testing/firefox-ui',
         '/testing/marionette',
     ]
 
-if CONFIG['ENABLE_GECKODRIVER']:
+if CONFIG['ENABLE_GECKODRIVER'] and not (CONFIG['MOZ_ASAN'] or CONFIG['MOZ_TSAN']):
     DIRS += ['/testing/geckodriver']
 
 DIRS += [
     '/tools/quitter',
     '/media/gmp-clearkey/0.1',
 ]
 
 if CONFIG['ENABLE_TESTS']: