bug 1417646 - build geckodriver in cross-compile builds. r=ato
authorTed Mielczarek <ted@mielczarek.org>
Thu, 05 Jul 2018 07:19:24 -0400
changeset 434619 90096b1bb22af99bc4c225581f0fd0e9dabbb9b1
parent 434618 1dfd8c602b96a5a0338ccc88e68e203ea153b078
child 434620 3528822f9b00f9759b8194ef9dc9b41bc05fd98c
push id34573
push userbtara@mozilla.com
push dateTue, 04 Sep 2018 23:24:58 +0000
treeherdermozilla-central@5b55659fa99f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1417646
milestone63.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 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 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']: