Bug 1486554 - Enable static analysis on normal Windows CI builds r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 17 Oct 2018 22:45:06 +0000
changeset 490193 60d974e18e6ac10231d7105582c026fc74e16a69
parent 490192 ca4774548edb6ce092a600e246865e6111cee3d5
child 490194 7f518733a402d92d850cb4dd44d2ebd7bac67007
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersted
bugs1486554
milestone64.0a1
Bug 1486554 - Enable static analysis on normal Windows CI builds r=ted And turn off separate static analysis build tasks. Differential Revision: https://phabricator.services.mozilla.com/D8810
browser/config/mozconfigs/win32/debug-msvc
browser/config/mozconfigs/win32/opt-msvc
browser/config/mozconfigs/win64/debug-msvc
browser/config/mozconfigs/win64/opt-msvc
build/mozconfig.clang-cl
taskcluster/ci/static-analysis/kind.yml
taskcluster/docs/kinds.rst
taskcluster/taskgraph/target_tasks.py
taskcluster/taskgraph/try_option_syntax.py
--- a/browser/config/mozconfigs/win32/debug-msvc
+++ b/browser/config/mozconfigs/win32/debug-msvc
@@ -1,8 +1,9 @@
 . "$topsrcdir/browser/config/mozconfigs/win32/debug"
 
 export CC="cl.exe"
 export CXX="cl.exe"
 export LINKER="link.exe"
 
 export HOST_CC=${VSPATH}/VC/bin/Hostx64/x64/cl.exe
 export HOST_CXX=${VSPATH}/VC/bin/Hostx64/x64/cl.exe
+unset ENABLE_CLANG_PLUGIN
--- a/browser/config/mozconfigs/win32/opt-msvc
+++ b/browser/config/mozconfigs/win32/opt-msvc
@@ -1,8 +1,9 @@
 . "$topsrcdir/browser/config/mozconfigs/win32/nightly"
 
 export CC="cl.exe"
 export CXX="cl.exe"
 export LINKER="link.exe"
 
 export HOST_CC=${VSPATH}/VC/bin/Hostx64/x64/cl.exe
 export HOST_CXX=${VSPATH}/VC/bin/Hostx64/x64/cl.exe
+unset ENABLE_CLANG_PLUGIN
--- a/browser/config/mozconfigs/win64/debug-msvc
+++ b/browser/config/mozconfigs/win64/debug-msvc
@@ -1,5 +1,6 @@
 . "$topsrcdir/browser/config/mozconfigs/win64/debug"
 
 export CC="cl.exe"
 export CXX="cl.exe"
 export LINKER="link.exe"
+unset ENABLE_CLANG_PLUGIN
--- a/browser/config/mozconfigs/win64/opt-msvc
+++ b/browser/config/mozconfigs/win64/opt-msvc
@@ -1,5 +1,6 @@
 . "$topsrcdir/browser/config/mozconfigs/win64/nightly"
 
 export CC="cl.exe"
 export CXX="cl.exe"
 export LINKER="link.exe"
+unset ENABLE_CLANG_PLUGIN
--- a/build/mozconfig.clang-cl
+++ b/build/mozconfig.clang-cl
@@ -7,8 +7,9 @@ if test -d "$topsrcdir/clang/bin"; then
         CLANG_LIB_DIR="$(cd $topsrcdir/clang/lib/clang/* && cd lib/windows && pwd)"
         export LIB=$LIB:$CLANG_LIB_DIR
         mk_export_correct_style LIB
     fi
 fi
 
 export CC=clang-cl
 export CXX=clang-cl
+export ENABLE_CLANG_PLUGIN=1
deleted file mode 100644
--- a/taskcluster/ci/static-analysis/kind.yml
+++ /dev/null
@@ -1,148 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-loader: taskgraph.loader.transform:loader
-
-kind-dependencies:
-    - toolchain
-
-transforms:
-    - taskgraph.transforms.build_attrs:transforms
-    - taskgraph.transforms.build_lints:transforms
-    - taskgraph.transforms.use_toolchains:transforms
-    - taskgraph.transforms.job:transforms
-    - taskgraph.transforms.task:transforms
-
-job-defaults:
-    index:
-        product: firefox
-    treeherder:
-        symbol: S
-        kind: build
-        tier: 1
-
-jobs:
-    win32-st-an/debug:
-        description: "Win32 Static Analysis Debug (clang-cl)"
-        index:
-            product: firefox
-            job-name: win32-st-an-debug
-        treeherder:
-            platform: windows2012-32/debug
-            symbol: S
-            tier: 1
-        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-        worker:
-            max-run-time: 7200
-            env:
-                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
-                PERFHERDER_EXTRA_OPTIONS: static-analysis
-        run:
-            using: mozharness
-            options: [append-env-variables-from-configs]
-            script: mozharness/scripts/fx_desktop_build.py
-            config:
-                - builds/releng_base_firefox.py
-                - builds/taskcluster_base_windows.py
-                - builds/taskcluster_base_win32.py
-                - builds/taskcluster_sub_win32/clang_debug.py
-        toolchains:
-            - win64-clang-cl
-            - win64-rust
-            - win64-cbindgen
-            - win64-sccache
-            - win64-node
-
-    win32-st-an/opt:
-        description: "Win32 Static Analysis Opt (clang-cl)"
-        index:
-            product: firefox
-            job-name: win32-st-an-opt
-        treeherder:
-            platform: windows2012-32/opt
-            symbol: S
-            tier: 1
-        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-        worker:
-            max-run-time: 7200
-            env:
-                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win32/releng.manifest"
-                PERFHERDER_EXTRA_OPTIONS: static-analysis
-        run:
-            using: mozharness
-            options: [append-env-variables-from-configs]
-            script: mozharness/scripts/fx_desktop_build.py
-            config:
-                - builds/releng_base_firefox.py
-                - builds/taskcluster_base_windows.py
-                - builds/taskcluster_base_win32.py
-                - builds/taskcluster_sub_win32/clang.py
-        toolchains:
-            - win64-clang-cl
-            - win64-rust
-            - win64-cbindgen
-            - win64-sccache
-            - win64-node
-
-    win64-st-an/debug:
-        description: "Win64 Static Analysis Debug (clang-cl)"
-        index:
-            product: firefox
-            job-name: win64-st-an-debug
-        treeherder:
-            platform: windows2012-64/debug
-            symbol: S
-            tier: 1
-        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-        worker:
-            max-run-time: 7200
-            env:
-                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
-                PERFHERDER_EXTRA_OPTIONS: static-analysis
-        run:
-            using: mozharness
-            options: [append-env-variables-from-configs]
-            script: mozharness/scripts/fx_desktop_build.py
-            config:
-                - builds/releng_base_firefox.py
-                - builds/taskcluster_base_windows.py
-                - builds/taskcluster_base_win64.py
-                - builds/taskcluster_sub_win64/clang_debug.py
-        toolchains:
-            - win64-clang-cl
-            - win64-rust
-            - win64-cbindgen
-            - win64-sccache
-            - win64-node
-
-    win64-st-an/opt:
-        description: "Win64 Static Analysis Opt (clang-cl)"
-        index:
-            product: firefox
-            job-name: win64-st-an-opt
-        treeherder:
-            platform: windows2012-64/opt
-            symbol: S
-            tier: 1
-        worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
-        worker:
-            max-run-time: 7200
-            env:
-                TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/releng.manifest"
-                PERFHERDER_EXTRA_OPTIONS: static-analysis
-        run:
-            using: mozharness
-            options: [append-env-variables-from-configs]
-            script: mozharness/scripts/fx_desktop_build.py
-            config:
-                - builds/releng_base_firefox.py
-                - builds/taskcluster_base_windows.py
-                - builds/taskcluster_base_win64.py
-                - builds/taskcluster_sub_win64/clang.py
-        toolchains:
-            - win64-clang-cl
-            - win64-rust
-            - win64-cbindgen
-            - win64-sccache
-            - win64-node
--- a/taskcluster/docs/kinds.rst
+++ b/taskcluster/docs/kinds.rst
@@ -77,24 +77,16 @@ valgrind
 
 Valgrind tasks produce builds instrumented by valgrind.
 
 searchfox
 ---------
 
 Searchfox builds generate C++ index data for Searchfox.
 
-static-analysis
----------------
-
-Static analysis builds use the compiler to perform some detailed analysis of
-the source code while building.  The useful output from these tasks are their
-build logs, and while they produce a binary, they do not upload it as an
-artifact.
-
 static-analysis-autotest
 ------------------------
 
 Static analysis autotest utility in order to be sure that there is no regression
 when upgrading utilities that impact static-analysis.
 
 toolchain
 ---------
--- a/taskcluster/taskgraph/target_tasks.py
+++ b/taskcluster/taskgraph/target_tasks.py
@@ -185,17 +185,17 @@ def target_tasks_ash(full_task_graph, pa
         # Only on Linux platforms
         if 'linux' not in platform:
             return False
         # No random non-build jobs either. This is being purposely done as a
         # blacklist so newly-added jobs aren't missed by default.
         for p in ('nightly', 'haz', 'artifact', 'cov', 'add-on'):
             if p in platform:
                 return False
-        for k in ('toolchain', 'l10n', 'static-analysis'):
+        for k in ('toolchain', 'l10n'):
             if k in task.attributes['kind']:
                 return False
         # and none of this linux64-asan/debug stuff
         if platform == 'linux64-asan' and task.attributes['build_type'] == 'debug':
             return False
         # no non-e10s tests
         if task.attributes.get('unittest_suite'):
             if not task.attributes.get('e10s'):
--- a/taskcluster/taskgraph/try_option_syntax.py
+++ b/taskcluster/taskgraph/try_option_syntax.py
@@ -23,17 +23,16 @@ BUILD_TYPE_ALIASES = {
 
 # consider anything in this whitelist of kinds to be governed by -b/-p
 BUILD_KINDS = set([
     'build',
     'artifact-build',
     'hazard',
     'l10n',
     'valgrind',
-    'static-analysis',
     'spidermonkey',
 ])
 
 
 # mapping from shortcut name (usable with -u) to a boolean function identifying
 # matching test names
 def alias_prefix(prefix):
     return lambda name: name.startswith(prefix)