Backed out 7 changesets (bug 1839993) for causing build bustages on DecoderTemplate...
[gecko.git] / mfbt / moz.build
blob3a3ab46f7142e4adfb094fd9c25658f091dee22a
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/.
7 with Files("**"):
8     BUG_COMPONENT = ("Core", "MFBT")
10 Library("mfbt")
12 EXPORTS += [
13     "../third_party/rust/encoding_c_mem/include/encoding_rs_mem.h",
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     "Compression.h",
39     "DbgMacro.h",
40     "DebugOnly.h",
41     "DefineEnum.h",
42     "DoublyLinkedList.h",
43     "EndianUtils.h",
44     "EnumeratedArray.h",
45     "EnumeratedRange.h",
46     "EnumSet.h",
47     "EnumTypeTraits.h",
48     "fallible.h",
49     "FastBernoulliTrial.h",
50     "FloatingPoint.h",
51     "FStream.h",
52     "FunctionRef.h",
53     "FunctionTypeTraits.h",
54     "Fuzzing.h",
55     "HashFunctions.h",
56     "HashTable.h",
57     "HelperMacros.h",
58     "InitializedOnce.h",
59     "IntegerRange.h",
60     "IntegerTypeTraits.h",
61     "JSONWriter.h",
62     "JsRust.h",
63     "Latin1.h",
64     "Likely.h",
65     "LinkedList.h",
66     "Literals.h",
67     "MacroArgs.h",
68     "MacroForEach.h",
69     "MathAlgorithms.h",
70     "Maybe.h",
71     "MaybeOneOf.h",
72     "MaybeStorageBase.h",
73     "MemoryChecking.h",
74     "MemoryReporting.h",
75     "MoveOnlyFunction.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     "TaggedAnonymousMemory.h",
110     "Tainting.h",
111     "TemplateLib.h",
112     "TextUtils.h",
113     "ThreadLocal.h",
114     "ThreadSafety.h",
115     "ThreadSafeWeakPtr.h",
116     "ToString.h",
117     "Try.h",
118     "TypedEnumBits.h",
119     "Types.h",
120     "UniquePtr.h",
121     "UniquePtrExtensions.h",
122     "Unused.h",
123     "Utf8.h",
124     "Variant.h",
125     "Vector.h",
126     "WeakPtr.h",
127     "WrappingOperations.h",
128     "XorShift128PlusRNG.h",
131 EXPORTS["double-conversion"] = [
132     "double-conversion/double-conversion/double-conversion.h",
133     "double-conversion/double-conversion/double-to-string.h",
134     "double-conversion/double-conversion/string-to-double.h",
135     "double-conversion/double-conversion/utils.h",
138 EXPORTS.function2 += [
139     "/third_party/function2/include/function2/function2.hpp",
142 LOCAL_INCLUDES += [
143     "/mfbt/double-conversion",
146 if CONFIG["OS_ARCH"] == "WINNT":
147     EXPORTS.mozilla += [
148         "WindowsVersion.h",
149     ]
151 if CONFIG["OS_ARCH"] == "WASI":
152     EXPORTS.mozilla += [
153         "WasiAtomic.h",
154     ]
156 if CONFIG["MOZ_TSAN"]:
157     EXPORTS.mozilla += [
158         "TsanOptions.h",
159     ]
161 UNIFIED_SOURCES += [
162     "Assertions.cpp",
163     "ChaosMode.cpp",
164     "Compression.cpp",
165     "double-conversion/double-conversion/bignum-dtoa.cc",
166     "double-conversion/double-conversion/bignum.cc",
167     "double-conversion/double-conversion/cached-powers.cc",
168     "double-conversion/double-conversion/double-to-string.cc",
169     "double-conversion/double-conversion/fast-dtoa.cc",
170     "double-conversion/double-conversion/fixed-dtoa.cc",
171     "double-conversion/double-conversion/string-to-double.cc",
172     "double-conversion/double-conversion/strtod.cc",
173     "FloatingPoint.cpp",
174     "HashFunctions.cpp",
175     "JSONWriter.cpp",
176     "Poison.cpp",
177     "RandomNum.cpp",
178     "SHA1.cpp",
179     "TaggedAnonymousMemory.cpp",
180     "UniquePtrExtensions.cpp",
181     "Unused.cpp",
182     "Utf8.cpp",
185 if CONFIG["MOZ_BUILD_APP"] not in (
186     "memory",
187     "tools/update-programs",
189     # Building MFBT tests adds a large overhead when building.
190     TEST_DIRS += ["tests"]
192 DEFINES["IMPL_MFBT"] = True
194 SOURCES += [
195     "lz4/lz4.c",
196     "lz4/lz4file.c",
197     "lz4/lz4frame.c",
198     "lz4/lz4hc.c",
199     "lz4/xxhash.c",
202 SOURCES["lz4/xxhash.c"].flags += ["-Wno-unused-function"]
204 DisableStlWrapping()
206 if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
207     OS_LIBS += ["atomic"]
209 DEFINES["LZ4LIB_VISIBILITY"] = ""
211 # This is kind of gross because this is not a subdirectory,
212 # but pure_virtual requires mfbt to build and some projects
213 # don't use mfbt.
214 DIRS += ["../build/pure_virtual"]