moz.build (3052B)
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: DNS") 9 10 XPIDL_SOURCES += [ 11 "nsIDNSAdditionalInfo.idl", 12 "nsIDNSByTypeRecord.idl", 13 "nsIDNSListener.idl", 14 "nsIDNSRecord.idl", 15 "nsIDNSService.idl", 16 "nsIEffectiveTLDService.idl", 17 "nsIIDNService.idl", 18 "nsINativeDNSResolverOverride.idl", 19 "nsITRRSkipReason.idl", 20 "nsPIDNSService.idl", 21 ] 22 23 XPIDL_MODULE = "necko_dns" 24 25 XPCSHELL_TESTS_MANIFESTS += ["tests/unit/xpcshell.toml"] 26 27 EXPORTS += [ 28 "nsEffectiveTLDService.h", 29 ] 30 31 EXPORTS.mozilla.net += [ 32 "ChildDNSService.h", 33 "DNS.h", 34 "DNSByTypeRecord.h", 35 "DNSListenerProxy.h", 36 "DNSPacket.h", 37 "DNSRequestBase.h", 38 "DNSRequestChild.h", 39 "DNSRequestParent.h", 40 "DNSServiceBase.h", 41 "HTTPSSVC.h", 42 "IDNBlocklistUtils.h", 43 "NativeDNSResolverOverrideChild.h", 44 "NativeDNSResolverOverrideParent.h", 45 "TRRService.h", 46 "TRRServiceBase.h", 47 "TRRServiceChild.h", 48 "TRRServiceParent.h", 49 ] 50 51 SOURCES += [ 52 "GetAddrInfo.cpp", # Undefines UNICODE 53 "nsEffectiveTLDService.cpp", # Excluded from UNIFIED_SOURCES due to special build flags. 54 ] 55 56 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": 57 SOURCES += ["PlatformDNSWin.cpp"] 58 elif CONFIG["OS_TARGET"] == "Linux": 59 SOURCES += ["PlatformDNSUnix.cpp"] 60 OS_LIBS += ["resolv"] 61 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": 62 SOURCES += ["PlatformDNSMac.cpp"] 63 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": 64 SOURCES += ["PlatformDNSAndroid.cpp"] 65 else: 66 DEFINES["MOZ_NO_HTTPS_IMPL"] = 1 67 68 UNIFIED_SOURCES += [ 69 "ChildDNSService.cpp", 70 "DNS.cpp", 71 "DNSAdditionalInfo.cpp", 72 "DNSListenerProxy.cpp", 73 "DNSPacket.cpp", 74 "DNSRequestChild.cpp", 75 "DNSRequestParent.cpp", 76 "DNSServiceBase.cpp", 77 "DNSUtils.cpp", 78 "HostRecordQueue.cpp", 79 "HTTPSSVC.cpp", 80 "IDNBlocklistUtils.cpp", 81 "NativeDNSResolverOverrideChild.cpp", 82 "NativeDNSResolverOverrideParent.cpp", 83 "nsDNSService2.cpp", 84 "nsHostRecord.cpp", 85 "nsHostResolver.cpp", 86 "nsIDNService.cpp", 87 "TRR.cpp", 88 "TRRQuery.cpp", 89 "TRRService.cpp", 90 "TRRServiceBase.cpp", 91 "TRRServiceChild.cpp", 92 "TRRServiceParent.cpp", 93 ] 94 95 IPDL_SOURCES = [ 96 "PDNSRequest.ipdl", 97 "PDNSRequestParams.ipdlh", 98 "PNativeDNSResolverOverride.ipdl", 99 "PTRRService.ipdl", 100 ] 101 102 include("/ipc/chromium/chromium-config.mozbuild") 103 104 FINAL_LIBRARY = "xul" 105 106 GeneratedFile( 107 "etld_data.inc", script="prepare_tlds.py", inputs=["effective_tld_names.dat"] 108 ) 109 110 # need to include etld_data.inc 111 LOCAL_INCLUDES += [ 112 "/netwerk/base", 113 "/netwerk/ipc", 114 "/netwerk/protocol/http", 115 ] 116 117 USE_LIBS += ["icu"] 118 119 XPIDL_SOURCES += ["IOnionAliasService.idl"] 120 UNIFIED_SOURCES += ["OnionAliasService.cpp"] 121 EXPORTS.torproject += ["OnionAliasService.h"]