mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-26 11:45:37 +00:00
7f48d0bdd3
The tarball that was imported is the 3.4.1 release: https://github.com/google/protobuf/releases/tag/v3.4.1 https://github.com/google/protobuf/releases/download/v3.4.1/protobuf-cpp-3.4.1.tar.gz This drops all of the customizations that are no longer needed, which includes a few issues that were fixed upstream: - r512.patch from bug 892856: https://searchfox.org/mozilla-central/rev/bab9dbe9c4ef71f71fb07e53b701fb2dfde277d9/toolkit/components/protobuf/r512.patchb04e5cba35/src/google/protobuf/io/zero_copy_stream_impl.cc (L43)
- vs2013.patch, also from bug 892856: https://searchfox.org/mozilla-central/rev/bab9dbe9c4ef71f71fb07e53b701fb2dfde277d9/toolkit/components/protobuf/vs2013.patchb04e5cba35/src/google/protobuf/wire_format_lite_inl.h (L39)
- sparc64 fixes in m-c-changes.patch from bug 1275204: https://hg.mozilla.org/integration/mozilla-inbound/rev/21d692e82582b04e5cba35/src/google/protobuf/stubs/platform_macros.h (L68)
The LOGLEVEL_ERROR hack in m-c-changes.patch from bug1024774
and bug 1320179 was replaced by a NOGDI define in moz.build as suggested by upstream: https://github.com/google/protobuf/pull/3745/files#r144915445 The other customizations that were dropped came from bug1024774
. The patch for OpenBSD/32-bit will likely be fixed upstream in a future release: https://github.com/google/protobuf/pull/3747#issuecomment-336581244 Upgrading the protobuf library also required re-generating all of the existing .pb.h and pb.cc files (they are neither forward nor backward-compatible) and making adjustments to the build config to make it compile (and silence warnings). text_format.cc can now be compiled as part of UNIFIED_SOURCES. MozReview-Commit-ID: 7F2IqFmwQnN --HG-- extra : rebase_source : b907a28a8063ecd82bb38530d309faafc7b83175
97 lines
2.3 KiB
Python
97 lines
2.3 KiB
Python
# -*- 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/.
|
|
|
|
with Files('**'):
|
|
BUG_COMPONENT = ('Toolkit', 'Safe Browsing')
|
|
|
|
TEST_DIRS += ['tests']
|
|
|
|
XPIDL_SOURCES += [
|
|
'IUrlClassifierUITelemetry.idl',
|
|
'nsIUrlClassifierDBService.idl',
|
|
'nsIUrlClassifierHashCompleter.idl',
|
|
'nsIUrlClassifierInfo.idl',
|
|
'nsIUrlClassifierPrefixSet.idl',
|
|
'nsIUrlClassifierStreamUpdater.idl',
|
|
'nsIUrlClassifierUtils.idl',
|
|
'nsIUrlListManager.idl',
|
|
]
|
|
|
|
XPIDL_MODULE = 'url-classifier'
|
|
|
|
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
|
|
DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
|
|
|
|
UNIFIED_SOURCES += [
|
|
'chromium/safebrowsing.pb.cc',
|
|
'ChunkSet.cpp',
|
|
'Classifier.cpp',
|
|
'LookupCache.cpp',
|
|
'LookupCacheV4.cpp',
|
|
'nsCheckSummedOutputStream.cpp',
|
|
'nsUrlClassifierDBService.cpp',
|
|
'nsUrlClassifierInfo.cpp',
|
|
'nsUrlClassifierProxies.cpp',
|
|
'nsUrlClassifierUtils.cpp',
|
|
'ProtocolParser.cpp',
|
|
'RiceDeltaDecoder.cpp',
|
|
'UrlClassifierTelemetryUtils.cpp',
|
|
]
|
|
|
|
# define conflicting LOG() macros
|
|
SOURCES += [
|
|
'nsUrlClassifierPrefixSet.cpp',
|
|
'nsUrlClassifierStreamUpdater.cpp',
|
|
'VariableLengthPrefixSet.cpp',
|
|
]
|
|
|
|
# contains variables that conflict with LookupCache.cpp
|
|
SOURCES += [
|
|
'HashStore.cpp',
|
|
]
|
|
|
|
EXTRA_COMPONENTS += [
|
|
'nsURLClassifier.manifest',
|
|
'nsUrlClassifierHashCompleter.js',
|
|
'nsUrlClassifierLib.js',
|
|
'nsUrlClassifierListManager.js',
|
|
]
|
|
|
|
EXTRA_JS_MODULES += [
|
|
'SafeBrowsing.jsm',
|
|
]
|
|
|
|
EXPORTS += [
|
|
'chromium/safebrowsing.pb.h',
|
|
'Entries.h',
|
|
'LookupCache.h',
|
|
'LookupCacheV4.h',
|
|
'nsUrlClassifierPrefixSet.h',
|
|
'VariableLengthPrefixSet.h',
|
|
]
|
|
|
|
FINAL_LIBRARY = 'xul'
|
|
|
|
LOCAL_INCLUDES += [
|
|
'../build',
|
|
]
|
|
|
|
CXXFLAGS += CONFIG['SQLITE_CFLAGS']
|
|
|
|
if CONFIG['GNU_CXX']:
|
|
CXXFLAGS += ['-Wno-error=shadow']
|
|
# Suppress warnings in third-party code.
|
|
CXXFLAGS += [
|
|
'-Wno-maybe-uninitialized',
|
|
]
|
|
|
|
if CONFIG['NIGHTLY_BUILD'] or CONFIG['MOZ_DEBUG']:
|
|
DEFINES['MOZ_SAFEBROWSING_DUMP_FAILED_UPDATES'] = True
|
|
|
|
SPHINX_TREES['url-classifier'] = 'docs'
|
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|