|
1 # -*- Mode: python; c-basic-offset: 4; 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/. |
|
6 |
|
7 TEST_DIRS += ['tests'] |
|
8 |
|
9 LIBRARY_NAME = 'mfbt' |
|
10 |
|
11 EXPORTS.mozilla = [ |
|
12 'Alignment.h', |
|
13 'AllocPolicy.h', |
|
14 'Array.h', |
|
15 'ArrayUtils.h', |
|
16 'Assertions.h', |
|
17 'Atomics.h', |
|
18 'Attributes.h', |
|
19 'BinarySearch.h', |
|
20 'BloomFilter.h', |
|
21 'Casting.h', |
|
22 'ChaosMode.h', |
|
23 'Char16.h', |
|
24 'CheckedInt.h', |
|
25 'Compiler.h', |
|
26 'Compression.h', |
|
27 'Constants.h', |
|
28 'DebugOnly.h', |
|
29 'decimal/Decimal.h', |
|
30 'Endian.h', |
|
31 'EnumeratedArray.h', |
|
32 'EnumSet.h', |
|
33 'FloatingPoint.h', |
|
34 'GuardObjects.h', |
|
35 'HashFunctions.h', |
|
36 'IntegerPrintfMacros.h', |
|
37 'IntegerTypeTraits.h', |
|
38 'Likely.h', |
|
39 'LinkedList.h', |
|
40 'MacroArgs.h', |
|
41 'MacroForEach.h', |
|
42 'MathAlgorithms.h', |
|
43 'Maybe.h', |
|
44 'MemoryChecking.h', |
|
45 'MemoryReporting.h', |
|
46 'Move.h', |
|
47 'MSIntTypes.h', |
|
48 'NullPtr.h', |
|
49 'NumericLimits.h', |
|
50 'PodOperations.h', |
|
51 'Poison.h', |
|
52 'Range.h', |
|
53 'RangedPtr.h', |
|
54 'RefCountType.h', |
|
55 'ReentrancyGuard.h', |
|
56 'RefPtr.h', |
|
57 'RollingMean.h', |
|
58 'Scoped.h', |
|
59 'SHA1.h', |
|
60 'SplayTree.h', |
|
61 'TemplateLib.h', |
|
62 'ThreadLocal.h', |
|
63 'TypedEnum.h', |
|
64 'TypedEnumBits.h', |
|
65 'TypedEnumInternal.h', |
|
66 'Types.h', |
|
67 'TypeTraits.h', |
|
68 'Vector.h', |
|
69 'WeakPtr.h', |
|
70 ] |
|
71 |
|
72 if CONFIG['OS_ARCH'] == 'WINNT': |
|
73 EXPORTS.mozilla += [ |
|
74 'WindowsVersion.h', |
|
75 ] |
|
76 |
|
77 UNIFIED_SOURCES = [ |
|
78 'double-conversion/bignum-dtoa.cc', |
|
79 'double-conversion/bignum.cc', |
|
80 'double-conversion/cached-powers.cc', |
|
81 'double-conversion/diy-fp.cc', |
|
82 'double-conversion/double-conversion.cc', |
|
83 'double-conversion/fast-dtoa.cc', |
|
84 'double-conversion/fixed-dtoa.cc', |
|
85 'double-conversion/strtod.cc', |
|
86 'FloatingPoint.cpp', |
|
87 'HashFunctions.cpp', |
|
88 'Poison.cpp', |
|
89 'SHA1.cpp', |
|
90 ] |
|
91 |
|
92 DEFINES['IMPL_MFBT'] = True |
|
93 |
|
94 # Compression.cpp cannot be built in unified mode because it pulls in Windows system headers. |
|
95 # Decimal.cpp doesn't build in unified mode with gcc. |
|
96 SOURCES += [ |
|
97 'Compression.cpp', |
|
98 'decimal/Decimal.cpp', |
|
99 ] |
|
100 |
|
101 DISABLE_STL_WRAPPING = True |
|
102 |
|
103 # Suppress warnings in third-party code. |
|
104 if CONFIG['GNU_CXX']: |
|
105 # TODO: Remove this LZ4 warning suppression after bug 993267 is fixed. |
|
106 SOURCES['Compression.cpp'].flags += ['-Wno-unused-function'] |