bug 1417646 - build geckodriver in cross-compile builds. r=ato a=test-only on a CLOSED TREE
authorTed Mielczarek <ted@mielczarek.org>
Thu, 05 Jul 2018 07:19:24 -0400
changeset 489698 b271373dfe1814a3e0c144d60352bcfe40c7e5e8
parent 489697 dd6532df029091683622e133c39f92c74fc83c3e
child 489699 52ea2d8e8d7a6219160e9baf2c5908f4fab50bf8
push id9745
push userapavel@mozilla.com
push dateWed, 05 Sep 2018 18:43:54 +0000
treeherdermozilla-beta@b271373dfe18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1417646
milestone63.0
bug 1417646 - build geckodriver in cross-compile builds. r=ato a=test-only on a CLOSED TREE With patches from other bugs in place to use the right C compiler and cflags, we can enable geckodriver on cross-compiles for macOS. MozReview-Commit-ID: 5wqBiA6UCf
build/unix/mozconfig.linux32
toolkit/moz.configure
toolkit/toolkit.mozbuild
--- a/build/unix/mozconfig.linux32
+++ b/build/unix/mozconfig.linux32
@@ -1,15 +1,8 @@
 . "$topsrcdir/build/unix/mozconfig.linux"
 
 export MOZ_LINUX_32_SSE2_STARTUP_ERROR=1
 
 CFLAGS="$CFLAGS -march=pentium-m -msse -msse2 -mfpmath=sse"
 CXXFLAGS="$CXXFLAGS -march=pentium-m -msse -msse2 -mfpmath=sse"
 
 ac_add_options --target=i686-pc-linux
-
-# The linux32 builds are effectively cross-compilations, and geckodriver
-# is not enabled by default on cross-compilations, because in most cases,
-# the target is not something we can run binaries of, and geckodriver
-# is a target binary instead of a host binary. But for linux32, we actually
-# can run the target binaries, so we can manually enable geckodriver.
-ac_add_options --enable-geckodriver
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -902,19 +902,21 @@ set_config('ENABLE_MARIONETTE', marionet
 
 # geckodriver WebDriver implementation
 # ==============================================================
 option('--enable-geckodriver', help='Enable WebDriver implementation')
 
 @depends('--enable-geckodriver',
          'MOZ_AUTOMATION',
          compile_environment,
+         target,
          cross_compiling,
-         hazard_analysis)
-def geckodriver(enable, automation, compile_env, cross_compile, hazard):
+         hazard_analysis,
+         asan)
+def geckodriver(enable, automation, compile_env, target, cross_compile, hazard, asan):
     """
     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.
@@ -922,17 +924,18 @@ 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
+        # Bug 1441656 for Android.
+        broken_platforms = hazard or target.os == 'Android' or (asan and cross_compile)
 
         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_TSAN']:
     DIRS += ['/testing/geckodriver']
 
 DIRS += [
     '/tools/quitter',
     '/media/gmp-clearkey/0.1',
 ]
 
 if CONFIG['ENABLE_TESTS']: