2016-07-14 16:16:42 +00:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:17 +00:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
2017-10-26 08:53:23 +00:00
|
|
|
with Files("**"):
|
|
|
|
BUG_COMPONENT = ("Core", "MFBT")
|
|
|
|
|
2014-09-03 05:10:54 +00:00
|
|
|
Library("mfbt")
|
2013-06-17 19:21:01 +00:00
|
|
|
|
2019-09-18 08:26:34 +00:00
|
|
|
EXPORTS += [
|
|
|
|
"../third_party/rust/encoding_c_mem/include/encoding_rs_mem.h",
|
|
|
|
]
|
|
|
|
|
2014-01-20 00:11:45 +00:00
|
|
|
EXPORTS.mozilla = [
|
2018-03-27 15:01:08 +00:00
|
|
|
"Algorithm.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Alignment.h",
|
|
|
|
"AllocPolicy.h",
|
2014-12-31 16:42:05 +00:00
|
|
|
"AlreadyAddRefed.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Array.h",
|
|
|
|
"ArrayUtils.h",
|
|
|
|
"Assertions.h",
|
2020-10-01 08:25:15 +00:00
|
|
|
"AtomicBitfields.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Atomics.h",
|
|
|
|
"Attributes.h",
|
2014-04-16 02:30:26 +00:00
|
|
|
"BinarySearch.h",
|
2020-10-11 22:03:33 +00:00
|
|
|
"BitSet.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"BloomFilter.h",
|
2018-12-07 08:28:08 +00:00
|
|
|
"Buffer.h",
|
2016-05-12 01:02:06 +00:00
|
|
|
"BufferList.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Casting.h",
|
2014-03-03 05:12:17 +00:00
|
|
|
"ChaosMode.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Char16.h",
|
|
|
|
"CheckedInt.h",
|
2020-03-17 12:42:12 +00:00
|
|
|
"CompactPair.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Compiler.h",
|
|
|
|
"Compression.h",
|
2019-03-30 04:25:13 +00:00
|
|
|
"DbgMacro.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"DebugOnly.h",
|
2017-06-30 23:58:11 +00:00
|
|
|
"DefineEnum.h",
|
2016-06-02 16:18:40 +00:00
|
|
|
"DoublyLinkedList.h",
|
2016-05-22 20:31:11 +00:00
|
|
|
"EndianUtils.h",
|
2014-04-26 02:34:03 +00:00
|
|
|
"EnumeratedArray.h",
|
2015-03-23 19:06:00 +00:00
|
|
|
"EnumeratedRange.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"EnumSet.h",
|
2016-09-07 02:20:16 +00:00
|
|
|
"EnumTypeTraits.h",
|
2019-07-10 01:51:15 +00:00
|
|
|
"fallible.h",
|
2015-10-08 20:05:31 +00:00
|
|
|
"FastBernoulliTrial.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"FloatingPoint.h",
|
2018-01-07 09:31:31 +00:00
|
|
|
"FStream.h",
|
2020-03-24 00:12:41 +00:00
|
|
|
"FunctionRef.h",
|
2018-08-15 10:27:45 +00:00
|
|
|
"FunctionTypeTraits.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"HashFunctions.h",
|
2018-07-26 10:15:49 +00:00
|
|
|
"HashTable.h",
|
2019-09-04 02:40:32 +00:00
|
|
|
"HelperMacros.h",
|
2020-03-05 17:26:26 +00:00
|
|
|
"InitializedOnce.h",
|
2015-02-04 08:07:32 +00:00
|
|
|
"IntegerRange.h",
|
2014-04-01 13:38:42 +00:00
|
|
|
"IntegerTypeTraits.h",
|
2014-09-15 06:36:18 +00:00
|
|
|
"JSONWriter.h",
|
2019-09-18 08:26:34 +00:00
|
|
|
"JsRust.h",
|
|
|
|
"Latin1.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Likely.h",
|
|
|
|
"LinkedList.h",
|
2014-04-24 08:48:00 +00:00
|
|
|
"MacroArgs.h",
|
2014-04-24 08:49:00 +00:00
|
|
|
"MacroForEach.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"MathAlgorithms.h",
|
|
|
|
"Maybe.h",
|
2014-06-13 12:26:01 +00:00
|
|
|
"MaybeOneOf.h",
|
2021-03-23 12:35:19 +00:00
|
|
|
"MaybeStorageBase.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"MemoryChecking.h",
|
|
|
|
"MemoryReporting.h",
|
2018-03-28 06:48:53 +00:00
|
|
|
"NonDereferenceable.h",
|
2016-05-12 04:21:16 +00:00
|
|
|
"NotNull.h",
|
2016-03-09 08:37:20 +00:00
|
|
|
"Opaque.h",
|
2016-08-13 02:43:49 +00:00
|
|
|
"OperatorNewExtensions.h",
|
2020-12-04 21:57:03 +00:00
|
|
|
"PairHash.h",
|
2017-12-27 18:03:35 +00:00
|
|
|
"Path.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"PodOperations.h",
|
|
|
|
"Poison.h",
|
2018-10-25 18:00:15 +00:00
|
|
|
"RandomNum.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Range.h",
|
2015-05-23 02:50:44 +00:00
|
|
|
"RangedArray.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"RangedPtr.h",
|
2015-12-01 08:52:26 +00:00
|
|
|
"ReentrancyGuard.h",
|
2015-09-23 01:27:34 +00:00
|
|
|
"RefCounted.h",
|
2014-02-21 19:45:50 +00:00
|
|
|
"RefCountType.h",
|
2015-10-18 05:24:48 +00:00
|
|
|
"RefPtr.h",
|
2016-11-21 11:52:03 +00:00
|
|
|
"Result.h",
|
2017-08-30 04:28:22 +00:00
|
|
|
"ResultExtensions.h",
|
2020-11-23 15:49:14 +00:00
|
|
|
"ResultVariant.h",
|
2015-02-04 08:07:32 +00:00
|
|
|
"ReverseIterator.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"RollingMean.h",
|
2016-02-04 11:35:12 +00:00
|
|
|
"Saturate.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Scoped.h",
|
2015-07-03 21:20:55 +00:00
|
|
|
"ScopeExit.h",
|
2014-12-08 22:45:13 +00:00
|
|
|
"SegmentedVector.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"SHA1.h",
|
2018-04-23 15:31:53 +00:00
|
|
|
"SharedLibrary.h",
|
2017-05-10 03:07:37 +00:00
|
|
|
"SmallPointerArray.h",
|
2017-02-16 09:43:50 +00:00
|
|
|
"Span.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"SplayTree.h",
|
2018-04-13 15:14:05 +00:00
|
|
|
"SPSCQueue.h",
|
2016-07-25 13:57:30 +00:00
|
|
|
"StaticAnalysisFunctions.h",
|
2014-06-17 15:54:00 +00:00
|
|
|
"TaggedAnonymousMemory.h",
|
2020-01-23 22:19:32 +00:00
|
|
|
"Tainting.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"TemplateLib.h",
|
2018-04-09 19:02:43 +00:00
|
|
|
"TextUtils.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"ThreadLocal.h",
|
2017-10-18 18:21:23 +00:00
|
|
|
"ThreadSafeWeakPtr.h",
|
2014-05-07 18:54:45 +00:00
|
|
|
"ToString.h",
|
2015-05-22 02:33:49 +00:00
|
|
|
"Tuple.h",
|
2014-04-26 02:34:04 +00:00
|
|
|
"TypedEnumBits.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Types.h",
|
|
|
|
"TypeTraits.h",
|
2013-12-30 19:34:15 +00:00
|
|
|
"UniquePtr.h",
|
2015-11-05 21:24:24 +00:00
|
|
|
"UniquePtrExtensions.h",
|
2016-08-23 04:09:32 +00:00
|
|
|
"Unused.h",
|
2018-01-11 18:29:53 +00:00
|
|
|
"Utf8.h",
|
2015-06-30 17:01:00 +00:00
|
|
|
"Variant.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
"Vector.h",
|
|
|
|
"WeakPtr.h",
|
2018-02-16 01:36:50 +00:00
|
|
|
"WrappingOperations.h",
|
2015-09-23 20:59:28 +00:00
|
|
|
"XorShift128PlusRNG.h",
|
2014-01-20 00:11:45 +00:00
|
|
|
]
|
2013-11-19 02:47:14 +00:00
|
|
|
|
2017-10-10 05:15:37 +00:00
|
|
|
EXPORTS["double-conversion"] = [
|
|
|
|
"double-conversion/double-conversion/double-conversion.h",
|
2019-10-11 02:46:45 +00:00
|
|
|
"double-conversion/double-conversion/double-to-string.h",
|
|
|
|
"double-conversion/double-conversion/string-to-double.h",
|
2017-10-10 05:15:37 +00:00
|
|
|
"double-conversion/double-conversion/utils.h",
|
|
|
|
]
|
|
|
|
|
|
|
|
LOCAL_INCLUDES += [
|
|
|
|
"/mfbt/double-conversion",
|
|
|
|
]
|
|
|
|
|
2014-02-27 22:58:47 +00:00
|
|
|
if CONFIG["OS_ARCH"] == "WINNT":
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
"WindowsVersion.h",
|
|
|
|
]
|
|
|
|
|
2021-04-20 05:15:28 +00:00
|
|
|
if CONFIG["OS_ARCH"] == "WASI":
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
"WasiAtomic.h",
|
|
|
|
]
|
|
|
|
|
2020-03-26 21:19:24 +00:00
|
|
|
if CONFIG["MOZ_TSAN"]:
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
"TsanOptions.h",
|
|
|
|
]
|
|
|
|
|
2017-11-14 06:55:53 +00:00
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"Assertions.cpp",
|
|
|
|
"ChaosMode.cpp",
|
2021-01-19 14:13:47 +00:00
|
|
|
"Compression.cpp",
|
2017-11-14 06:55:53 +00:00
|
|
|
"double-conversion/double-conversion/bignum-dtoa.cc",
|
|
|
|
"double-conversion/double-conversion/bignum.cc",
|
|
|
|
"double-conversion/double-conversion/cached-powers.cc",
|
2019-10-11 02:46:45 +00:00
|
|
|
"double-conversion/double-conversion/double-to-string.cc",
|
2017-11-14 06:55:53 +00:00
|
|
|
"double-conversion/double-conversion/fast-dtoa.cc",
|
|
|
|
"double-conversion/double-conversion/fixed-dtoa.cc",
|
2019-10-11 02:46:45 +00:00
|
|
|
"double-conversion/double-conversion/string-to-double.cc",
|
2017-11-14 06:55:53 +00:00
|
|
|
"double-conversion/double-conversion/strtod.cc",
|
|
|
|
"FloatingPoint.cpp",
|
|
|
|
"HashFunctions.cpp",
|
|
|
|
"JSONWriter.cpp",
|
|
|
|
"Poison.cpp",
|
2018-10-25 18:00:15 +00:00
|
|
|
"RandomNum.cpp",
|
2017-11-14 06:55:53 +00:00
|
|
|
"SHA1.cpp",
|
|
|
|
"TaggedAnonymousMemory.cpp",
|
2019-06-28 19:46:58 +00:00
|
|
|
"UniquePtrExtensions.cpp",
|
2017-11-14 06:55:53 +00:00
|
|
|
"Unused.cpp",
|
2018-01-11 18:29:53 +00:00
|
|
|
"Utf8.cpp",
|
2017-11-14 06:55:53 +00:00
|
|
|
]
|
2014-01-20 00:11:45 +00:00
|
|
|
|
2020-07-08 23:03:21 +00:00
|
|
|
if CONFIG["MOZ_BUILD_APP"] not in (
|
|
|
|
"memory",
|
|
|
|
"tools/update-programs",
|
|
|
|
):
|
|
|
|
# Building MFBT tests adds a large overhead when building.
|
2019-01-11 16:01:15 +00:00
|
|
|
TEST_DIRS += ["tests"]
|
|
|
|
|
2014-01-20 00:11:45 +00:00
|
|
|
DEFINES["IMPL_MFBT"] = True
|
|
|
|
|
2017-11-14 06:55:53 +00:00
|
|
|
SOURCES += [
|
2019-10-04 20:44:08 +00:00
|
|
|
"lz4/lz4.c",
|
|
|
|
"lz4/lz4frame.c",
|
|
|
|
"lz4/lz4hc.c",
|
|
|
|
"lz4/xxhash.c",
|
2017-11-14 06:55:53 +00:00
|
|
|
]
|
2014-03-05 00:39:06 +00:00
|
|
|
|
2021-01-12 16:20:32 +00:00
|
|
|
SOURCES["lz4/xxhash.c"].flags += ["-Wno-unused-function"]
|
|
|
|
|
2017-09-11 18:33:26 +00:00
|
|
|
DisableStlWrapping()
|
2014-03-16 06:23:28 +00:00
|
|
|
|
2015-12-01 02:56:42 +00:00
|
|
|
if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
|
|
|
|
OS_LIBS += ["atomic"]
|
2017-11-15 03:51:01 +00:00
|
|
|
|
|
|
|
DEFINES["LZ4LIB_VISIBILITY"] = ""
|