tor-browser

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

moz.build (6867B)


      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", "Networking: HTTP")
      9 
     10 XPIDL_SOURCES += [
     11     "nsIBackgroundChannelRegistrar.idl",
     12     "nsIBinaryHttp.idl",
     13     "nsICORSPreflightCache.idl",
     14     "nsICORSPreflightCacheEntry.idl",
     15     "nsIEarlyHintObserver.idl",
     16     "nsIHttpActivityObserver.idl",
     17     "nsIHttpAuthCache.idl",
     18     "nsIHttpAuthenticableChannel.idl",
     19     "nsIHttpAuthenticator.idl",
     20     "nsIHttpAuthEntry.idl",
     21     "nsIHttpAuthManager.idl",
     22     "nsIHttpChannel.idl",
     23     "nsIHttpChannelAuthProvider.idl",
     24     "nsIHttpChannelChild.idl",
     25     "nsIHttpChannelInternal.idl",
     26     "nsIHttpHeaderVisitor.idl",
     27     "nsIHttpProtocolHandler.idl",
     28     "nsINetworkErrorLogging.idl",
     29     "nsIObliviousHttp.idl",
     30     "nsIObliviousHttpChannel.idl",
     31     "nsIRaceCacheWithNetwork.idl",
     32     "nsIReplacedHttpResponse.idl",
     33     "nsITlsHandshakeListener.idl",
     34     "nsIWellKnownOpportunisticUtils.idl",
     35 ]
     36 
     37 XPIDL_MODULE = "necko_http"
     38 
     39 EXPORTS += [
     40     "nsCORSListenerProxy.h",
     41     "nsHttp.h",
     42     "nsHttpAtomList.h",
     43     "nsHttpHeaderArray.h",
     44     "nsHttpRequestHead.h",
     45     "nsHttpResponseHead.h",
     46 ]
     47 
     48 EXPORTS.mozilla.net += [
     49     "AltDataOutputStreamChild.h",
     50     "AltDataOutputStreamParent.h",
     51     "AltServiceChild.h",
     52     "AltServiceParent.h",
     53     "AltSvcTransactionChild.h",
     54     "AltSvcTransactionParent.h",
     55     "BackgroundChannelRegistrar.h",
     56     "BackgroundDataBridgeChild.h",
     57     "BackgroundDataBridgeParent.h",
     58     "CacheControlParser.h",
     59     "CacheEntryWriteHandleChild.h",
     60     "CacheEntryWriteHandleParent.h",
     61     "ClassOfService.h",
     62     "EarlyHintPreloader.h",
     63     "EarlyHintRegistrar.h",
     64     "EarlyHintsService.h",
     65     "HttpAuthUtils.h",
     66     "HttpBackgroundChannelChild.h",
     67     "HttpBackgroundChannelParent.h",
     68     "HttpBaseChannel.h",
     69     "HttpChannelChild.h",
     70     "HttpChannelParent.h",
     71     "HttpConnectionMgrChild.h",
     72     "HttpConnectionMgrParent.h",
     73     "HttpConnectionMgrShell.h",
     74     "HttpInfo.h",
     75     "HttpTransactionChild.h",
     76     "HttpTransactionParent.h",
     77     "HttpTransactionShell.h",
     78     "nsAHttpTransaction.h",
     79     "nsServerTiming.h",
     80     "NullHttpChannel.h",
     81     "NullHttpTransaction.h",
     82     "OpaqueResponseUtils.h",
     83     "ParentChannelListener.h",
     84     "PHttpChannelParams.h",
     85     "ReplacedHttpResponse.h",
     86     "SpeculativeTransaction.h",
     87     "TimingStruct.h",
     88 ]
     89 
     90 SOURCES += [
     91     "nsHttpChannelAuthProvider.cpp",  # redefines GetAuthType
     92 ]
     93 
     94 UNIFIED_SOURCES += [
     95     "AltDataOutputStreamChild.cpp",
     96     "AltDataOutputStreamParent.cpp",
     97     "AlternateServices.cpp",
     98     "AltServiceChild.cpp",
     99     "AltServiceParent.cpp",
    100     "AltSvcTransactionChild.cpp",
    101     "AltSvcTransactionParent.cpp",
    102     "ASpdySession.cpp",
    103     "BackgroundChannelRegistrar.cpp",
    104     "BackgroundDataBridgeChild.cpp",
    105     "BackgroundDataBridgeParent.cpp",
    106     "BinaryHttpRequest.cpp",
    107     "CacheControlParser.cpp",
    108     "Capsule.cpp",
    109     "CapsuleDecoder.cpp",
    110     "CapsuleEncoder.cpp",
    111     "CapsuleParser.cpp",
    112     "ConnectionDiagnostics.cpp",
    113     "ConnectionEntry.cpp",
    114     "ConnectionHandle.cpp",
    115     "DnsAndConnectSocket.cpp",
    116     "EarlyHintPreconnect.cpp",
    117     "EarlyHintPreloader.cpp",
    118     "EarlyHintRegistrar.cpp",
    119     "EarlyHintsService.cpp",
    120     "Http2Compression.cpp",
    121     "Http2Session.cpp",
    122     "Http2Stream.cpp",
    123     "Http2StreamBase.cpp",
    124     "Http2StreamTunnel.cpp",
    125     "Http2WebTransportSession.cpp",
    126     "Http2WebTransportStream.cpp",
    127     "Http3ConnectUDPStream.cpp",
    128     "Http3Session.cpp",
    129     "Http3Stream.cpp",
    130     "Http3StreamTunnel.cpp",
    131     "Http3WebTransportSession.cpp",
    132     "Http3WebTransportStream.cpp",
    133     "HttpAuthUtils.cpp",
    134     "HttpBackgroundChannelChild.cpp",
    135     "HttpBackgroundChannelParent.cpp",
    136     "HttpBaseChannel.cpp",
    137     "HttpChannelChild.cpp",
    138     "HttpChannelParent.cpp",
    139     "HttpConnectionBase.cpp",
    140     "HttpConnectionMgrChild.cpp",
    141     "HttpConnectionMgrParent.cpp",
    142     "HttpConnectionUDP.cpp",
    143     "HttpInfo.cpp",
    144     "HTTPSRecordResolver.cpp",
    145     "HttpTrafficAnalyzer.cpp",
    146     "HttpTransactionChild.cpp",
    147     "HttpTransactionParent.cpp",
    148     "InterceptedHttpChannel.cpp",
    149     "MockHttpAuth.cpp",
    150     "NetworkMarker.cpp",
    151     "nsAHttpConnection.cpp",
    152     "nsCORSListenerProxy.cpp",
    153     "nsHttp.cpp",
    154     "nsHttpActivityDistributor.cpp",
    155     "nsHttpAuthCache.cpp",
    156     "nsHttpAuthManager.cpp",
    157     "nsHttpBasicAuth.cpp",
    158     "nsHttpChannel.cpp",
    159     "nsHttpChunkedDecoder.cpp",
    160     "nsHttpConnection.cpp",
    161     "nsHttpConnectionInfo.cpp",
    162     "nsHttpConnectionMgr.cpp",
    163     "nsHttpDigestAuth.cpp",
    164     "nsHttpHeaderArray.cpp",
    165     "nsHttpNTLMAuth.cpp",
    166     "nsHttpRequestHead.cpp",
    167     "nsHttpResponseHead.cpp",
    168     "nsHttpTransaction.cpp",
    169     "nsServerTiming.cpp",
    170     "NullHttpChannel.cpp",
    171     "NullHttpTransaction.cpp",
    172     "ObliviousHttpChannel.cpp",
    173     "ObliviousHttpService.cpp",
    174     "OpaqueResponseUtils.cpp",
    175     "ParentChannelListener.cpp",
    176     "PendingTransactionInfo.cpp",
    177     "PendingTransactionQueue.cpp",
    178     "QuicSocketControl.cpp",
    179     "ReplacedHttpResponse.cpp",
    180     "SpeculativeTransaction.cpp",
    181     "TlsHandshaker.cpp",
    182     "TLSTransportLayer.cpp",
    183     "TRRServiceChannel.cpp",
    184     "WebTransportCertificateVerifier.cpp",
    185     "WebTransportFlowControl.cpp",
    186     "WebTransportSessionBase.cpp",
    187     "WebTransportStreamBase.cpp",
    188 ]
    189 
    190 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
    191     UNIFIED_SOURCES += [
    192         "HttpWinUtils.cpp",
    193     ]
    194 
    195 if CONFIG["TARGET_OS"] == "OSX":
    196     UNIFIED_SOURCES += [
    197         "MicrosoftEntraSSOUtils.mm",
    198     ]
    199     OS_LIBS += [
    200         "-framework AuthenticationServices",
    201     ]
    202 
    203 # These files cannot be built in unified mode because of OS X headers.
    204 SOURCES += [
    205     "nsHttpHandler.cpp",
    206 ]
    207 
    208 IPDL_SOURCES += [
    209     "HttpChannelParams.ipdlh",
    210     "PAltDataOutputStream.ipdl",
    211     "PAltService.ipdl",
    212     "PAltSvcTransaction.ipdl",
    213     "PBackgroundDataBridge.ipdl",
    214     "PCacheEntryWriteHandle.ipdl",
    215     "PHttpBackgroundChannel.ipdl",
    216     "PHttpChannel.ipdl",
    217     "PHttpConnectionMgr.ipdl",
    218     "PHttpTransaction.ipdl",
    219 ]
    220 
    221 include("/ipc/chromium/chromium-config.mozbuild")
    222 
    223 FINAL_LIBRARY = "xul"
    224 
    225 LOCAL_INCLUDES += [
    226     "/dom/base",
    227     "/netwerk/base",
    228     "/netwerk/cookie",
    229     "/netwerk/dns",
    230     "/netwerk/ipc",
    231     "/netwerk/socket/neqo_glue",
    232     "/netwerk/url-classifier",
    233 ]
    234 
    235 DEFINES["MOZ_APP_UA_NAME"] = f'"{CONFIG["MOZ_APP_UA_NAME"]}"'
    236 
    237 if CONFIG["MOZ_AUTH_EXTENSION"]:
    238     LOCAL_INCLUDES += [
    239         "/extensions/auth",
    240     ]
    241 
    242 EXTRA_JS_MODULES += [
    243     "HPKEConfigManager.sys.mjs",
    244     "NetworkErrorLogging.sys.mjs",
    245     "ObliviousHTTP.sys.mjs",
    246     "WellKnownOpportunisticUtils.sys.mjs",
    247 ]
    248 
    249 XPCOM_MANIFESTS += [
    250     "components.conf",
    251 ]
    252 
    253 include("/tools/fuzzing/libfuzzer-config.mozbuild")