gecko-dev/mfbt/moz.build
Doug Thayer 534ac9e360 Bug 1550108 - Pull in secondary lz4 libraries r=glandium
I opted to go with what I perceived as the more expedient route
of leaving lz4 roughly where it is and just adding to that. The
biggest complication was xxhash, which is included elsewhere.
I'm not generally proficient with build-related things though so
my solution may be wrong and not just ugly.

Differential Revision: https://phabricator.services.mozilla.com/D30640

--HG--
rename : mfbt/lz4.c => mfbt/lz4/lz4.c
rename : mfbt/lz4.h => mfbt/lz4/lz4.h
extra : moz-landing-system : lando
2019-10-04 20:44:08 +00:00

192 lines
4.3 KiB
Python

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# 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/.
with Files("**"):
BUG_COMPONENT = ("Core", "MFBT")
Library('mfbt')
EXPORTS += [
'../third_party/rust/encoding_c_mem/include/encoding_rs_mem.h',
]
EXPORTS.mozilla = [
'Algorithm.h',
'Alignment.h',
'AllocPolicy.h',
'AlreadyAddRefed.h',
'Array.h',
'ArrayUtils.h',
'Assertions.h',
'Atomics.h',
'Attributes.h',
'BinarySearch.h',
'BloomFilter.h',
'Buffer.h',
'BufferList.h',
'Casting.h',
'ChaosMode.h',
'Char16.h',
'CheckedInt.h',
'Compiler.h',
'Compression.h',
'DbgMacro.h',
'DebugOnly.h',
'DefineEnum.h',
'DoublyLinkedList.h',
'EndianUtils.h',
'EnumeratedArray.h',
'EnumeratedRange.h',
'EnumSet.h',
'EnumTypeTraits.h',
'fallible.h',
'FastBernoulliTrial.h',
'FloatingPoint.h',
'FStream.h',
'FunctionTypeTraits.h',
'GuardObjects.h',
'HashFunctions.h',
'HashTable.h',
'HelperMacros.h',
'IntegerPrintfMacros.h',
'IntegerRange.h',
'IntegerTypeTraits.h',
'JSONWriter.h',
'JsRust.h',
'Latin1.h',
'Likely.h',
'LinkedList.h',
'MacroArgs.h',
'MacroForEach.h',
'MathAlgorithms.h',
'Maybe.h',
'MaybeOneOf.h',
'MemoryChecking.h',
'MemoryReporting.h',
'Move.h',
'NonDereferenceable.h',
'NotNull.h',
'NullPtr.h',
'Opaque.h',
'OperatorNewExtensions.h',
'Pair.h',
'Path.h',
'PodOperations.h',
'Poison.h',
'RandomNum.h',
'Range.h',
'RangedArray.h',
'RangedPtr.h',
'RecordReplay.h',
'ReentrancyGuard.h',
'RefCounted.h',
'RefCountType.h',
'RefPtr.h',
'Result.h',
'ResultExtensions.h',
'ReverseIterator.h',
'RollingMean.h',
'Saturate.h',
'Scoped.h',
'ScopeExit.h',
'SegmentedVector.h',
'SHA1.h',
'SharedLibrary.h',
'SmallPointerArray.h',
'Span.h',
'SplayTree.h',
'Sprintf.h',
'SPSCQueue.h',
'StaticAnalysisFunctions.h',
'TaggedAnonymousMemory.h',
'TemplateLib.h',
'TextUtils.h',
'ThreadLocal.h',
'ThreadSafeWeakPtr.h',
'ToString.h',
'Tuple.h',
'TypedEnumBits.h',
'Types.h',
'TypeTraits.h',
'UniquePtr.h',
'UniquePtrExtensions.h',
'Unused.h',
'Utf8.h',
'Variant.h',
'Vector.h',
'WeakPtr.h',
'WrappingOperations.h',
'XorShift128PlusRNG.h',
]
EXPORTS["double-conversion"] = [
'double-conversion/double-conversion/double-conversion.h',
'double-conversion/double-conversion/utils.h',
]
LOCAL_INCLUDES += [
'/mfbt/double-conversion',
]
if CONFIG['OS_ARCH'] == 'WINNT':
EXPORTS.mozilla += [
'WindowsVersion.h',
]
elif CONFIG['OS_ARCH'] == 'Linux':
EXPORTS.mozilla += [
'LinuxSignal.h',
]
UNIFIED_SOURCES += [
'Assertions.cpp',
'ChaosMode.cpp',
'double-conversion/double-conversion/bignum-dtoa.cc',
'double-conversion/double-conversion/bignum.cc',
'double-conversion/double-conversion/cached-powers.cc',
'double-conversion/double-conversion/diy-fp.cc',
'double-conversion/double-conversion/double-conversion.cc',
'double-conversion/double-conversion/fast-dtoa.cc',
'double-conversion/double-conversion/fixed-dtoa.cc',
'double-conversion/double-conversion/strtod.cc',
'FloatingPoint.cpp',
'HashFunctions.cpp',
'JSONWriter.cpp',
'Poison.cpp',
'RandomNum.cpp',
'SHA1.cpp',
'TaggedAnonymousMemory.cpp',
'UniquePtrExtensions.cpp',
'Unused.cpp',
'Utf8.cpp',
]
if CONFIG['MOZ_BUILD_APP'] not in ('memory', 'tools/crashreporter', 'tools/update-packaging'):
# RecordReplay.cpp uses files from js/
UNIFIED_SOURCES += [
'RecordReplay.cpp',
]
# Building MFBT tests adds a large overhead when building
# tools/crashreporter.
TEST_DIRS += ['tests']
DEFINES['IMPL_MFBT'] = True
SOURCES += [
'Compression.cpp',
'lz4/lz4.c',
'lz4/lz4frame.c',
'lz4/lz4hc.c',
'lz4/xxhash.c',
]
DisableStlWrapping()
if CONFIG['MOZ_NEEDS_LIBATOMIC']:
OS_LIBS += ['atomic']
DEFINES['LZ4LIB_VISIBILITY'] = ''