summaryrefslogtreecommitdiffstats
path: root/toolkit/components/protobuf/moz.build
blob: 8cca3514c58f33ef5d933a6543408ef7775de2dc (plain)
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
# -*- 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/.

EXPORTS.google.protobuf += [
    'src/google/protobuf/descriptor.h',
    'src/google/protobuf/descriptor.pb.h',
    'src/google/protobuf/descriptor_database.h',
    'src/google/protobuf/dynamic_message.h',
    'src/google/protobuf/extension_set.h',
    'src/google/protobuf/generated_enum_reflection.h',
    'src/google/protobuf/generated_message_reflection.h',
    'src/google/protobuf/generated_message_util.h',
    'src/google/protobuf/message.h',
    'src/google/protobuf/message_lite.h',
    'src/google/protobuf/package_info.h',
    'src/google/protobuf/reflection_ops.h',
    'src/google/protobuf/repeated_field.h',
    'src/google/protobuf/service.h',
    'src/google/protobuf/text_format.h',
    'src/google/protobuf/unknown_field_set.h',
    'src/google/protobuf/wire_format.h',
    'src/google/protobuf/wire_format_lite.h',
    'src/google/protobuf/wire_format_lite_inl.h',
]

EXPORTS.google.protobuf.io += [
    'src/google/protobuf/io/coded_stream.h',
    'src/google/protobuf/io/coded_stream_inl.h',
    'src/google/protobuf/io/gzip_stream.h',
    'src/google/protobuf/io/package_info.h',
    'src/google/protobuf/io/printer.h',
    'src/google/protobuf/io/strtod.h',
    'src/google/protobuf/io/tokenizer.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/atomicops.h',
    'src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h',
    'src/google/protobuf/stubs/atomicops_internals_arm_gcc.h',
    'src/google/protobuf/stubs/atomicops_internals_arm_qnx.h',
    'src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h',
    'src/google/protobuf/stubs/atomicops_internals_generic_gcc.h',
    'src/google/protobuf/stubs/atomicops_internals_macosx.h',
    'src/google/protobuf/stubs/atomicops_internals_mips_gcc.h',
    'src/google/protobuf/stubs/atomicops_internals_pnacl.h',
    'src/google/protobuf/stubs/atomicops_internals_solaris.h',
    'src/google/protobuf/stubs/atomicops_internals_tsan.h',
    'src/google/protobuf/stubs/atomicops_internals_x86_gcc.h',
    'src/google/protobuf/stubs/atomicops_internals_x86_msvc.h',
    'src/google/protobuf/stubs/common.h',
    'src/google/protobuf/stubs/hash.h',
    'src/google/protobuf/stubs/map_util.h',
    'src/google/protobuf/stubs/once.h',
    'src/google/protobuf/stubs/platform_macros.h',
    'src/google/protobuf/stubs/shared_ptr.h',
    'src/google/protobuf/stubs/stl_util.h',
    'src/google/protobuf/stubs/stringprintf.h',
    'src/google/protobuf/stubs/strutil.h',
    'src/google/protobuf/stubs/substitute.h',
    'src/google/protobuf/stubs/template_util.h',
    'src/google/protobuf/stubs/type_traits.h',
]

UNIFIED_SOURCES += [
    'src/google/protobuf/descriptor.cc',
    'src/google/protobuf/descriptor.pb.cc',
    'src/google/protobuf/descriptor_database.cc',
    'src/google/protobuf/dynamic_message.cc',
    'src/google/protobuf/extension_set.cc',
    'src/google/protobuf/generated_message_reflection.cc',
    'src/google/protobuf/generated_message_util.cc',
    'src/google/protobuf/io/coded_stream.cc',
    'src/google/protobuf/io/gzip_stream.cc',
    'src/google/protobuf/io/printer.cc',
    'src/google/protobuf/io/strtod.cc',
    'src/google/protobuf/io/tokenizer.cc',
    'src/google/protobuf/io/zero_copy_stream.cc',
    'src/google/protobuf/io/zero_copy_stream_impl.cc',
    'src/google/protobuf/io/zero_copy_stream_impl_lite.cc',
    'src/google/protobuf/message.cc',
    'src/google/protobuf/message_lite.cc',
    'src/google/protobuf/reflection_ops.cc',
    'src/google/protobuf/repeated_field.cc',
    'src/google/protobuf/service.cc',
    'src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc',
    'src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc',
    'src/google/protobuf/stubs/common.cc',
    'src/google/protobuf/stubs/once.cc',
    'src/google/protobuf/stubs/stringprintf.cc',
    'src/google/protobuf/stubs/structurally_valid.cc',
    'src/google/protobuf/stubs/strutil.cc',
    'src/google/protobuf/stubs/substitute.cc',
    'src/google/protobuf/unknown_field_set.cc',
    'src/google/protobuf/wire_format_lite.cc',
]

SOURCES += [
    'src/google/protobuf/extension_set_heavy.cc',
    'src/google/protobuf/text_format.cc',
    'src/google/protobuf/wire_format.cc',
]

# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True

FINAL_LIBRARY = 'xul'

DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True

# Suppress warnings in third-party code.
if CONFIG['GNU_CXX']:
    CXXFLAGS += [
        '-Wno-return-type',
        '-Wno-sign-compare',
    ]
    if CONFIG['CLANG_CXX']:
        CXXFLAGS += [
            '-Wno-null-conversion',
        ]
elif CONFIG['_MSC_VER']:
    CXXFLAGS += [
        '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition
        '-wd4018', # '<' : signed/unsigned mismatch
        '-wd4099', # mismatched class/struct tags
    ]

if CONFIG['MOZ_USE_PTHREADS']:
    DEFINES['HAVE_PTHREAD'] = True

# Needed for the gzip streams.
DEFINES['HAVE_ZLIB'] = True

CXXFLAGS += CONFIG['TK_CFLAGS']