Debian Codegraph @

mfbt/moz.build

raw
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7 with Files("**"):
8 BUG_COMPONENT = ("Core", "MFBT")
9
10 Library("mfbt")
11
12 EXPORTS += [
13 "../third_party/rust/encoding_c_mem/include/encoding_rs_mem.h",
14 ]
15
16 EXPORTS.mozilla = [
17 "Algorithm.h",
18 "Alignment.h",
19 "AllocPolicy.h",
20 "AlreadyAddRefed.h",
21 "Array.h",
22 "ArrayUtils.h",
23 "Assertions.h",
24 "AtomicBitfields.h",
25 "Atomics.h",
26 "Attributes.h",
27 "BinarySearch.h",
28 "BitSet.h",
29 "BloomFilter.h",
30 "Buffer.h",
31 "BufferList.h",
32 "Casting.h",
33 "ChaosMode.h",
34 "Char16.h",
35 "CheckedInt.h",
36 "CompactPair.h",
37 "Compiler.h",
38 "DbgMacro.h",
39 "DebugOnly.h",
40 "DefineEnum.h",
41 "DoublyLinkedList.h",
42 "EndianUtils.h",
43 "EnumeratedArray.h",
44 "EnumeratedRange.h",
45 "EnumSet.h",
46 "EnumTypeTraits.h",
47 "fallible.h",
48 "FastBernoulliTrial.h",
49 "FloatingPoint.h",
50 "FStream.h",
51 "FunctionRef.h",
52 "FunctionTypeTraits.h",
53 "Fuzzing.h",
54 "HashFunctions.h",
55 "HashTable.h",
56 "HelperMacros.h",
57 "InitializedOnce.h",
58 "IntegerRange.h",
59 "IntegerTypeTraits.h",
60 "JSONWriter.h",
61 "JsRust.h",
62 "Latin1.h",
63 "Likely.h",
64 "LinkedList.h",
65 "Literals.h",
66 "MacroArgs.h",
67 "MacroForEach.h",
68 "MathAlgorithms.h",
69 "Maybe.h",
70 "MaybeOneOf.h",
71 "MaybeStorageBase.h",
72 "MemoryChecking.h",
73 "MemoryReporting.h",
74 "MoveOnlyFunction.h",
75 "MPSCQueue.h",
76 "MruCache.h",
77 "NeverDestroyed.h",
78 "NonDereferenceable.h",
79 "NotNull.h",
80 "Opaque.h",
81 "OperatorNewExtensions.h",
82 "PairHash.h",
83 "Path.h",
84 "PodOperations.h",
85 "Poison.h",
86 "RandomNum.h",
87 "Range.h",
88 "RangedArray.h",
89 "RangedPtr.h",
90 "ReentrancyGuard.h",
91 "RefCounted.h",
92 "RefCountType.h",
93 "RefPtr.h",
94 "Result.h",
95 "ResultExtensions.h",
96 "ResultVariant.h",
97 "ReverseIterator.h",
98 "RollingMean.h",
99 "Saturate.h",
100 "ScopeExit.h",
101 "SegmentedVector.h",
102 "SHA1.h",
103 "SharedLibrary.h",
104 "SmallPointerArray.h",
105 "Span.h",
106 "SplayTree.h",
107 "SPSCQueue.h",
108 "StaticAnalysisFunctions.h",
109 "StringBuffer.h",
110 "TaggedAnonymousMemory.h",
111 "Tainting.h",
112 "TemplateLib.h",
113 "TextUtils.h",
114 "ThreadLocal.h",
115 "ThreadSafety.h",
116 "ThreadSafeWeakPtr.h",
117 "ToString.h",
118 "Try.h",
119 "TypedEnumBits.h",
120 "Types.h",
121 "UniquePtr.h",
122 "UniquePtrExtensions.h",
123 "Unused.h",
124 "Utf8.h",
125 "Variant.h",
126 "Vector.h",
127 "WeakPtr.h",
128 "WrappingOperations.h",
129 "XorShift128PlusRNG.h",
130 ]
131
132 EXPORTS["double-conversion"] = [
133 "double-conversion/double-conversion/double-conversion.h",
134 "double-conversion/double-conversion/double-to-string.h",
135 "double-conversion/double-conversion/string-to-double.h",
136 "double-conversion/double-conversion/utils.h",
137 ]
138
139 EXPORTS.function2 += [
140 "/third_party/function2/include/function2/function2.hpp",
141 ]
142
143 LOCAL_INCLUDES += [
144 "/mfbt/double-conversion",
145 ]
146
147 if CONFIG["OS_ARCH"] == "WINNT":
148 EXPORTS.mozilla += [
149 "WindowsVersion.h",
150 ]
151
152 if CONFIG["OS_ARCH"] == "WASI":
153 EXPORTS.mozilla += [
154 "WasiAtomic.h",
155 ]
156
157 UNIFIED_SOURCES += [
158 "Assertions.cpp",
159 "ChaosMode.cpp",
160 "double-conversion/double-conversion/bignum-dtoa.cc",
161 "double-conversion/double-conversion/bignum.cc",
162 "double-conversion/double-conversion/cached-powers.cc",
163 "double-conversion/double-conversion/double-to-string.cc",
164 "double-conversion/double-conversion/fast-dtoa.cc",
165 "double-conversion/double-conversion/fixed-dtoa.cc",
166 "double-conversion/double-conversion/string-to-double.cc",
167 "double-conversion/double-conversion/strtod.cc",
168 "FloatingPoint.cpp",
169 "HashFunctions.cpp",
170 "JSONWriter.cpp",
171 "Poison.cpp",
172 "RandomNum.cpp",
173 "RefCounted.cpp",
174 "SHA1.cpp",
175 "TaggedAnonymousMemory.cpp",
176 "UniquePtrExtensions.cpp",
177 "Unused.cpp",
178 "Utf8.cpp",
179 ]
180
181 if CONFIG["MOZ_BUILD_APP"] not in (
182 "memory",
183 "tools/update-programs",
184 ):
185 # Building MFBT tests adds a large overhead when building.
186 TEST_DIRS += ["tests"]
187
188 DEFINES["IMPL_MFBT"] = True
189
190 DisableStlWrapping()
191
192 OS_LIBS += CONFIG["LIBATOMIC_LIBS"]
193
194 # For RefCounted.cpp
195 DEFINES["MOZ_SUPPORT_LEAKCHECKING"] = True
196
197 # This is kind of gross because this is not a subdirectory,
198 # but pure_virtual requires mfbt to build and some projects
199 # don't use mfbt.
200 DIRS += ["../build/pure_virtual"]
201
202 if CONFIG["MOZ_BUILD_APP"] != "memory":
203 FINAL_LIBRARY = "mozglue"