Bug 1363533 - Introduce MOZ_DEVTOOLS=addon to allow building Firefox without DevTools. r=jryans,jdescottes draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 11 May 2017 10:43:02 +0200
changeset 576193 eacc9325e96068e969dc7775bd5c3ace36eca6ef
parent 575133 120d8562d4a53e4f78bd86c6f5076f6db265e5a3
child 576194 7bce3192bdb472b907bdef99815e7790abe77eed
child 576249 9ac638c9da86c77d2eb6479462e77d3abe2bad9a
push id58274
push userbmo:poirot.alex@gmail.com
push dateThu, 11 May 2017 12:06:47 +0000
reviewersjryans, jdescottes
bugs1363533
milestone55.0a1
Bug 1363533 - Introduce MOZ_DEVTOOLS=addon to allow building Firefox without DevTools. r=jryans,jdescottes MozReview-Commit-ID: Ljm33fuvE2T
devtools/moz.build
devtools/platform/moz.build
devtools/shim/moz.build
--- a/devtools/moz.build
+++ b/devtools/moz.build
@@ -1,27 +1,38 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
-if CONFIG['MOZ_DEVTOOLS'] and CONFIG['MOZ_DEVTOOLS'] not in ('all', 'server'):
+if CONFIG['MOZ_DEVTOOLS'] and CONFIG['MOZ_DEVTOOLS'] not in ('all', 'server', 'addon'):
     error('Unsupported MOZ_DEVTOOLS value: %s' % (CONFIG['MOZ_DEVTOOLS']))
 
 if CONFIG['MOZ_DEVTOOLS'] == 'all':
     DIRS += [
         'client',
     ]
 
+# `addon` is a special build mode to strip everything except binary components
+# and shim modules that are going to stay in Firefox once DevTools ship as an
+# add-on.
+# `platform` contains all native components
+# `shim` contains the bare minimum integration to install DevTools Add-on
 DIRS += [
-    'server',
-    'shared',
+    'platform',
+    'shim',
 ]
 
+if CONFIG['MOZ_DEVTOOLS'] != 'addon':
+  DIRS += [
+      'server',
+      'shared',
+  ]
+
 # /browser uses DIST_SUBDIR.  We opt-in to this treatment when building
 # DevTools for the browser to keep the root omni.ja slim for use by external XUL
 # apps.  Mulet also uses this since it includes /browser.
 if CONFIG['MOZ_BUILD_APP'] == 'browser':
     DIST_SUBDIR = 'browser'
     export('DIST_SUBDIR')
 
 with Files('**'):
new file mode 100644
--- /dev/null
+++ b/devtools/platform/moz.build
@@ -0,0 +1,5 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
new file mode 100644
--- /dev/null
+++ b/devtools/shim/moz.build
@@ -0,0 +1,5 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.