Bug 1426452 - Remove check_top_objdir() call from CompileDB; r?Build draft
authorMike Shal <mshal@mozilla.com>
Wed, 20 Dec 2017 13:44:34 -0500
changeset 713663 836930cb470077669019baf2bee0d158919f6d56
parent 713529 2ff08db67b917fba1558986f3f2f796260f970f8
child 744399 5ed3876203ee9d26858800732001114b9b9a9018
push id93718
push userbmo:mshal@mozilla.com
push dateWed, 20 Dec 2017 21:46:17 +0000
reviewersBuild
bugs1426452, 1224450
milestone59.0a1
Bug 1426452 - Remove check_top_objdir() call from CompileDB; r?Build Prior to bug 1224450, CompileDB used data from the Makefiles to generate the compilation command-lines. Now that the data is derived entirely from moz.build, we don't need to check that the Makefile is present. This enables a simple "ac_add_options --build-backends=CompileDB" mozconfig to work without building a make backend first. MozReview-Commit-ID: 9tYumyUyg5Y
python/mozbuild/mozbuild/compilation/database.py
--- a/python/mozbuild/mozbuild/compilation/database.py
+++ b/python/mozbuild/mozbuild/compilation/database.py
@@ -2,17 +2,16 @@
 # 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/.
 
 # This modules provides functionality for dealing with code completion.
 
 import os
 import types
 
-from mozbuild.compilation import util
 from mozbuild.backend.common import CommonBackend
 from mozbuild.frontend.data import (
     ComputedFlags,
     Sources,
     GeneratedSources,
     DirectoryTraversal,
     Linkable,
     LocalInclude,
@@ -29,18 +28,16 @@ from collections import (
     defaultdict,
     OrderedDict,
 )
 
 
 class CompileDBBackend(CommonBackend):
     def _init(self):
         CommonBackend._init(self)
-        if not util.check_top_objdir(self.environment.topobjdir):
-            raise Exception()
 
         # The database we're going to dump out to.
         self._db = OrderedDict()
 
         # The cache for per-directory flags
         self._flags = {}
 
         self._envs = {}