tor-browser

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

moz.build (3269B)


      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 FINAL_LIBRARY = "js"
      8 
      9 # Includes should be relative to parent path
     10 LOCAL_INCLUDES += ["!..", ".."]
     11 
     12 include("../js-compileflags.mozbuild")
     13 include("../js-config.mozbuild")
     14 include("../js-cxxflags.mozbuild")
     15 
     16 UNIFIED_SOURCES += [
     17     "Array.cpp",
     18     "AtomicsObject.cpp",
     19     "BigInt.cpp",
     20     "Boolean.cpp",
     21     "DataViewObject.cpp",
     22     "Eval.cpp",
     23     "FinalizationRegistryObject.cpp",
     24     "JSON.cpp",
     25     "MapObject.cpp",
     26     "ModuleObject.cpp",
     27     "Object.cpp",
     28     "ParseRecordObject.cpp",
     29     "Profilers.cpp",
     30     "Promise.cpp",
     31     "RawJSONObject.cpp",
     32     "Reflect.cpp",
     33     "ReflectParse.cpp",
     34     "ShadowRealm.cpp",
     35     "String.cpp",
     36     "Symbol.cpp",
     37     "TestingFunctions.cpp",
     38     "TestingUtility.cpp",
     39     "WeakMapObject.cpp",
     40     "WeakRefObject.cpp",
     41     "WeakSetObject.cpp",
     42     "WrappedFunctionObject.cpp",
     43 ]
     44 
     45 if CONFIG["ENABLE_EXPLICIT_RESOURCE_MANAGEMENT"]:
     46     UNIFIED_SOURCES += [
     47         "AsyncDisposableStackObject.cpp",
     48         "DisposableStackObject.cpp",
     49         "DisposableStackObjectBase.cpp",
     50     ]
     51 
     52 # builtin/RegExp.cpp cannot be built in unified mode because it causes huge
     53 #   win32 test slowdowns
     54 SOURCES += [
     55     "RegExp.cpp",
     56 ]
     57 
     58 selfhosted_inputs = [
     59     "../../public/friend/ErrorNumbers.msg",
     60     # ProfilingCategoryList.h is being indirectly included, and it must be passed
     61     # here as an input, so it's generated before this self-hosted JS code
     62     # generation. Otherwise, it will intermittently fail to build.
     63     "!/mozglue/baseprofiler/public/ProfilingCategoryList.h",
     64     "TypedArrayConstants.h",
     65     "SelfHostingDefines.h",
     66     "Utilities.js",
     67     "Array.js",
     68     "AsyncFunction.js",
     69     "AsyncIteration.js",
     70     "Error.js",
     71     "Generator.js",
     72     "Iterator.js",
     73     "Map.js",
     74     "Number.js",
     75     "Object.js",
     76     "Promise.js",
     77     "Reflect.js",
     78     "RegExp.js",
     79     "RegExpGlobalReplaceOpt.h.js",
     80     "RegExpLocalReplaceOpt.h.js",
     81     "String.js",
     82     "Set.js",
     83     "TypedArray.js",
     84     "WeakMap.js",
     85     "WeakSet.js",
     86 ] + (
     87     [
     88         "intl/NumberingSystemsGenerated.h",
     89         "intl/Collator.js",
     90         "intl/CommonFunctions.js",
     91         "intl/CurrencyDataGenerated.js",
     92         "intl/DateTimeFormat.js",
     93         "intl/DisplayNames.js",
     94         "intl/DurationFormat.js",
     95         "intl/IntlObject.js",
     96         "intl/ListFormat.js",
     97         "intl/NumberFormat.js",
     98         "intl/PluralRules.js",
     99         "intl/RelativeTimeFormat.js",
    100         "intl/SanctionedSimpleUnitIdentifiersGenerated.js",
    101         "intl/Segmenter.js",
    102     ]
    103     if CONFIG["JS_HAS_INTL_API"]
    104     else []
    105 )
    106 
    107 if CONFIG["ENABLE_EXPLICIT_RESOURCE_MANAGEMENT"]:
    108     selfhosted_inputs += [
    109         "AsyncDisposableStack.js",
    110         "DisposableStack.js",
    111     ]
    112 
    113 # Prepare self-hosted JS code for embedding
    114 GeneratedFile(
    115     "../selfhosted.out.h",
    116     "../selfhosted.js",
    117     script="embedjs.py",
    118     entry_point="generate_selfhosted",
    119     inputs=selfhosted_inputs,
    120 )
    121 
    122 if CONFIG["FUZZING_JS_FUZZILLI"]:
    123     include("/tools/fuzzing/libfuzzer-config.mozbuild")