Bug 1807268 - Fix verifyOpenAllInNewTabsOptionTest UI test r=ohorvath
[gecko.git] / mfbt / moz.build
blobc1f9a8f92a97d238d3a7ded0e9dc7457c7f1996f
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     "MPSCQueue.h",
77     "MruCache.h",
78     "NeverDestroyed.h",
79     "NonDereferenceable.h",
80     "NotNull.h",
81     "Opaque.h",
82     "OperatorNewExtensions.h",
83     "PairHash.h",
84     "Path.h",
85     "PodOperations.h",
86     "Poison.h",
87     "RandomNum.h",
88     "Range.h",
89     "RangedArray.h",
90     "RangedPtr.h",
91     "ReentrancyGuard.h",
92     "RefCounted.h",
93     "RefCountType.h",
94     "RefPtr.h",
95     "Result.h",
96     "ResultExtensions.h",
97     "ResultVariant.h",
98     "ReverseIterator.h",
99     "RollingMean.h",
100     "Saturate.h",
101     "ScopeExit.h",
102     "SegmentedVector.h",
103     "SHA1.h",
104     "SharedLibrary.h",
105     "SmallPointerArray.h",
106     "Span.h",
107     "SplayTree.h",
108     "SPSCQueue.h",
109     "StaticAnalysisFunctions.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",
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",
139 EXPORTS.function2 += [
140     "/third_party/function2/include/function2/function2.hpp",
143 LOCAL_INCLUDES += [
144     "/mfbt/double-conversion",
147 if CONFIG["OS_ARCH"] == "WINNT":
148     EXPORTS.mozilla += [
149         "WindowsVersion.h",
150     ]
152 if CONFIG["OS_ARCH"] == "WASI":
153     EXPORTS.mozilla += [
154         "WasiAtomic.h",
155     ]
157 if CONFIG["MOZ_TSAN"]:
158     EXPORTS.mozilla += [
159         "TsanOptions.h",
160     ]
162 UNIFIED_SOURCES += [
163     "Assertions.cpp",
164     "ChaosMode.cpp",
165     "Compression.cpp",
166     "double-conversion/double-conversion/bignum-dtoa.cc",
167     "double-conversion/double-conversion/bignum.cc",
168     "double-conversion/double-conversion/cached-powers.cc",
169     "double-conversion/double-conversion/double-to-string.cc",
170     "double-conversion/double-conversion/fast-dtoa.cc",
171     "double-conversion/double-conversion/fixed-dtoa.cc",
172     "double-conversion/double-conversion/string-to-double.cc",
173     "double-conversion/double-conversion/strtod.cc",
174     "FloatingPoint.cpp",
175     "HashFunctions.cpp",
176     "JSONWriter.cpp",
177     "Poison.cpp",
178     "RandomNum.cpp",
179     "SHA1.cpp",
180     "TaggedAnonymousMemory.cpp",
181     "UniquePtrExtensions.cpp",
182     "Unused.cpp",
183     "Utf8.cpp",
186 if CONFIG["MOZ_BUILD_APP"] not in (
187     "memory",
188     "tools/update-programs",
190     # Building MFBT tests adds a large overhead when building.
191     TEST_DIRS += ["tests"]
193 DEFINES["IMPL_MFBT"] = True
195 SOURCES += [
196     "lz4/lz4.c",
197     "lz4/lz4file.c",
198     "lz4/lz4frame.c",
199     "lz4/lz4hc.c",
200     "lz4/xxhash.c",
203 SOURCES["lz4/xxhash.c"].flags += ["-Wno-unused-function"]
205 DisableStlWrapping()
207 if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
208     OS_LIBS += ["atomic"]
210 DEFINES["LZ4LIB_VISIBILITY"] = ""
212 # This is kind of gross because this is not a subdirectory,
213 # but pure_virtual requires mfbt to build and some projects
214 # don't use mfbt.
215 DIRS += ["../build/pure_virtual"]