Bug 1714154 [wpt PR 29187] - Fix OOF fragments to be up-to-date under certain conditi...
[gecko.git] / mfbt / moz.build
blob3598374dcc29a8e1b76f40c00b8beb217cf06673
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     "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     "MacroArgs.h",
66     "MacroForEach.h",
67     "MathAlgorithms.h",
68     "Maybe.h",
69     "MaybeOneOf.h",
70     "MaybeStorageBase.h",
71     "MemoryChecking.h",
72     "MemoryReporting.h",
73     "NonDereferenceable.h",
74     "NotNull.h",
75     "Opaque.h",
76     "OperatorNewExtensions.h",
77     "PairHash.h",
78     "Path.h",
79     "PodOperations.h",
80     "Poison.h",
81     "RandomNum.h",
82     "Range.h",
83     "RangedArray.h",
84     "RangedPtr.h",
85     "ReentrancyGuard.h",
86     "RefCounted.h",
87     "RefCountType.h",
88     "RefPtr.h",
89     "Result.h",
90     "ResultExtensions.h",
91     "ResultVariant.h",
92     "ReverseIterator.h",
93     "RollingMean.h",
94     "Saturate.h",
95     "Scoped.h",
96     "ScopeExit.h",
97     "SegmentedVector.h",
98     "SHA1.h",
99     "SharedLibrary.h",
100     "SmallPointerArray.h",
101     "Span.h",
102     "SplayTree.h",
103     "SPSCQueue.h",
104     "StaticAnalysisFunctions.h",
105     "TaggedAnonymousMemory.h",
106     "Tainting.h",
107     "TemplateLib.h",
108     "TextUtils.h",
109     "ThreadLocal.h",
110     "ThreadSafeWeakPtr.h",
111     "ToString.h",
112     "Tuple.h",
113     "TypedEnumBits.h",
114     "Types.h",
115     "TypeTraits.h",
116     "UniquePtr.h",
117     "UniquePtrExtensions.h",
118     "Unused.h",
119     "Utf8.h",
120     "Variant.h",
121     "Vector.h",
122     "WeakPtr.h",
123     "WrappingOperations.h",
124     "XorShift128PlusRNG.h",
127 EXPORTS["double-conversion"] = [
128     "double-conversion/double-conversion/double-conversion.h",
129     "double-conversion/double-conversion/double-to-string.h",
130     "double-conversion/double-conversion/string-to-double.h",
131     "double-conversion/double-conversion/utils.h",
134 LOCAL_INCLUDES += [
135     "/mfbt/double-conversion",
138 if CONFIG["OS_ARCH"] == "WINNT":
139     EXPORTS.mozilla += [
140         "WindowsVersion.h",
141     ]
143 if CONFIG["OS_ARCH"] == "WASI":
144     EXPORTS.mozilla += [
145         "WasiAtomic.h",
146     ]
148 if CONFIG["MOZ_TSAN"]:
149     EXPORTS.mozilla += [
150         "TsanOptions.h",
151     ]
153 UNIFIED_SOURCES += [
154     "Assertions.cpp",
155     "ChaosMode.cpp",
156     "Compression.cpp",
157     "double-conversion/double-conversion/bignum-dtoa.cc",
158     "double-conversion/double-conversion/bignum.cc",
159     "double-conversion/double-conversion/cached-powers.cc",
160     "double-conversion/double-conversion/double-to-string.cc",
161     "double-conversion/double-conversion/fast-dtoa.cc",
162     "double-conversion/double-conversion/fixed-dtoa.cc",
163     "double-conversion/double-conversion/string-to-double.cc",
164     "double-conversion/double-conversion/strtod.cc",
165     "FloatingPoint.cpp",
166     "HashFunctions.cpp",
167     "JSONWriter.cpp",
168     "Poison.cpp",
169     "RandomNum.cpp",
170     "SHA1.cpp",
171     "TaggedAnonymousMemory.cpp",
172     "UniquePtrExtensions.cpp",
173     "Unused.cpp",
174     "Utf8.cpp",
177 if CONFIG["MOZ_BUILD_APP"] not in (
178     "memory",
179     "tools/update-programs",
181     # Building MFBT tests adds a large overhead when building.
182     TEST_DIRS += ["tests"]
184 DEFINES["IMPL_MFBT"] = True
186 SOURCES += [
187     "lz4/lz4.c",
188     "lz4/lz4frame.c",
189     "lz4/lz4hc.c",
190     "lz4/xxhash.c",
193 SOURCES["lz4/xxhash.c"].flags += ["-Wno-unused-function"]
195 DisableStlWrapping()
197 if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
198     OS_LIBS += ["atomic"]
200 DEFINES["LZ4LIB_VISIBILITY"] = ""