Bug 1264494 - Turn on Mac OSX 64 debug static analysis builds on Taskcluster. r=dustin,kmoir
authorKartikaya Gupta <kgupta@mozilla.com>
Thu, 02 Mar 2017 14:17:37 -0500
changeset 345874 fdf4387356577e0c5732b1120d62163393107db9
parent 345873 468c94147a6b6627a865a525b13a3e82e0682b86
child 345875 f58322b063085e28748b2a3f22be331e73404d3a
push id31451
push usercbook@mozilla.com
push dateMon, 06 Mar 2017 09:52:09 +0000
treeherdermozilla-central@7099e03837e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin, kmoir
bugs1264494
milestone54.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 1264494 - Turn on Mac OSX 64 debug static analysis builds on Taskcluster. r=dustin,kmoir MozReview-Commit-ID: 4EruHcLydBR
browser/config/mozconfigs/macosx64/debug-static-analysis
taskcluster/ci/static-analysis/kind.yml
taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
testing/mozharness/configs/builds/releng_sub_mac_configs/64_cross_debug_st_an.py
testing/mozharness/mozharness/mozilla/building/buildbase.py
--- a/browser/config/mozconfigs/macosx64/debug-static-analysis
+++ b/browser/config/mozconfigs/macosx64/debug-static-analysis
@@ -1,29 +1,31 @@
 MOZ_AUTOMATION_BUILD_SYMBOLS=0
 MOZ_AUTOMATION_PACKAGE_TESTS=0
 MOZ_AUTOMATION_L10N_CHECK=0
 
-# The toolchain installed on our OSX 10.7 build machines is too old to support
-# MachO LC_DATA_IN_CODE load command, which newer LLVM generates, so we need to
-# use a newer toolchain that we build.
-#
-# Unfortunately setting $PATH is not enough, because the build system hardcodes
-# the default values for some of the build tools, which we also need to
-# override below.  The default value for host ar and host ranlib is also
-# hardcoded so we need to override those separately.
-CCTOOLS_DIR="$topsrcdir/cctools/bin"
-export PATH="$CCTOOLS_DIR:$PATH"
-export AR="$CCTOOLS_DIR/ar"
-export HOST_AR="$CCTOOLS_DIR/ar"
-export RANLIB="$CCTOOLS_DIR/ranlib"
-export HOST_RANLIB="$CCTOOLS_DIR/ranlib"
-export LIPO="$CCTOOLS_DIR/lipo"
-export OTOOL="$CCTOOLS_DIR/otool"
-export STRIP="$CCTOOLS_DIR/strip"
+if test `uname -s` = Darwin; then
+  # The toolchain installed on our OSX 10.7 build machines is too old to support
+  # MachO LC_DATA_IN_CODE load command, which newer LLVM generates, so we need to
+  # use a newer toolchain that we build.
+  #
+  # Unfortunately setting $PATH is not enough, because the build system hardcodes
+  # the default values for some of the build tools, which we also need to
+  # override below.  The default value for host ar and host ranlib is also
+  # hardcoded so we need to override those separately.
+  CCTOOLS_DIR="$topsrcdir/cctools/bin"
+  export PATH="$CCTOOLS_DIR:$PATH"
+  export AR="$CCTOOLS_DIR/ar"
+  export HOST_AR="$CCTOOLS_DIR/ar"
+  export RANLIB="$CCTOOLS_DIR/ranlib"
+  export HOST_RANLIB="$CCTOOLS_DIR/ranlib"
+  export LIPO="$CCTOOLS_DIR/lipo"
+  export OTOOL="$CCTOOLS_DIR/otool"
+  export STRIP="$CCTOOLS_DIR/strip"
+fi
 
 . $topsrcdir/build/macosx/mozconfig.common
 
 ac_add_options --enable-debug
 ac_add_options --enable-dmd
 
 ac_add_options --enable-clang-plugin
 
--- a/taskcluster/ci/static-analysis/kind.yml
+++ b/taskcluster/ci/static-analysis/kind.yml
@@ -13,18 +13,41 @@ job-defaults:
     index:
         product: firefox
     treeherder:
         symbol: S
         kind: build
         tier: 1
 
 jobs:
+    macosx64-st-an/debug:
+        description: "MacOS X x64 Debug Cross-compile Static Analysis"
+        index:
+            job-name: macosx64-st-an-debug
+        treeherder:
+            platform: osx-10-7/debug
+        worker-type: aws-provisioner-v1/gecko-{level}-b-macosx64
+        worker:
+            implementation: docker-worker
+            docker-image: {in-tree: desktop-build}
+            max-run-time: 36000
+        run:
+            using: mozharness
+            actions: [build generate-build-stats update]
+            config:
+                - builds/releng_base_mac_64_cross_builds.py
+                - balrog/production.py
+            # enables static analysis.
+            custom-build-variant-cfg: cross-debug-st-an
+            script: "mozharness/scripts/fx_desktop_build.py"
+            tooltool-downloads: internal
+            keep-artifacts: false
+
     macosx64-st-an/opt:
-        description: "MacOS X x64 Cross-compile Static Analysis"
+        description: "MacOS X x64 Opt Cross-compile Static Analysis"
         index:
             job-name: macosx64-st-an-opt
         treeherder:
             platform: osx-10-7/opt
         worker-type: aws-provisioner-v1/gecko-{level}-b-macosx64
         worker:
             implementation: docker-worker
             docker-image: {in-tree: desktop-build}
--- a/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
+++ b/taskcluster/taskgraph/transforms/gecko_v2_whitelist.py
@@ -45,16 +45,17 @@ JOB_NAME_WHITELIST = set([
     'linux64-stylo-opt',
     'linux64-valgrind-opt',
     'macosx64-add-on-devel',
     'macosx64-clang-tidy',
     'macosx64-debug',
     'macosx64-opt',
     'macosx64-qr-debug',
     'macosx64-qr-opt',
+    'macosx64-st-an-debug',
     'macosx64-st-an-opt',
     'shell-haz-debug',
     'sm-arm-sim-debug',
     'sm-arm64-sim-debug',
     'sm-asan-opt',
     'sm-compacting-debug',
     'sm-mozjs-sys-debug',
     'sm-msan-opt',
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_mac_configs/64_cross_debug_st_an.py
@@ -0,0 +1,39 @@
+import os
+
+MOZ_OBJDIR = 'obj-firefox'
+
+config = {
+    'default_actions': [
+        'clobber',
+        'clone-tools',
+        'checkout-sources',
+        # 'setup-mock',
+        'build',
+    ],
+    'stage_platform': 'macosx64-st-an-debug',
+    'debug_build': True,
+    'objdir': 'obj-firefox',
+    'enable_talos_sendchange': False,
+    #### 64 bit build specific #####
+    'env': {
+        'MOZBUILD_STATE_PATH': os.path.join(os.getcwd(), '.mozbuild'),
+        'MOZ_AUTOMATION': '1',
+        'HG_SHARE_BASE_DIR': '/builds/hg-shared',
+        'MOZ_OBJDIR': 'obj-firefox',
+        'TINDERBOX_OUTPUT': '1',
+        'TOOLTOOL_CACHE': '/builds/tooltool_cache',
+        'TOOLTOOL_HOME': '/builds',
+        'MOZ_CRASHREPORTER_NO_REPORT': '1',
+        'CCACHE_DIR': '/builds/ccache',
+        'CCACHE_COMPRESS': '1',
+        'CCACHE_UMASK': '002',
+        'LC_ALL': 'C',
+        'XPCOM_DEBUG_BREAK': 'stack-and-abort',
+        ## 64 bit specific
+        'PATH': '/tools/python/bin:/tools/buildbot/bin:/opt/local/bin:/usr/bin:'
+                '/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin',
+        ##
+    },
+    'src_mozconfig': 'browser/config/mozconfigs/macosx64/debug-static-analysis',
+    #######################
+}
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -343,16 +343,17 @@ class BuildOptionParser(object):
     # *It will warn and fail if there is not a config for the current
     # platform/bits
     build_variants = {
         'add-on-devel': 'builds/releng_sub_%s_configs/%s_add-on-devel.py',
         'asan': 'builds/releng_sub_%s_configs/%s_asan.py',
         'asan-tc': 'builds/releng_sub_%s_configs/%s_asan_tc.py',
         'tsan': 'builds/releng_sub_%s_configs/%s_tsan.py',
         'cross-debug': 'builds/releng_sub_%s_configs/%s_cross_debug.py',
+        'cross-debug-st-an': 'builds/releng_sub_%s_configs/%s_cross_debug_st_an.py',
         'cross-opt-st-an': 'builds/releng_sub_%s_configs/%s_cross_opt_st_an.py',
         'cross-universal': 'builds/releng_sub_%s_configs/%s_cross_universal.py',
         'cross-qr-debug': 'builds/releng_sub_%s_configs/%s_cross_qr_debug.py',
         'cross-qr-opt': 'builds/releng_sub_%s_configs/%s_cross_qr_opt.py',
         'debug': 'builds/releng_sub_%s_configs/%s_debug.py',
         'asan-and-debug': 'builds/releng_sub_%s_configs/%s_asan_and_debug.py',
         'asan-tc-and-debug': 'builds/releng_sub_%s_configs/%s_asan_tc_and_debug.py',
         'stat-and-debug': 'builds/releng_sub_%s_configs/%s_stat_and_debug.py',