Bug 989522 - Remove LIBXUL_LIBRARY from the moz.build sandbox. r=mshal
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 02 Apr 2014 11:52:04 +0900
changeset 195077 9bd193e4b484880b4f7d328b34f5064f57126f4b
parent 195076 4d4fce5e6a3fc69e582619bfff9ae374c123d4c1
child 195078 c70621a3019cab2712a9b6dd80cddd07f5aaa40d
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs989522
milestone31.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 989522 - Remove LIBXUL_LIBRARY from the moz.build sandbox. r=mshal
config/config.mk
dom/bindings/test/moz.build
python/mozbuild/mozbuild/frontend/emitter.py
python/mozbuild/mozbuild/frontend/sandbox_symbols.py
python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
python/mozbuild/mozbuild/test/backend/test_recursivemake.py
python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
python/mozbuild/mozbuild/test/frontend/test_emitter.py
--- a/config/config.mk
+++ b/config/config.mk
@@ -50,17 +50,16 @@ endif
   HOST_LIBRARY_NAME \
   HOST_PROGRAM \
   HOST_SIMPLE_PROGRAMS \
   IS_COMPONENT \
   JAR_MANIFEST \
   JAVA_JAR_TARGETS \
   JS_MODULES_PATH \
   LIBRARY_NAME \
-  LIBXUL_LIBRARY \
   MODULE \
   MSVC_ENABLE_PGO \
   NO_DIST_INSTALL \
   PARALLEL_DIRS \
   PROGRAM \
   RESOURCE_FILES \
   SDK_HEADERS \
   SIMPLE_PROGRAMS \
@@ -68,16 +67,17 @@ endif
   TIERS \
   TOOL_DIRS \
   XPCSHELL_TESTS \
   XPIDL_MODULE \
   $(NULL)
 
 _DEPRECATED_VARIABLES := \
   ANDROID_RESFILES \
+  LIBXUL_LIBRARY \
   MOCHITEST_A11Y_FILES \
   MOCHITEST_BROWSER_FILES \
   MOCHITEST_BROWSER_FILES_PARTS \
   MOCHITEST_CHROME_FILES \
   MOCHITEST_FILES \
   MOCHITEST_FILES_PARTS \
   MOCHITEST_METRO_FILES \
   MOCHITEST_ROBOCOP_FILES \
@@ -336,19 +336,16 @@ endif
 # Build using PIC by default
 #
 _ENABLE_PIC=1
 
 # Determine if module being compiled is destined
 # to be merged into libxul
 
 ifneq (,$(filter xul xul-%,$(FINAL_LIBRARY) $(LIBRARY_NAME)))
-  ifdef LIBXUL_LIBRARY
-    $(error LIBRARY_NAME or FINAL_LIBRARY is "xul", LIBXUL_LIBRARY is implied)
-  endif
   LIBXUL_LIBRARY := 1
 endif
 
 ifdef LIBXUL_LIBRARY
 ifdef IS_COMPONENT
 $(error IS_COMPONENT is set, but is not compatible with LIBXUL_LIBRARY)
 endif
 ifeq (,$(filter xul xul-%,$(LIBRARY_NAME)))
--- a/dom/bindings/test/moz.build
+++ b/dom/bindings/test/moz.build
@@ -1,15 +1,19 @@
 # -*- Mode: python; c-basic-offset: 4; 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/.
 
-LIBXUL_LIBRARY = True
+DEFINES.update({
+    'IMPL_LIBXUL': True,
+    'MOZILLA_INTERNAL_API': True,
+})
+
 # Do NOT export this library.  We don't actually want our test code
 # being added to libxul or anything.
 
 LIBRARY_NAME = 'dombindings_test_s'
 
 EXTRA_COMPONENTS += [
     'TestInterfaceJS.js',
     'TestInterfaceJS.manifest',
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -201,19 +201,16 @@ class TreeMetadataEmitter(LoggingMixin):
 
         for symbol in ('SOURCES', 'HOST_SOURCES', 'UNIFIED_SOURCES'):
             for src in (sandbox[symbol] or []):
                 if not os.path.exists(mozpath.join(sandbox['SRCDIR'], src)):
                     raise SandboxValidationError('Reference to a file that '
                         'doesn\'t exist in %s (%s) in %s'
                         % (symbol, src, sandbox['RELATIVEDIR']))
 
-        if sandbox.get('LIBXUL_LIBRARY') and sandbox.get('FORCE_STATIC_LIB'):
-            raise SandboxValidationError('LIBXUL_LIBRARY implies FORCE_STATIC_LIB')
-
         # Proxy some variables as-is until we have richer classes to represent
         # them. We should aim to keep this set small because it violates the
         # desired abstraction of the build definition away from makefiles.
         passthru = VariablePassthru(sandbox)
         varlist = [
             'ANDROID_GENERATED_RESFILES',
             'ANDROID_RES_DIRS',
             'CPP_UNIT_TESTS',
@@ -232,17 +229,16 @@ class TreeMetadataEmitter(LoggingMixin):
             'FORCE_STATIC_LIB',
             'USE_STATIC_LIBS',
             'GENERATED_FILES',
             'HOST_LIBRARY_NAME',
             'IS_COMPONENT',
             'IS_GYP_DIR',
             'JS_MODULES_PATH',
             'LIBS',
-            'LIBXUL_LIBRARY',
             'MSVC_ENABLE_PGO',
             'NO_DIST_INSTALL',
             'OS_LIBS',
             'RCFILE',
             'RESFILE',
             'RCINCLUDE',
             'DEFFILE',
             'SDK_LIBRARY',
--- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
+++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py
@@ -309,23 +309,16 @@ VARIABLES = {
         """, 'binaries'),
 
     'LIBS': (StrictOrderingOnAppendList, list,
         """Linker libraries and flags.
 
         A list of libraries and flags to include when linking.
         """, None),
 
-    'LIBXUL_LIBRARY': (bool, bool,
-        """Whether the library in this directory is linked into libxul.
-
-        Implies ``FORCE_STATIC_LIB`` and the ``MOZILLA_INTERNAL_API``
-        preprocessor macro.
-        """, None),
-
     'LOCAL_INCLUDES': (StrictOrderingOnAppendList, list,
         """Additional directories to be searched for include files by the compiler.
         """, None),
 
     'MSVC_ENABLE_PGO': (bool, bool,
         """Whether profile-guided optimization is enabled for MSVC in this directory.
         """, None),
 
--- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build
@@ -25,17 +25,16 @@ SDK_LIBRARY = ['bar.sdk', 'foo.sdk']
 
 SOURCES += ['bar.c', 'foo.c']
 
 SOURCES += ['bar.mm', 'foo.mm']
 
 SOURCES += ['baz.S', 'foo.S']
 
 FAIL_ON_WARNINGS = True
-LIBXUL_LIBRARY = True
 MSVC_ENABLE_PGO = True
 NO_VISIBILITY_FLAGS = True
 
 DELAYLOAD_DLLS = ['foo.dll', 'bar.dll']
 
 RCFILE = 'foo.rc'
 RESFILE = 'bar.res'
 RCINCLUDE = 'bar.rc'
--- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
+++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py
@@ -297,19 +297,16 @@ class TestRecursiveMakeBackend(BackendTe
             ],
             'HOST_CSRCS': [
                 'HOST_CSRCS += bar.c',
                 'HOST_CSRCS += foo.c',
             ],
             'HOST_LIBRARY_NAME': [
                 'HOST_LIBRARY_NAME := host_bar',
             ],
-            'LIBXUL_LIBRARY': [
-                'LIBXUL_LIBRARY := 1',
-            ],
             'MSVC_ENABLE_PGO': [
                 'MSVC_ENABLE_PGO := 1',
             ],
             'OS_LIBS': [
                 'OS_LIBS += foo.so',
                 'OS_LIBS += -l123',
                 'OS_LIBS += bar.a',
             ],
--- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
+++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build
@@ -25,17 +25,16 @@ SDK_LIBRARY += ['fans.sdk', 'tans.sdk']
 
 SOURCES += ['fans.c', 'tans.c']
 
 SOURCES += ['fans.mm', 'tans.mm']
 
 SOURCES += ['bans.S', 'fans.S']
 
 FAIL_ON_WARNINGS = True
-LIBXUL_LIBRARY = True
 MSVC_ENABLE_PGO = True
 
 NO_DIST_INSTALL = True
 
 FORCE_SHARED_LIB = True
 EXPORT_LIBRARY = True
 IS_COMPONENT = True
 NO_VISIBILITY_FLAGS = True
--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py
+++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py
@@ -159,17 +159,16 @@ class TestEmitterBasic(unittest.TestCase
             EXTRA_PP_JS_MODULES=['bar.pp.jsm', 'foo.pp.jsm'],
             FAIL_ON_WARNINGS=True,
             FORCE_SHARED_LIB=True,
             HOST_CPPSRCS=['fans.cpp', 'tans.cpp'],
             HOST_CSRCS=['fans.c', 'tans.c'],
             HOST_LIBRARY_NAME='host_fans',
             IS_COMPONENT=True,
             LIBS=['fans.lib', 'tans.lib'],
-            LIBXUL_LIBRARY=True,
             MSVC_ENABLE_PGO=True,
             NO_DIST_INSTALL=True,
             OS_LIBS=['foo.so', '-l123', 'aaa.a'],
             SDK_LIBRARY=['fans.sdk', 'tans.sdk'],
             SSRCS=['bans.S', 'fans.S'],
             VISIBILITY_FLAGS='',
             DELAYLOAD_LDFLAGS=['-DELAYLOAD:foo.dll', '-DELAYLOAD:bar.dll'],
             USE_DELAYIMP=True,