tor-browser

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

moz.build (7074B)


      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", "DOM: Content Processes")
      9 
     10 DIRS += ["jsactor"]
     11 
     12 TEST_DIRS += ["gtest"]
     13 
     14 XPIDL_SOURCES += [
     15     "nsIDOMProcessChild.idl",
     16     "nsIDOMProcessParent.idl",
     17     "nsIHangReport.idl",
     18     "nsILoginDetectionService.idl",
     19 ]
     20 
     21 XPIDL_MODULE = "dom"
     22 
     23 XPCOM_MANIFESTS += [
     24     "components.conf",
     25 ]
     26 
     27 EXTRA_JS_MODULES += [
     28     "ManifestMessagesChild.sys.mjs",
     29 ]
     30 
     31 EXPORTS.mozilla.dom.ipc += [
     32     "IdType.h",
     33     "MemMapSnapshot.h",
     34     "SharedMap.h",
     35     "SharedMapChangeEvent.h",
     36     "SharedStringMap.h",
     37     "StringTable.h",
     38     "StructuredCloneData.h",
     39 ]
     40 
     41 EXPORTS.mozilla.dom += [
     42     "BrowserBridgeChild.h",
     43     "BrowserBridgeHost.h",
     44     "BrowserBridgeParent.h",
     45     "BrowserChild.h",
     46     "BrowserHost.h",
     47     "BrowserParent.h",
     48     "ClonedErrorHolder.h",
     49     "CoalescedInputData.h",
     50     "CoalescedMouseData.h",
     51     "CoalescedTouchData.h",
     52     "CoalescedWheelData.h",
     53     "ContentChild.h",
     54     "ContentParent.h",
     55     "ContentParent_NotifyUpdatedDictionaries.h",
     56     "ContentProcess.h",
     57     "ContentProcessManager.h",
     58     "CSPMessageUtils.h",
     59     "DocShellMessageUtils.h",
     60     "EffectsInfo.h",
     61     "FilePickerMessageUtils.h",
     62     "FilePickerParent.h",
     63     "InProcessChild.h",
     64     "InProcessParent.h",
     65     "JSOracleChild.h",
     66     "JSOracleParent.h",
     67     "JSValidatorChild.h",
     68     "JSValidatorParent.h",
     69     "JSValidatorUtils.h",
     70     "LoginDetectionService.h",
     71     "MaybeDiscarded.h",
     72     "MemoryReportRequest.h",
     73     "NativeThreadId.h",
     74     "NavigationAPIIPCUtils.h",
     75     "PageLoadEventUtils.h",
     76     "PermissionMessageUtils.h",
     77     "PolicyContainerMessageUtils.h",
     78     "ProcessActor.h",
     79     "ProcessIsolation.h",
     80     "PropertyBagUtils.h",
     81     "ReferrerInfoUtils.h",
     82     "RefMessageBodyService.h",
     83     "RemoteBrowser.h",
     84     "RemoteType.h",
     85     "RemoteWebProgressRequest.h",
     86     "SharedMessageBody.h",
     87     "TabContext.h",
     88     "TabMessageTypes.h",
     89     "TabMessageUtils.h",
     90     "UniqueContentParentKeepAlive.h",
     91     "URLClassifierChild.h",
     92     "URLClassifierParent.h",
     93     "UserActivationIPCUtils.h",
     94     "VsyncChild.h",
     95     "VsyncMainChild.h",
     96     "VsyncParent.h",
     97     "VsyncWorkerChild.h",
     98     "WindowGlobalActor.h",
     99     "WindowGlobalChild.h",
    100     "WindowGlobalParent.h",
    101 ]
    102 
    103 EXPORTS.mozilla += [
    104     "PreallocatedProcessManager.h",
    105     "ProcessHangMonitor.h",
    106     "ProcessHangMonitorIPC.h",
    107     "ProcessPriorityManager.h",
    108 ]
    109 
    110 UNIFIED_SOURCES += [
    111     "BrowserBridgeChild.cpp",
    112     "BrowserBridgeHost.cpp",
    113     "BrowserBridgeParent.cpp",
    114     "BrowserChild.cpp",
    115     "BrowserHost.cpp",
    116     "BrowserParent.cpp",
    117     "ClonedErrorHolder.cpp",
    118     "CoalescedInputData.cpp",
    119     "CoalescedMouseData.cpp",
    120     "CoalescedTouchData.cpp",
    121     "CoalescedWheelData.cpp",
    122     "ColorPickerParent.cpp",
    123     "ContentParent.cpp",
    124     "ContentProcess.cpp",
    125     "ContentProcessManager.cpp",
    126     "CSPMessageUtils.cpp",
    127     "DocShellMessageUtils.cpp",
    128     "FilePickerParent.cpp",
    129     "InProcessImpl.cpp",
    130     "JSOracleChild.cpp",
    131     "JSOracleParent.cpp",
    132     "JSValidatorChild.cpp",
    133     "JSValidatorParent.cpp",
    134     "JSValidatorUtils.cpp",
    135     "LoginDetectionService.cpp",
    136     "MemMapSnapshot.cpp",
    137     "MemoryReportRequest.cpp",
    138     "MMPrinter.cpp",
    139     "PermissionMessageUtils.cpp",
    140     "PolicyContainerMessageUtils.cpp",
    141     "PreallocatedProcessManager.cpp",
    142     "ProcessActor.cpp",
    143     "ProcessIsolation.cpp",
    144     "ProcessPriorityManager.cpp",
    145     "PropertyBagUtils.cpp",
    146     "ReferrerInfoUtils.cpp",
    147     "RefMessageBodyService.cpp",
    148     "RemoteBrowser.cpp",
    149     "RemoteWebProgressRequest.cpp",
    150     "SharedMap.cpp",
    151     "SharedMessageBody.cpp",
    152     "SharedStringMap.cpp",
    153     "StructuredCloneData.cpp",
    154     "TabContext.cpp",
    155     "UniqueContentParentKeepAlive.cpp",
    156     "URLClassifierParent.cpp",
    157     "WindowGlobalActor.cpp",
    158     "WindowGlobalChild.cpp",
    159     "WindowGlobalParent.cpp",
    160 ]
    161 
    162 # ContentChild.cpp cannot be compiled in unified mode on  linux due to Time conflict
    163 SOURCES += [
    164     "ContentChild.cpp",
    165     "ProcessHangMonitor.cpp",
    166     "VsyncMainChild.cpp",
    167     "VsyncParent.cpp",
    168     "VsyncWorkerChild.cpp",
    169 ]
    170 
    171 PREPROCESSED_IPDL_SOURCES += [
    172     "PBrowser.ipdl",
    173     "PBrowserBridge.ipdl",
    174     "PContent.ipdl",
    175 ]
    176 
    177 IPDL_SOURCES += [
    178     "CustomElementTypes.ipdlh",
    179     "DOMTypes.ipdlh",
    180     "IPCTransferable.ipdlh",
    181     "MemoryReportTypes.ipdlh",
    182     "PColorPicker.ipdl",
    183     "PContentPermission.ipdlh",
    184     "PContentPermissionRequest.ipdl",
    185     "PCycleCollectWithLogs.ipdl",
    186     "PFilePicker.ipdl",
    187     "PInProcess.ipdl",
    188     "PJSOracle.ipdl",
    189     "PJSValidator.ipdl",
    190     "PProcessHangMonitor.ipdl",
    191     "PrefsTypes.ipdlh",
    192     "PTabContext.ipdlh",
    193     "PURLClassifier.ipdl",
    194     "PURLClassifierInfo.ipdlh",
    195     "PURLClassifierLocal.ipdl",
    196     "PURLClassifierLocalByName.ipdl",
    197     "PVsync.ipdl",
    198     "PWindowGlobal.ipdl",
    199     "ServiceWorkerConfiguration.ipdlh",
    200     "WindowGlobalTypes.ipdlh",
    201 ]
    202 
    203 include("/ipc/chromium/chromium-config.mozbuild")
    204 
    205 FINAL_LIBRARY = "xul"
    206 
    207 if CONFIG["MOZ_SANDBOX"] and (
    208     CONFIG["OS_ARCH"] == "Linux" or CONFIG["TARGET_OS"] == "OSX"
    209 ):
    210     USE_LIBS += [
    211         "mozsandbox",
    212     ]
    213 
    214 LOCAL_INCLUDES += [
    215     "/caps",
    216     "/chrome",
    217     "/docshell/base",
    218     "/dom/base",
    219     "/dom/bindings",
    220     "/dom/events",
    221     "/dom/filesystem",
    222     "/dom/geolocation",
    223     "/dom/media/webrtc",
    224     "/dom/media/webspeech/synth/ipc",
    225     "/dom/security",
    226     "/dom/storage",
    227     "/extensions/spellcheck/src",
    228     "/gfx/2d",
    229     "/hal/sandbox",
    230     "/js/xpconnect/loader",
    231     "/js/xpconnect/src",
    232     "/layout/base",
    233     "/media/webrtc",
    234     "/netwerk/base",
    235     "/netwerk/dns",
    236     "/netwerk/protocol/http",
    237     "/toolkit/components/printingui/ipc",
    238     "/toolkit/crashreporter",
    239     "/toolkit/xre",
    240     "/uriloader/exthandler",
    241     "/widget",
    242     "/xpcom/base",
    243     "/xpcom/threads",
    244 ]
    245 
    246 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "WINNT":
    247     LOCAL_INCLUDES += [
    248         "/security/sandbox/chromium",
    249         "/security/sandbox/chromium-shim",
    250     ]
    251 
    252 if CONFIG["MOZ_SANDBOX"] and CONFIG["OS_ARCH"] == "OpenBSD":
    253     LOCAL_INCLUDES += [
    254         "/xpcom/build",
    255     ]
    256 
    257 if CONFIG["OS_ARCH"] != "WINNT":
    258     LOCAL_INCLUDES += [
    259         "/modules/libjar",
    260     ]
    261 
    262 DEFINES["BIN_SUFFIX"] = '"%s"' % CONFIG["BIN_SUFFIX"]
    263 
    264 DEFINES["MOZ_APP_NAME"] = '"%s"' % CONFIG["MOZ_APP_NAME"]
    265 
    266 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
    267     DEFINES["MOZ_ENABLE_FREETYPE"] = True
    268 
    269 BROWSER_CHROME_MANIFESTS += [
    270     "tests/browser.toml",
    271     "tests/JSProcessActor/browser.toml",
    272     "tests/JSWindowActor/browser.toml",
    273 ]
    274 
    275 MOCHITEST_CHROME_MANIFESTS += ["tests/chrome.toml"]
    276 MOCHITEST_MANIFESTS += ["tests/mochitest.toml"]
    277 XPCSHELL_TESTS_MANIFESTS += ["tests/xpcshell.toml"]
    278 
    279 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
    280     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
    281 
    282 # Add libFuzzer configuration directives
    283 include("/tools/fuzzing/libfuzzer-config.mozbuild")