tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (4705B)


      1 # -*- Mode: python; 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 with Files("**"):
      8     BUG_COMPONENT = ("Core", "MFBT")
      9 
     10 Library("mfbt")
     11 
     12 EXPORTS += [
     13     "../third_party/rust/encoding_c_mem/include/encoding_rs_mem.h",
     14 ]
     15 
     16 EXPORTS.mozilla = [
     17     "Algorithm.h",
     18     "Alignment.h",
     19     "AllocPolicy.h",
     20     "AlreadyAddRefed.h",
     21     "Array.h",
     22     "ArrayUtils.h",
     23     "Assertions.h",
     24     "AtomicBitfields.h",
     25     "Atomics.h",
     26     "Attributes.h",
     27     "BinarySearch.h",
     28     "BitSet.h",
     29     "BloomFilter.h",
     30     "BoundedMPSCQueue.h",
     31     "Buffer.h",
     32     "BufferList.h",
     33     "Casting.h",
     34     "ChaosMode.h",
     35     "Char16.h",
     36     "CheckedArithmetic.h",
     37     "CheckedInt.h",
     38     "CompactPair.h",
     39     "Compiler.h",
     40     "DbgMacro.h",
     41     "DebugOnly.h",
     42     "DefineEnum.h",
     43     "DoublyLinkedList.h",
     44     "EndianUtils.h",
     45     "EnumeratedArray.h",
     46     "EnumeratedRange.h",
     47     "EnumSet.h",
     48     "EnumTypeTraits.h",
     49     "fallible.h",
     50     "FastBernoulliTrial.h",
     51     "FloatingPoint.h",
     52     "FStream.h",
     53     "FunctionRef.h",
     54     "FunctionTypeTraits.h",
     55     "Fuzzing.h",
     56     "HashFunctions.h",
     57     "HashTable.h",
     58     "HelperMacros.h",
     59     "InitializedOnce.h",
     60     "IntegerRange.h",
     61     "IntegerTypeTraits.h",
     62     "JSONWriter.h",
     63     "JsRust.h",
     64     "Latin1.h",
     65     "Likely.h",
     66     "LinkedList.h",
     67     "Literals.h",
     68     "MacroArgs.h",
     69     "MacroForEach.h",
     70     "MathAlgorithms.h",
     71     "Maybe.h",
     72     "MaybeOneOf.h",
     73     "MaybeStorageBase.h",
     74     "MemoryChecking.h",
     75     "MemoryReporting.h",
     76     "MoveOnlyFunction.h",
     77     "MruCache.h",
     78     "NeverDestroyed.h",
     79     "NonDereferenceable.h",
     80     "NotNull.h",
     81     "Opaque.h",
     82     "OperatorNewExtensions.h",
     83     "PairHash.h",
     84     "Path.h",
     85     "PodOperations.h",
     86     "Poison.h",
     87     "RandomNum.h",
     88     "Range.h",
     89     "RangedArray.h",
     90     "RangedPtr.h",
     91     "ReentrancyGuard.h",
     92     "RefCounted.h",
     93     "RefCountType.h",
     94     "RefPtr.h",
     95     "Result.h",
     96     "ResultExtensions.h",
     97     "ResultVariant.h",
     98     "ReverseIterator.h",
     99     "RollingMean.h",
    100     "Saturate.h",
    101     "ScopeExit.h",
    102     "SegmentedVector.h",
    103     "SHA1.h",
    104     "SharedLibrary.h",
    105     "SmallPointerArray.h",
    106     "Span.h",
    107     "SplayTree.h",
    108     "SPSCQueue.h",
    109     "StaticAnalysisFunctions.h",
    110     "StringBuffer.h",
    111     "TaggedAnonymousMemory.h",
    112     "Tainting.h",
    113     "TextUtils.h",
    114     "ThreadLocal.h",
    115     "ThreadSafety.h",
    116     "ThreadSafeWeakPtr.h",
    117     "ToString.h",
    118     "Try.h",
    119     "TypedEnumBits.h",
    120     "Types.h",
    121     "UniquePtr.h",
    122     "UniquePtrExtensions.h",
    123     "Utf8.h",
    124     "Variant.h",
    125     "Vector.h",
    126     "WeakPtr.h",
    127     "WrappingOperations.h",
    128     "XorShift128PlusRNG.h",
    129 ]
    130 
    131 EXPORTS["double-conversion"] = [
    132     "double-conversion/double-conversion/double-conversion.h",
    133     "double-conversion/double-conversion/double-to-string.h",
    134     "double-conversion/double-conversion/string-to-double.h",
    135     "double-conversion/double-conversion/utils.h",
    136 ]
    137 
    138 EXPORTS.function2 += [
    139     "/third_party/function2/include/function2/function2.hpp",
    140 ]
    141 
    142 LOCAL_INCLUDES += [
    143     "/mfbt/double-conversion",
    144 ]
    145 
    146 if CONFIG["OS_ARCH"] == "WINNT":
    147     EXPORTS.mozilla += [
    148         "WindowsVersion.h",
    149     ]
    150 
    151 if CONFIG["OS_ARCH"] == "WASI":
    152     EXPORTS.mozilla += [
    153         "WasiAtomic.h",
    154     ]
    155 
    156 UNIFIED_SOURCES += [
    157     "Assertions.cpp",
    158     "ChaosMode.cpp",
    159     "double-conversion/double-conversion/bignum-dtoa.cc",
    160     "double-conversion/double-conversion/bignum.cc",
    161     "double-conversion/double-conversion/cached-powers.cc",
    162     "double-conversion/double-conversion/double-to-string.cc",
    163     "double-conversion/double-conversion/fast-dtoa.cc",
    164     "double-conversion/double-conversion/fixed-dtoa.cc",
    165     "double-conversion/double-conversion/string-to-double.cc",
    166     "double-conversion/double-conversion/strtod.cc",
    167     "FloatingPoint.cpp",
    168     "HashFunctions.cpp",
    169     "Poison.cpp",
    170     "RandomNum.cpp",
    171     "RefCounted.cpp",
    172     "SHA1.cpp",
    173     "TaggedAnonymousMemory.cpp",
    174     "UniquePtrExtensions.cpp",
    175     "Utf8.cpp",
    176 ]
    177 
    178 if CONFIG["MOZ_BUILD_APP"] not in (
    179     "memory",
    180     "tools/update-programs",
    181 ):
    182     # Building MFBT tests adds a large overhead when building.
    183     TEST_DIRS += ["tests"]
    184 
    185 DEFINES["IMPL_MFBT"] = True
    186 
    187 DisableStlWrapping()
    188 
    189 OS_LIBS += CONFIG["LIBATOMIC_LIBS"]
    190 
    191 # For RefCounted.cpp
    192 DEFINES["MOZ_SUPPORT_LEAKCHECKING"] = True
    193 
    194 # This is kind of gross because this is not a subdirectory,
    195 # but pure_virtual requires mfbt to build and some projects
    196 # don't use mfbt.
    197 DIRS += ["../build/pure_virtual"]
    198 
    199 if CONFIG["MOZ_BUILD_APP"] != "memory":
    200     FINAL_LIBRARY = "mozglue"