Bug 1386876 - Replace all uses of NO_VISIBILITY_FLAGS with a template and remove NO_VISIBILITY_FLAGS.
MozReview-Commit-ID: 194U1WMCAM0
--- a/build/clang-plugin/moz.build
+++ b/build/clang-plugin/moz.build
@@ -44,17 +44,17 @@ UNIFIED_SOURCES += [
GENERATED_FILES += ['ThirdPartyPaths.cpp']
third_party_paths = GENERATED_FILES['ThirdPartyPaths.cpp']
third_party_paths.script = "ThirdPartyPaths.py:generate"
third_party_paths.inputs = [
'/tools/rewriting/ThirdPartyPaths.txt',
]
DisableStlWrapping()
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
# libc++ is required to build plugins against clang on OS X.
if CONFIG['HOST_OS_ARCH'] == 'Darwin':
CXXFLAGS += ['-stdlib=libc++']
LDFLAGS += ['-lc++']
DIRS += [
'tests',
--- a/build/clang-plugin/tests/moz.build
+++ b/build/clang-plugin/tests/moz.build
@@ -41,9 +41,9 @@ SOURCES += [
'TestOverrideBaseCallAnnotation.cpp',
'TestRefCountedCopyConstructor.cpp',
'TestSprintfLiteral.cpp',
'TestStackClass.cpp',
'TestTrivialCtorDtor.cpp',
]
DisableStlWrapping()
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
--- a/build/unix/elfhack/inject/moz.build
+++ b/build/unix/elfhack/inject/moz.build
@@ -18,9 +18,9 @@ else:
cpu = CONFIG['TARGET_CPU']
SOURCES += [
"!%s.c" % cpu,
]
NO_PGO = True
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -5,17 +5,17 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
FINAL_LIBRARY = 'js'
if CONFIG['MOZ_SYSTEM_FFI']:
OS_LIBS += CONFIG['MOZ_FFI_LIBS']
else:
ALLOW_COMPILER_WARNINGS = True
- NO_VISIBILITY_FLAGS = True
+ NoVisibilityFlags()
CONFIGURE_DEFINE_FILES += [
'../../../js/src/ctypes/libffi/fficonfig.h',
]
GENERATED_FILES += [
'../../../js/src/ctypes/libffi/include/ffi.h',
]
ffi_h = GENERATED_FILES['../../../js/src/ctypes/libffi/include/ffi.h']
--- a/config/moz.build
+++ b/config/moz.build
@@ -5,17 +5,17 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
with Files('**'):
BUG_COMPONENT = ('Core', 'Build Config')
DIST_INSTALL = False
# For sanity's sake, we compile nsinstall without the wrapped system
# headers, so that we can use it to set up the wrapped system headers.
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
CONFIGURE_SUBST_FILES += [
'doxygen.cfg',
'makefiles/test/Makefile',
'tests/src-simple/Makefile',
]
if CONFIG['HOST_OS_ARCH'] != 'WINNT':
--- a/db/sqlite3/src/moz.build
+++ b/db/sqlite3/src/moz.build
@@ -1,14 +1,14 @@
# -*- 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/.
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
EXPORTS += [
'sqlite3.h',
]
# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
--- a/dom/media/gmp-plugin-openh264/moz.build
+++ b/dom/media/gmp-plugin-openh264/moz.build
@@ -20,12 +20,12 @@ SOURCES += [
SharedLibrary("fakeopenh264")
if CONFIG['OS_ARCH'] == 'WINNT':
OS_LIBS += [
'ole32',
]
USE_STATIC_LIBS = True
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
# Don't use STL wrappers; this isn't Gecko code
DisableStlWrapping()
NO_PGO = True
--- a/dom/media/gmp-plugin/moz.build
+++ b/dom/media/gmp-plugin/moz.build
@@ -22,12 +22,12 @@ DEFINES['GMP_FAKE_SUPPORT_DECRYPT'] = Tr
SharedLibrary("fake")
if CONFIG['OS_ARCH'] == 'WINNT':
OS_LIBS += [
'ole32',
]
USE_STATIC_LIBS = True
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
# Don't use STL wrappers; this isn't Gecko code
DisableStlWrapping()
NO_PGO = True
--- a/media/ffvpx/libavcodec/moz.build
+++ b/media/ffvpx/libavcodec/moz.build
@@ -51,17 +51,17 @@ SOURCES += [
'vp9dsp.c',
'vp9dsp_10bpp.c',
'vp9dsp_12bpp.c',
'vp9dsp_8bpp.c',
'xiph.c'
]
SYMBOLS_FILE = 'avcodec.symbols'
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
USE_LIBS += [
'mozavutil'
]
if CONFIG['OS_TARGET'] != 'WINNT':
OS_LIBS += ['m']
--- a/media/ffvpx/libavutil/moz.build
+++ b/media/ffvpx/libavutil/moz.build
@@ -46,15 +46,15 @@ SOURCES += [
'samplefmt.c',
'threadmessage.c',
'time.c',
'timecode.c',
'utils.c',
]
SYMBOLS_FILE = 'avutil.symbols'
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
OS_LIBS += CONFIG['REALTIME_LIBS']
if CONFIG['OS_TARGET'] != 'WINNT':
OS_LIBS += ['m']
include("../ffvpxcommon.mozbuild")
--- a/memory/mozalloc/moz.build
+++ b/memory/mozalloc/moz.build
@@ -1,14 +1,14 @@
# -*- 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/.
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
EXPORTS.mozilla += [
'mozalloc.h',
'mozalloc_abort.h',
'mozalloc_oom.h',
]
if CONFIG['WRAP_STL_INCLUDES']:
--- a/memory/mozalloc/staticruntime/moz.build
+++ b/memory/mozalloc/staticruntime/moz.build
@@ -1,15 +1,15 @@
# -*- 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/.
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
if CONFIG['WRAP_STL_INCLUDES']:
DEFINES['_HAS_EXCEPTIONS'] = 0
if CONFIG['MOZ_MSVC_STL_WRAP_RAISE']:
SOURCES += [
'../msvc_raise_wrappers.cpp',
]
--- a/memory/volatile/moz.build
+++ b/memory/volatile/moz.build
@@ -1,14 +1,14 @@
# -*- 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/.
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
EXPORTS.mozilla += [
'VolatileBuffer.h',
]
if CONFIG['OS_TARGET'] == 'Android':
UNIFIED_SOURCES += [
'VolatileBufferAshmem.cpp',
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -30,17 +30,17 @@ if CONFIG['OS_TARGET'] == 'WINNT':
if not CONFIG['JS_STANDALONE']:
if CONFIG['MOZ_MEMORY'] and FORCE_SHARED_LIB:
pass
# TODO: SHARED_LIBRARY_LIBS go here
else:
# Temporary, until bug 662814 lands
- NO_VISIBILITY_FLAGS = True
+ NoVisibilityFlags()
SOURCES += [
'dummy.cpp',
]
if CONFIG['OS_TARGET'] == 'WINNT':
LOCAL_INCLUDES += [
'/memory/build',
]
--- a/python/mozbuild/mozbuild/frontend/context.py
+++ b/python/mozbuild/mozbuild/frontend/context.py
@@ -1252,20 +1252,16 @@ VARIABLES = {
'LOCAL_INCLUDES': (ContextDerivedTypedList(Path, StrictOrderingOnAppendList), list,
"""Additional directories to be searched for include files by the compiler.
"""),
'NO_PGO': (bool, bool,
"""Whether profile-guided optimization is disable in this directory.
"""),
- 'NO_VISIBILITY_FLAGS': (bool, bool,
- """Build sources listed in this file without VISIBILITY_FLAGS.
- """),
-
'OS_LIBS': (List, list,
"""System link libraries.
This variable contains a list of system libaries to link against.
"""),
'RCFILE': (unicode, unicode,
"""The program .rc file.
@@ -2214,16 +2210,26 @@ DEPRECATION_HINTS = {
Library('foo')
instead of
LIBRARY_NAME = 'foo'
''',
+ 'NO_VISIBILITY_FLAGS': '''
+ Please use
+
+ NoVisibilityFlags()
+
+ instead of
+
+ NO_VISIBILITY_FLAGS = True
+ ''',
+
'PROGRAM': '''
Please use
Program('foo')
instead of
PROGRAM = 'foo'"
--- a/security/manager/ssl/tests/unit/pkcs11testmodule/moz.build
+++ b/security/manager/ssl/tests/unit/pkcs11testmodule/moz.build
@@ -9,12 +9,12 @@ FINAL_TARGET = '_tests/xpcshell/security
UNIFIED_SOURCES += [
'pkcs11testmodule.cpp',
]
SharedLibrary('pkcs11testmodule')
# C_GetFunctionList needs to be exported. As it turns out, it's much easier to
# just export all the symbols.
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
SYMBOLS_FILE = 'pkcs11testmodule.symbols'
NO_PGO = True
--- a/security/moz.build
+++ b/security/moz.build
@@ -98,17 +98,19 @@ else:
GYP_DIRS += ['nss']
GYP_DIRS['nss'].input = 'nss/nss.gyp'
GYP_DIRS['nss'].variables = gyp_vars
sandbox_vars = {
# NSS explicitly exports its public symbols
# with linker scripts.
- 'NO_VISIBILITY_FLAGS': True,
+ 'COMPILE_FLAGS': {
+ 'VISIBILITY': [],
+ },
# XXX: We should fix these warnings.
'ALLOW_COMPILER_WARNINGS': True,
# NSS' build system doesn't currently build NSS with PGO.
# We could probably do so, but not without a lot of
# careful consideration.
'NO_PGO': True,
}
if CONFIG['OS_TARGET'] == 'WINNT':
--- a/toolkit/library/dummydll/moz.build
+++ b/toolkit/library/dummydll/moz.build
@@ -11,10 +11,10 @@ SOURCES += [
'dummydll.cpp',
]
if CONFIG['CPU_ARCH'] == 'x86_64':
GeckoSharedLibrary('qipcap64')
else:
GeckoSharedLibrary('qipcap')
-NO_VISIBILITY_FLAGS = True
+NoVisibilityFlags()
NO_PGO = True