moz.build 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. TEST_DIRS += ['tests']
  6. # On win we build two mfbt libs - mfbt linked to crt dlls here and in
  7. # staticruntime we build a statically linked mfbt lib.
  8. if CONFIG['OS_ARCH'] == 'WINNT':
  9. DIRS += ['staticruntime']
  10. Library('mfbt')
  11. EXPORTS.mozilla = [
  12. 'Alignment.h',
  13. 'AllocPolicy.h',
  14. 'AlreadyAddRefed.h',
  15. 'Array.h',
  16. 'ArrayUtils.h',
  17. 'Assertions.h',
  18. 'Atomics.h',
  19. 'Attributes.h',
  20. 'BinarySearch.h',
  21. 'BloomFilter.h',
  22. 'BufferList.h',
  23. 'Casting.h',
  24. 'ChaosMode.h',
  25. 'Char16.h',
  26. 'CheckedInt.h',
  27. 'Compiler.h',
  28. 'Compression.h',
  29. 'DebugOnly.h',
  30. 'decimal/Decimal.h',
  31. 'double-conversion/double-conversion.h',
  32. 'double-conversion/utils.h',
  33. 'EndianUtils.h',
  34. 'EnumeratedArray.h',
  35. 'EnumeratedRange.h',
  36. 'EnumSet.h',
  37. 'EnumTypeTraits.h',
  38. 'FastBernoulliTrial.h',
  39. 'FloatingPoint.h',
  40. 'Function.h',
  41. 'GuardObjects.h',
  42. 'HashFunctions.h',
  43. 'IndexSequence.h',
  44. 'IntegerPrintfMacros.h',
  45. 'IntegerRange.h',
  46. 'IntegerTypeTraits.h',
  47. 'JSONWriter.h',
  48. 'Likely.h',
  49. 'LinkedList.h',
  50. 'MacroArgs.h',
  51. 'MacroForEach.h',
  52. 'MathAlgorithms.h',
  53. 'Maybe.h',
  54. 'MaybeOneOf.h',
  55. 'MemoryChecking.h',
  56. 'MemoryReporting.h',
  57. 'Move.h',
  58. 'NotNull.h',
  59. 'NullPtr.h',
  60. 'Opaque.h',
  61. 'OperatorNewExtensions.h',
  62. 'Pair.h',
  63. 'PodOperations.h',
  64. 'Poison.h',
  65. 'Range.h',
  66. 'RangedArray.h',
  67. 'RangedPtr.h',
  68. 'ReentrancyGuard.h',
  69. 'RefCounted.h',
  70. 'RefCountType.h',
  71. 'RefPtr.h',
  72. 'ReverseIterator.h',
  73. 'RollingMean.h',
  74. 'Saturate.h',
  75. 'Scoped.h',
  76. 'ScopeExit.h',
  77. 'SegmentedVector.h',
  78. 'SHA1.h',
  79. 'SizePrintfMacros.h',
  80. 'Span.h',
  81. 'SplayTree.h',
  82. 'Sprintf.h',
  83. 'StaticAnalysisFunctions.h',
  84. 'TaggedAnonymousMemory.h',
  85. 'TemplateLib.h',
  86. 'TextUtils.h',
  87. 'ThreadLocal.h',
  88. 'ToString.h',
  89. 'Tuple.h',
  90. 'TypedEnumBits.h',
  91. 'Types.h',
  92. 'TypeTraits.h',
  93. 'UniquePtr.h',
  94. 'UniquePtrExtensions.h',
  95. 'Unused.h',
  96. 'Variant.h',
  97. 'Vector.h',
  98. 'WeakPtr.h',
  99. 'XorShift128PlusRNG.h',
  100. ]
  101. if CONFIG['OS_ARCH'] == 'WINNT':
  102. EXPORTS.mozilla += [
  103. 'WindowsVersion.h',
  104. ]
  105. elif CONFIG['OS_ARCH'] == 'Linux':
  106. EXPORTS.mozilla += [
  107. 'LinuxSignal.h',
  108. ]
  109. include('objs.mozbuild')
  110. UNIFIED_SOURCES += mfbt_src_cppsrcs
  111. DEFINES['IMPL_MFBT'] = True
  112. SOURCES += mfbt_nonunified_src_cppsrcs
  113. DISABLE_STL_WRAPPING = True
  114. # Suppress warnings in third-party LZ4 code.
  115. # TODO: Remove these suppressions after bug 993267 is fixed.
  116. if CONFIG['GNU_CXX']:
  117. SOURCES['/mfbt/Compression.cpp'].flags += ['-Wno-unused-function']
  118. CXXFLAGS += ['-Wno-error=shadow']
  119. if CONFIG['CLANG_CXX']:
  120. # Suppress warnings from third-party V8 Decimal code.
  121. SOURCES['/mfbt/decimal/Decimal.cpp'].flags += ['-Wno-implicit-fallthrough']
  122. if CONFIG['_MSC_VER']:
  123. # Error 4804 is "'>' : unsafe use of type 'bool' in operation"
  124. SOURCES['/mfbt/Compression.cpp'].flags += ['-wd4804']
  125. if CONFIG['MOZ_NEEDS_LIBATOMIC']:
  126. OS_LIBS += ['atomic']