diff --git a/python/mozbuild/mozbuild/frontend/emitter.py b/python/mozbuild/mozbuild/frontend/emitter.py index 940dfc2ab2a46..3acb662b4de11 100644 --- a/python/mozbuild/mozbuild/frontend/emitter.py +++ b/python/mozbuild/mozbuild/frontend/emitter.py @@ -132,6 +132,7 @@ def emit_from_sandbox(self, sandbox): JS_MODULES_PATH='JS_MODULES_PATH', LIBRARY_NAME='LIBRARY_NAME', LIBS='LIBS', + LIBXUL_LIBRARY='LIBXUL_LIBRARY', MODULE='MODULE', SDK_LIBRARY='SDK_LIBRARY', SHARED_LIBRARY_LIBS='SHARED_LIBRARY_LIBS', diff --git a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py index 204cb7bb0f68f..e288b6068196e 100644 --- a/python/mozbuild/mozbuild/frontend/sandbox_symbols.py +++ b/python/mozbuild/mozbuild/frontend/sandbox_symbols.py @@ -209,6 +209,12 @@ def doc_to_paragraphs(doc): A list of libraries and flags to include when linking. """), + 'LIBXUL_LIBRARY': (bool, bool, False, + """Whether the library in this directory is linked into libxul. + + Implies MOZILLA_INTERNAL_API. + """), + 'SDK_LIBRARY': (StrictOrderingOnAppendList, list, [], """Elements of the distributed SDK. diff --git a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build index 2ad897de7874a..f208953a9e44e 100644 --- a/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build +++ b/python/mozbuild/mozbuild/test/backend/data/variable_passthru/moz.build @@ -41,3 +41,4 @@ CMMSRCS = ['bar.mm', 'foo.mm'] SSRCS = ['bar.S', 'foo.S'] FAIL_ON_WARNINGS = True +LIBXUL_LIBRARY = True diff --git a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py index 9cd892b1d096c..23c3839d8e141 100644 --- a/python/mozbuild/mozbuild/test/backend/test_recursivemake.py +++ b/python/mozbuild/mozbuild/test/backend/test_recursivemake.py @@ -204,6 +204,9 @@ def test_variable_passthru(self): 'LIBRARY_NAME': [ 'LIBRARY_NAME := lib_name', ], + 'LIBXUL_LIBRARY': [ + 'LIBXUL_LIBRARY := 1', + ], 'SDK_LIBRARY': [ 'SDK_LIBRARY += bar.sdk', 'SDK_LIBRARY += foo.sdk', diff --git a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build index 8c34b775f4395..57db2a16aa13a 100644 --- a/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build +++ b/python/mozbuild/mozbuild/test/frontend/data/variable-passthru/moz.build @@ -41,5 +41,6 @@ CMMSRCS = ['fans.mm', 'tans.mm'] SSRCS = ['fans.S', 'tans.S'] FAIL_ON_WARNINGS = True +LIBXUL_LIBRARY = True NO_DIST_INSTALL = True diff --git a/python/mozbuild/mozbuild/test/frontend/test_emitter.py b/python/mozbuild/mozbuild/test/frontend/test_emitter.py index 37a72381a39cf..5737d4518fe52 100644 --- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py +++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py @@ -145,6 +145,7 @@ def test_variable_passthru(self): HOST_LIBRARY_NAME='host_fans', LIBRARY_NAME='lib_name', LIBS=['fans.lib', 'tans.lib'], + LIBXUL_LIBRARY=True, NO_DIST_INSTALL='1', MODULE='module_name', SDK_LIBRARY=['fans.sdk', 'tans.sdk'],