Bug 1525876: Export FILES_PER_UNIFIED_FILES in js/src/moz.build to avoid redefining it; r=froydnj
authorBenjamin Bouvier <benj@benj.me>
Wed, 13 Feb 2019 14:35:37 +0000
changeset 458902 1bb3f6cdfa73
parent 458901 5e40a4baa30b
child 458903 9b872b266b2e
push id35551
push usershindli@mozilla.com
push dateWed, 13 Feb 2019 21:34:09 +0000
treeherdermozilla-central@08f794a4928e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1525876
milestone67.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 1525876: Export FILES_PER_UNIFIED_FILES in js/src/moz.build to avoid redefining it; r=froydnj Before this patch, changing FILES_PER_UNIFIED_FILES in the directory would require changes to all the files that defined the sandbox variable, which is a bit misleading. Exporting the variable prevents this, and it is safe to use because it doesn't escape the scope of the js/src build directory. Differential Revision: https://phabricator.services.mozilla.com/D19647
js/src/frontend/moz.build
js/src/gc/moz.build
js/src/jit/moz.build
js/src/moz.build
js/src/wasm/moz.build
--- a/js/src/frontend/moz.build
+++ b/js/src/frontend/moz.build
@@ -1,18 +1,16 @@
 # -*- 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/.
 
 FINAL_LIBRARY = 'js'
 
-FILES_PER_UNIFIED_FILE = 6
-
 # Includes should be relative to parent path
 LOCAL_INCLUDES += [
     '!..',
     '..'
 ]
 
 include('../js-config.mozbuild')
 include('../js-cxxflags.mozbuild')
--- a/js/src/gc/moz.build
+++ b/js/src/gc/moz.build
@@ -1,18 +1,16 @@
 # -*- 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/.
 
 FINAL_LIBRARY = 'js'
 
-FILES_PER_UNIFIED_FILE = 6
-
 # Includes should be relative to parent path
 LOCAL_INCLUDES += [
     '!..',
     '..'
 ]
 
 include('../js-config.mozbuild')
 include('../js-cxxflags.mozbuild')
--- a/js/src/jit/moz.build
+++ b/js/src/jit/moz.build
@@ -1,18 +1,16 @@
 # -*- 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/.
 
 FINAL_LIBRARY = 'js'
 
-FILES_PER_UNIFIED_FILE = 6
-
 # Includes should be relative to parent path
 LOCAL_INCLUDES += [
     '!..',
     '..'
 ]
 
 include('../js-config.mozbuild')
 include('../js-cxxflags.mozbuild')
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -12,16 +12,20 @@ component_engine = ('Core', 'JavaScript 
 component_gc     = ('Core', 'JavaScript: GC')
 component_intl   = ('Core', 'JavaScript: Internationalization API')
 component_jit    = ('Core', 'JavaScript Engine: JIT')
 component_stl    = ('Core', 'JavaScript: Standard Library')
 component_wasm   = ('Core', 'Javascript: Web Assembly')
 
 FILES_PER_UNIFIED_FILE = 6
 
+# Prevent redefining FILES_PER_UNIFIED_FILE in each sub-directory of js. This
+# will not escape this directory.
+export('FILES_PER_UNIFIED_FILE')
+
 with Files('*'):
     BUG_COMPONENT = component_engine
 
 with Files('wasm/**'):
     BUG_COMPONENT = component_wasm
 with Files('builtin/**'):
     BUG_COMPONENT = component_stl
 with Files('ctypes/**'):
--- a/js/src/wasm/moz.build
+++ b/js/src/wasm/moz.build
@@ -1,18 +1,16 @@
 # -*- 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/.
 
 FINAL_LIBRARY = 'js'
 
-FILES_PER_UNIFIED_FILE = 6
-
 # Includes should be relative to parent path
 LOCAL_INCLUDES += [
     '!..',
     '..'
 ]
 
 include('../js-config.mozbuild')
 include('../js-cxxflags.mozbuild')