Bug 1806067 [wpt PR 37543] - WebKit export of https://bugs.webkit.org/show_bug.cgi...
[gecko.git] / mfbt / moz.build
blobe77b5e5d366b8f1a67e2eb577dba4f30991efe93
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     "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     "NonDereferenceable.h",
76     "NotNull.h",
77     "Opaque.h",
78     "OperatorNewExtensions.h",
79     "PairHash.h",
80     "Path.h",
81     "PodOperations.h",
82     "Poison.h",
83     "RandomNum.h",
84     "Range.h",
85     "RangedArray.h",
86     "RangedPtr.h",
87     "ReentrancyGuard.h",
88     "RefCounted.h",
89     "RefCountType.h",
90     "RefPtr.h",
91     "Result.h",
92     "ResultExtensions.h",
93     "ResultVariant.h",
94     "ReverseIterator.h",
95     "RollingMean.h",
96     "Saturate.h",
97     "Scoped.h",
98     "ScopeExit.h",
99     "SegmentedVector.h",
100     "SHA1.h",
101     "SharedLibrary.h",
102     "SmallPointerArray.h",
103     "Span.h",
104     "SplayTree.h",
105     "SPSCQueue.h",
106     "StaticAnalysisFunctions.h",
107     "TaggedAnonymousMemory.h",
108     "Tainting.h",
109     "TemplateLib.h",
110     "TextUtils.h",
111     "ThreadLocal.h",
112     "ThreadSafety.h",
113     "ThreadSafeWeakPtr.h",
114     "ToString.h",
115     "Tuple.h",
116     "TypedEnumBits.h",
117     "Types.h",
118     "TypeTraits.h",
119     "UniquePtr.h",
120     "UniquePtrExtensions.h",
121     "Unused.h",
122     "Utf8.h",
123     "Variant.h",
124     "Vector.h",
125     "WeakPtr.h",
126     "WrappingOperations.h",
127     "XorShift128PlusRNG.h",
130 EXPORTS["double-conversion"] = [
131     "double-conversion/double-conversion/double-conversion.h",
132     "double-conversion/double-conversion/double-to-string.h",
133     "double-conversion/double-conversion/string-to-double.h",
134     "double-conversion/double-conversion/utils.h",
137 EXPORTS.function2 += [
138     "/third_party/function2/include/function2/function2.hpp",
141 LOCAL_INCLUDES += [
142     "/mfbt/double-conversion",
145 if CONFIG["OS_ARCH"] == "WINNT":
146     EXPORTS.mozilla += [
147         "WindowsVersion.h",
148     ]
150 if CONFIG["OS_ARCH"] == "WASI":
151     EXPORTS.mozilla += [
152         "WasiAtomic.h",
153     ]
155 if CONFIG["MOZ_TSAN"]:
156     EXPORTS.mozilla += [
157         "TsanOptions.h",
158     ]
160 UNIFIED_SOURCES += [
161     "Assertions.cpp",
162     "ChaosMode.cpp",
163     "Compression.cpp",
164     "double-conversion/double-conversion/bignum-dtoa.cc",
165     "double-conversion/double-conversion/bignum.cc",
166     "double-conversion/double-conversion/cached-powers.cc",
167     "double-conversion/double-conversion/double-to-string.cc",
168     "double-conversion/double-conversion/fast-dtoa.cc",
169     "double-conversion/double-conversion/fixed-dtoa.cc",
170     "double-conversion/double-conversion/string-to-double.cc",
171     "double-conversion/double-conversion/strtod.cc",
172     "FloatingPoint.cpp",
173     "HashFunctions.cpp",
174     "JSONWriter.cpp",
175     "Poison.cpp",
176     "RandomNum.cpp",
177     "SHA1.cpp",
178     "TaggedAnonymousMemory.cpp",
179     "UniquePtrExtensions.cpp",
180     "Unused.cpp",
181     "Utf8.cpp",
184 if CONFIG["MOZ_BUILD_APP"] not in (
185     "memory",
186     "tools/update-programs",
188     # Building MFBT tests adds a large overhead when building.
189     TEST_DIRS += ["tests"]
191 DEFINES["IMPL_MFBT"] = True
193 SOURCES += [
194     "lz4/lz4.c",
195     "lz4/lz4file.c",
196     "lz4/lz4frame.c",
197     "lz4/lz4hc.c",
198     "lz4/xxhash.c",
201 SOURCES["lz4/xxhash.c"].flags += ["-Wno-unused-function"]
203 DisableStlWrapping()
205 if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
206     OS_LIBS += ["atomic"]
208 DEFINES["LZ4LIB_VISIBILITY"] = ""
210 REQUIRES_UNIFIED_BUILD = True