2013-04-01 11:36:59 -07:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 12:47:17 -08: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/.
|
|
|
|
|
|
|
|
TEST_DIRS += ['tests']
|
2013-03-19 11:47:00 -07:00
|
|
|
|
2015-05-27 14:22:29 -07:00
|
|
|
# On win we build two mfbt libs - mfbt linked to crt dlls here and in
|
|
|
|
# staticruntime we build a statically linked mfbt lib.
|
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
DIRS += ['staticruntime']
|
|
|
|
|
2014-09-02 22:10:54 -07:00
|
|
|
Library('mfbt')
|
2013-06-17 12:21:01 -07:00
|
|
|
|
2014-01-19 16:11:45 -08:00
|
|
|
EXPORTS.mozilla = [
|
|
|
|
'Alignment.h',
|
|
|
|
'AllocPolicy.h',
|
2014-12-31 08:42:05 -08:00
|
|
|
'AlreadyAddRefed.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'Array.h',
|
|
|
|
'ArrayUtils.h',
|
|
|
|
'Assertions.h',
|
|
|
|
'Atomics.h',
|
|
|
|
'Attributes.h',
|
2014-04-15 19:30:26 -07:00
|
|
|
'BinarySearch.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'BloomFilter.h',
|
|
|
|
'Casting.h',
|
2014-03-02 21:12:17 -08:00
|
|
|
'ChaosMode.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'Char16.h',
|
|
|
|
'CheckedInt.h',
|
|
|
|
'Compiler.h',
|
|
|
|
'Compression.h',
|
|
|
|
'DebugOnly.h',
|
|
|
|
'decimal/Decimal.h',
|
2014-09-16 23:33:05 -07:00
|
|
|
'double-conversion/double-conversion.h',
|
|
|
|
'double-conversion/utils.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'Endian.h',
|
2014-04-25 19:34:03 -07:00
|
|
|
'EnumeratedArray.h',
|
2015-03-23 12:06:00 -07:00
|
|
|
'EnumeratedRange.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'EnumSet.h',
|
2015-10-08 13:05:31 -07:00
|
|
|
'FastBernoulliTrial.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'FloatingPoint.h',
|
2015-09-11 11:40:09 -07:00
|
|
|
'Function.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'GuardObjects.h',
|
|
|
|
'HashFunctions.h',
|
2015-05-11 14:23:33 -07:00
|
|
|
'IndexSequence.h',
|
2015-12-01 17:43:17 -08:00
|
|
|
'InitializerList.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'IntegerPrintfMacros.h',
|
2015-02-04 00:07:32 -08:00
|
|
|
'IntegerRange.h',
|
2014-04-01 06:38:42 -07:00
|
|
|
'IntegerTypeTraits.h',
|
2014-09-14 23:36:18 -07:00
|
|
|
'JSONWriter.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'Likely.h',
|
|
|
|
'LinkedList.h',
|
2014-04-24 01:48:00 -07:00
|
|
|
'MacroArgs.h',
|
2014-04-24 01:49:00 -07:00
|
|
|
'MacroForEach.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'MathAlgorithms.h',
|
|
|
|
'Maybe.h',
|
2014-06-13 05:26:01 -07:00
|
|
|
'MaybeOneOf.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'MemoryChecking.h',
|
|
|
|
'MemoryReporting.h',
|
|
|
|
'Move.h',
|
|
|
|
'NullPtr.h',
|
|
|
|
'NumericLimits.h',
|
2014-06-09 08:49:18 -07:00
|
|
|
'Pair.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'PodOperations.h',
|
|
|
|
'Poison.h',
|
|
|
|
'Range.h',
|
2015-05-22 19:50:44 -07:00
|
|
|
'RangedArray.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'RangedPtr.h',
|
2015-12-01 00:52:26 -08:00
|
|
|
'ReentrancyGuard.h',
|
2015-09-22 18:27:34 -07:00
|
|
|
'RefCounted.h',
|
2014-02-21 11:45:50 -08:00
|
|
|
'RefCountType.h',
|
2015-10-17 22:24:48 -07:00
|
|
|
'RefPtr.h',
|
2015-02-04 00:07:32 -08:00
|
|
|
'ReverseIterator.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'RollingMean.h',
|
2016-02-04 03:35:12 -08:00
|
|
|
'Saturate.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'Scoped.h',
|
2015-07-03 14:20:55 -07:00
|
|
|
'ScopeExit.h',
|
2014-12-08 14:45:13 -08:00
|
|
|
'SegmentedVector.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'SHA1.h',
|
2014-12-21 23:30:06 -08:00
|
|
|
'SizePrintfMacros.h',
|
2015-05-26 11:33:55 -07:00
|
|
|
'Snprintf.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'SplayTree.h',
|
2014-06-17 08:54:00 -07:00
|
|
|
'TaggedAnonymousMemory.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'TemplateLib.h',
|
|
|
|
'ThreadLocal.h',
|
2014-05-07 11:54:45 -07:00
|
|
|
'ToString.h',
|
2015-05-21 19:33:49 -07:00
|
|
|
'Tuple.h',
|
2014-04-25 19:34:04 -07:00
|
|
|
'TypedEnumBits.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'Types.h',
|
|
|
|
'TypeTraits.h',
|
2013-12-30 11:34:15 -08:00
|
|
|
'UniquePtr.h',
|
2015-11-05 13:24:24 -08:00
|
|
|
'UniquePtrExtensions.h',
|
2015-12-01 00:52:26 -08:00
|
|
|
'unused.h',
|
2015-06-30 10:01:00 -07:00
|
|
|
'Variant.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
'Vector.h',
|
|
|
|
'WeakPtr.h',
|
2015-09-23 13:59:28 -07:00
|
|
|
'XorShift128PlusRNG.h',
|
2014-01-19 16:11:45 -08:00
|
|
|
]
|
2013-11-18 18:47:14 -08:00
|
|
|
|
2014-02-27 14:58:47 -08:00
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'WindowsVersion.h',
|
|
|
|
]
|
2014-07-15 09:45:40 -07:00
|
|
|
elif CONFIG['OS_ARCH'] == 'Linux':
|
|
|
|
EXPORTS.mozilla += [
|
|
|
|
'LinuxSignal.h',
|
|
|
|
]
|
2014-02-27 14:58:47 -08:00
|
|
|
|
2015-05-27 14:22:29 -07:00
|
|
|
include('objs.mozbuild')
|
|
|
|
|
|
|
|
UNIFIED_SOURCES += mfbt_src_cppsrcs
|
2014-01-19 16:11:45 -08:00
|
|
|
|
|
|
|
DEFINES['IMPL_MFBT'] = True
|
|
|
|
|
2015-05-27 14:22:29 -07:00
|
|
|
SOURCES += mfbt_nonunified_src_cppsrcs
|
2014-03-04 16:39:06 -08:00
|
|
|
|
|
|
|
DISABLE_STL_WRAPPING = True
|
2014-03-15 23:23:28 -07:00
|
|
|
|
2015-08-27 20:44:53 -07:00
|
|
|
# Suppress warnings in third-party LZ4 code.
|
|
|
|
# TODO: Remove these suppressions after bug 993267 is fixed.
|
|
|
|
|
2014-03-15 23:23:28 -07:00
|
|
|
if CONFIG['GNU_CXX']:
|
2015-05-14 17:49:20 -07:00
|
|
|
SOURCES['/mfbt/Compression.cpp'].flags += ['-Wno-unused-function']
|
2015-08-27 20:44:53 -07:00
|
|
|
|
2015-11-24 23:12:44 -08:00
|
|
|
if CONFIG['CLANG_CXX']:
|
|
|
|
# Suppress warnings from third-party V8 Decimal code.
|
|
|
|
SOURCES['/mfbt/decimal/Decimal.cpp'].flags += ['-Wno-implicit-fallthrough']
|
|
|
|
|
2015-08-27 20:44:53 -07:00
|
|
|
if CONFIG['_MSC_VER']:
|
|
|
|
# Error 4804 is "'>' : unsafe use of type 'bool' in operation"
|
|
|
|
SOURCES['/mfbt/Compression.cpp'].flags += ['-wd4804']
|
2015-11-30 18:56:42 -08:00
|
|
|
|
|
|
|
if CONFIG['MOZ_NEEDS_LIBATOMIC']:
|
|
|
|
OS_LIBS += ['atomic']
|