1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
# -*- 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/.
Library('protobuf')
with Files('**'):
BUG_COMPONENT = ('Core', 'General')
EXPORTS.google.protobuf += [
'src/google/protobuf/any.h',
'src/google/protobuf/arena.h',
'src/google/protobuf/arena_impl.h',
'src/google/protobuf/arenastring.h',
'src/google/protobuf/arenaz_sampler.h',
'src/google/protobuf/endian.h',
'src/google/protobuf/explicitly_constructed.h',
'src/google/protobuf/extension_set.h',
'src/google/protobuf/extension_set_inl.h',
'src/google/protobuf/generated_enum_util.h',
'src/google/protobuf/generated_message_tctable_decl.h',
'src/google/protobuf/generated_message_tctable_impl.h',
'src/google/protobuf/generated_message_util.h',
'src/google/protobuf/has_bits.h',
'src/google/protobuf/implicit_weak_message.h',
'src/google/protobuf/inlined_string_field.h',
'src/google/protobuf/map.h',
'src/google/protobuf/map_entry_lite.h',
'src/google/protobuf/map_field_lite.h',
'src/google/protobuf/map_type_handler.h',
'src/google/protobuf/message_lite.h',
'src/google/protobuf/metadata_lite.h',
'src/google/protobuf/parse_context.h',
'src/google/protobuf/port.h',
'src/google/protobuf/port_def.inc',
'src/google/protobuf/port_undef.inc',
'src/google/protobuf/repeated_field.h',
'src/google/protobuf/repeated_ptr_field.h',
'src/google/protobuf/wire_format_lite.h',
]
EXPORTS.google.protobuf.io += [
'src/google/protobuf/io/coded_stream.h',
'src/google/protobuf/io/gzip_stream.h',
'src/google/protobuf/io/io_win32.h',
'src/google/protobuf/io/strtod.h',
'src/google/protobuf/io/zero_copy_stream.h',
'src/google/protobuf/io/zero_copy_stream_impl.h',
'src/google/protobuf/io/zero_copy_stream_impl_lite.h',
]
EXPORTS.google.protobuf.stubs += [
'src/google/protobuf/stubs/bytestream.h',
'src/google/protobuf/stubs/callback.h',
'src/google/protobuf/stubs/casts.h',
'src/google/protobuf/stubs/common.h',
'src/google/protobuf/stubs/hash.h',
'src/google/protobuf/stubs/int128.h',
'src/google/protobuf/stubs/logging.h',
'src/google/protobuf/stubs/macros.h',
'src/google/protobuf/stubs/map_util.h',
'src/google/protobuf/stubs/mutex.h',
'src/google/protobuf/stubs/once.h',
'src/google/protobuf/stubs/platform_macros.h',
'src/google/protobuf/stubs/port.h',
'src/google/protobuf/stubs/status.h',
# 'src/google/protobuf/stubs/statusor.h', # Unused file
'src/google/protobuf/stubs/stl_util.h',
'src/google/protobuf/stubs/stringpiece.h',
'src/google/protobuf/stubs/stringprintf.h',
'src/google/protobuf/stubs/strutil.h',
'src/google/protobuf/stubs/time.h',
]
UNIFIED_SOURCES += [
# 'src/google/protobuf/any_lite.cc', # Unused file
'src/google/protobuf/arena.cc',
'src/google/protobuf/arenastring.cc',
# 'src/google/protobuf/arenaz_sampler.cc', # Unused file
# 'src/google/protobuf/io/strtod.cc', # Unused file
'src/google/protobuf/io/zero_copy_stream.cc',
'src/google/protobuf/stubs/stringpiece.cc',
'src/google/protobuf/stubs/structurally_valid.cc',
'src/google/protobuf/stubs/strutil.cc',
]
SOURCES += [
'src/google/protobuf/extension_set.cc', # port_def conflicts
'src/google/protobuf/generated_enum_util.cc', # port_def conflicts
'src/google/protobuf/generated_message_tctable_lite.cc',
'src/google/protobuf/generated_message_util.cc', # port_def conflicts
'src/google/protobuf/implicit_weak_message.cc', # port_def conflicts
# 'src/google/protobuf/inlined_string_field.cc', # Unused file # port_def conflicts
'src/google/protobuf/io/coded_stream.cc', # port_def conflicts
'src/google/protobuf/io/gzip_stream.cc', # technically not in libprotobuf-lite.cmake but devtools/shared/heapsnapshot/HeapSnapshot.cpp uses it.
'src/google/protobuf/io/io_win32.cc', # port_def conflicts
'src/google/protobuf/io/zero_copy_stream_impl.cc', # port_def conflicts
'src/google/protobuf/io/zero_copy_stream_impl_lite.cc', # port_def conflicts
'src/google/protobuf/map.cc', # port_def conflicts
'src/google/protobuf/message_lite.cc', # port_def conflicts
'src/google/protobuf/parse_context.cc', # port_def conflicts
'src/google/protobuf/repeated_field.cc', # port_def conflicts
'src/google/protobuf/repeated_ptr_field.cc', # port_def conflicts
# 'src/google/protobuf/stubs/bytestream.cc', # Unused file # port_def conflicts
'src/google/protobuf/stubs/common.cc', # port_def conflicts
'src/google/protobuf/stubs/int128.cc', # port_def conflicts
'src/google/protobuf/stubs/status.cc', # port_def conflicts
# 'src/google/protobuf/stubs/statusor.cc', # Unused file. # port_def conflicts
# 'src/google/protobuf/stubs/stringprintf.cc', # Unused file # port_def conflicts
# 'src/google/protobuf/stubs/time.cc', # Unused file # GetCurrentTime conflict in winbase.h
'src/google/protobuf/wire_format_lite.cc', # port_def conflicts
]
# We allow warnings for third-party code that can be updated from upstream.
AllowCompilerWarnings()
FINAL_LIBRARY = 'xul'
DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True
# Suppress warnings in third-party code.
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
CXXFLAGS += [
'-Wno-ignored-qualifiers',
'-Wno-maybe-uninitialized',
'-Wno-return-type',
'-Wno-sign-compare',
'-Wno-subobject-linkage',
'-Wno-unused-function',
]
if CONFIG['CC_TYPE'] == 'clang':
CXXFLAGS += [
'-Wno-comma',
'-Wno-null-conversion',
'-Wno-unused-local-typedef',
]
elif CONFIG['CC_TYPE'] == 'clang-cl':
CXXFLAGS += [
'-Wno-macro-redefined', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
'-Wno-sign-compare',
]
if CONFIG['OS_TARGET'] == 'WINNT':
DEFINES['NOGDI'] = True # wingdi.h defines ERROR as 0 and conflicts with logging.h
if CONFIG['MOZ_USE_PTHREADS']:
DEFINES['HAVE_PTHREAD'] = True
# Needed for the gzip streams.
DEFINES['HAVE_ZLIB'] = True
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
CXXFLAGS += CONFIG['MOZ_GTK3_CFLAGS']
# Work around bug 1841201.
if CONFIG['TARGET_CPU'] in ('mips32', 'mips64'):
DEFINES['musttail'] = 'nomusttail'
|