Issue #80 - reinstated unified building for some large chunks of our code.

This should reduce compile complexity saving time and reducing linker stress.
This commit is contained in:
Moonchild 2022-09-04 11:50:24 +00:00 • committed by roytam1
commit 5dfded811d
115 changed files with 293 additions and 258 deletions

View file

@ -181,7 +181,7 @@ EXPORTS.mozilla.net += [
'ReferrerPolicy.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'ArrayBufferInputStream.cpp',
'BackgroundFileSaver.cpp',
'CaptivePortalService.cpp',

View file

@ -20,7 +20,7 @@ EXPORTS += [
'nsDeleteDir.h'
]
SOURCES += [
UNIFIED_SOURCES += [
'nsApplicationCacheService.cpp',
'nsCache.cpp',
'nsCacheEntry.cpp',

View file

@ -16,8 +16,6 @@
using namespace mozilla;
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
//-----------------------------------------------------------------------------
// nsApplicationCacheService
//-----------------------------------------------------------------------------

View file

@ -17,8 +17,6 @@
#include "nsCacheService.h"
#include "nsApplicationCache.h"
#include "nsNetCID.h"
#include "nsNetUtil.h"
#include "nsIURI.h"
#include "nsAutoPtr.h"
#include "nsEscape.h"
@ -55,7 +53,6 @@ using namespace mozilla::storage;
using mozilla::NeckoOriginAttributes;
static const char OFFLINE_CACHE_DEVICE_ID[] = { "offline" };
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
#define LOG(args) CACHE_LOG_DEBUG(args)

View file

@ -21,6 +21,10 @@
#include "nsWeakReference.h"
#include "mozilla/Attributes.h"
#include "mozilla/Mutex.h"
#include "nsNetCID.h"
#include "nsNetUtil.h"
static NS_DEFINE_CID(kCacheServiceCID, NS_CACHESERVICE_CID);
class nsIURI;
class nsOfflineCacheDevice;

View file

@ -20,8 +20,7 @@ EXPORTS += [
'CacheStorageService.h',
]
SOURCES += [
'AppCacheStorage.cpp',
UNIFIED_SOURCES += [
'CacheEntry.cpp',
'CacheFile.cpp',
'CacheFileChunk.cpp',
@ -43,6 +42,11 @@ SOURCES += [
'OldWrappers.cpp',
]
# AppCacheStorage.cpp cannot be built in unified mode because it uses plarena.h.
SOURCES += [
'AppCacheStorage.cpp',
]
LOCAL_INCLUDES += [
'/netwerk/base',
'/netwerk/cache',

View file

@ -20,10 +20,13 @@ if CONFIG['NECKO_COOKIES']:
'CookieServiceChild.h',
'CookieServiceParent.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'CookieServiceChild.cpp',
'CookieServiceParent.cpp',
'nsCookie.cpp',
]
# nsCookieService.cpp can't be unified because of symbol conflicts
SOURCES += [
'nsCookieService.cpp',
]
LOCAL_INCLUDES += [

View file

@ -28,6 +28,11 @@ EXPORTS.mozilla.net += [
]
SOURCES += [
'nsEffectiveTLDService.cpp', # Excluded from UNIFIED_SOURCES due to special build flags.
'nsHostResolver.cpp', # Redefines LOG
]
UNIFIED_SOURCES += [
'ChildDNSService.cpp',
'DNS.cpp',
'DNSListenerProxy.cpp',
@ -35,8 +40,6 @@ SOURCES += [
'DNSRequestParent.cpp',
'GetAddrInfo.cpp',
'nsDNSService2.cpp',
'nsEffectiveTLDService.cpp',
'nsHostResolver.cpp',
'nsIDNService.cpp',
'punycode.c',
]

View file

@ -11,7 +11,7 @@ EXPORTS.mozilla.net += [
'NeckoParent.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'ChannelEventQueue.cpp',
'NeckoChild.cpp',
'NeckoCommon.cpp',

View file

@ -7,7 +7,7 @@ EXPORTS.mozilla.net += [
'DataChannelParent.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'DataChannelChild.cpp',
'DataChannelParent.cpp',
'nsDataChannel.cpp',

View file

@ -3,7 +3,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [
UNIFIED_SOURCES += [
'nsDeviceChannel.cpp',
'nsDeviceProtocolHandler.cpp',
]

View file

@ -14,7 +14,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_file'
SOURCES += [
UNIFIED_SOURCES += [
'nsFileChannel.cpp',
'nsFileProtocolHandler.cpp',
]

View file

@ -19,7 +19,7 @@ EXPORTS.mozilla.net += [
'FTPChannelParent.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'FTPChannelChild.cpp',
'FTPChannelParent.cpp',
'nsFTPChannel.cpp',

View file

@ -42,11 +42,18 @@ EXPORTS.mozilla.net += [
'TimingStruct.h',
]
# ASpdySession.cpp and nsHttpAuthCache cannot be built in unified mode because
# they use plarena.h.
SOURCES += [
'AltDataOutputStreamChild.cpp',
'AltDataOutputStreamParent.cpp',
'AlternateServices.cpp',
'ASpdySession.cpp',
'nsHttpAuthCache.cpp',
'nsHttpChannelAuthProvider.cpp', # redefines GetAuthType
]
UNIFIED_SOURCES += [
'AltDataOutputStreamChild.cpp',
'AltDataOutputStreamParent.cpp',
'CacheControlParser.cpp',
'ConnectionDiagnostics.cpp',
'Http2Compression.cpp',
@ -62,17 +69,14 @@ SOURCES += [
'nsCORSListenerProxy.cpp',
'nsHttp.cpp',
'nsHttpActivityDistributor.cpp',
'nsHttpAuthCache.cpp',
'nsHttpAuthManager.cpp',
'nsHttpBasicAuth.cpp',
'nsHttpChannel.cpp',
'nsHttpChannelAuthProvider.cpp',
'nsHttpChunkedDecoder.cpp',
'nsHttpConnection.cpp',
'nsHttpConnectionInfo.cpp',
'nsHttpConnectionMgr.cpp',
'nsHttpDigestAuth.cpp',
'nsHttpHandler.cpp',
'nsHttpHeaderArray.cpp',
'nsHttpNTLMAuth.cpp',
'nsHttpPipeline.cpp',
@ -84,6 +88,11 @@ SOURCES += [
'TunnelUtils.cpp',
]
# These files cannot be built in unified mode because of OS X headers.
SOURCES += [
'nsHttpHandler.cpp',
]
IPDL_SOURCES += [
'PAltDataOutputStream.ipdl',
'PHttpChannel.ipdl',

View file

@ -10,7 +10,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_res'
SOURCES += [
UNIFIED_SOURCES += [
'ExtensionProtocolHandler.cpp',
'nsResProtocolHandler.cpp',
'SubstitutingProtocolHandler.cpp',

View file

@ -9,7 +9,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_viewsource'
SOURCES += [
UNIFIED_SOURCES += [
'nsViewSourceChannel.cpp',
'nsViewSourceHandler.cpp',
]

View file

@ -14,7 +14,7 @@ EXPORTS.mozilla.net += [
'WyciwygChannelParent.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'nsWyciwyg.cpp',
'nsWyciwygChannel.cpp',
'nsWyciwygProtocolHandler.cpp',

View file

@ -17,7 +17,7 @@ LOCAL_INCLUDES += [
'/netwerk/base',
]
SOURCES += [
UNIFIED_SOURCES += [
'nsSocketProviderService.cpp',
'nsSOCKSIOLayer.cpp',
'nsSOCKSSocketProvider.cpp',
@ -28,7 +28,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
XPIDL_SOURCES += [
'nsINamedPipeService.idl',
]
SOURCES += [
UNIFIED_SOURCES += [
'nsNamedPipeIOLayer.cpp',
'nsNamedPipeService.cpp'
]

View file

@ -3,7 +3,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
SOURCES += [
UNIFIED_SOURCES += [
'crypto/cipher/aes.c',
'crypto/cipher/aes_cbc.c',
'crypto/cipher/aes_icm.c',

View file

@ -9,7 +9,7 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_http'
SOURCES += [
UNIFIED_SOURCES += [
'mozTXTToHTMLConv.cpp',
'nsDirIndex.cpp',
'nsDirIndexParser.cpp',
@ -21,13 +21,13 @@ SOURCES += [
]
if 'ftp' in CONFIG['NECKO_PROTOCOLS']:
SOURCES += [
UNIFIED_SOURCES += [
'nsFTPDirListingConv.cpp',
'ParseFTPList.cpp',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'cocoa':
SOURCES += [
UNIFIED_SOURCES += [
'nsBinHexDecoder.cpp',
]

View file

@ -11,13 +11,16 @@ XPIDL_SOURCES += [
XPIDL_MODULE = 'necko_wifi'
SOURCES += [
UNIFIED_SOURCES += [
'nsWifiAccessPoint.cpp',
]
UNIFIED_SOURCES += [
'nsWifiMonitor.cpp',
]
if CONFIG['OS_ARCH'] == 'Darwin':
SOURCES += [
UNIFIED_SOURCES += [
'nsWifiScannerMac.cpp',
]
SOURCES += [
@ -28,11 +31,11 @@ if CONFIG['OS_ARCH'] == 'Darwin':
# to accept the warnings when targeting the newer SDKs.
SOURCES['osx_corewlan.mm'].flags += ['-Wno-error=objc-method-access']
elif CONFIG['OS_ARCH'] in ('DragonFly', 'FreeBSD'):
SOURCES += [
UNIFIED_SOURCES += [
'nsWifiScannerFreeBSD.cpp',
]
elif CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += [
UNIFIED_SOURCES += [
'nsWifiScannerWin.cpp',
'win_wifiScanner.cpp',
'win_wlanLibrary.cpp',
@ -40,12 +43,12 @@ elif CONFIG['OS_ARCH'] == 'WINNT':
]
elif CONFIG['OS_ARCH'] == 'SunOS':
CXXFLAGS += CONFIG['GLIB_CFLAGS']
SOURCES += [
UNIFIED_SOURCES += [
'nsWifiScannerSolaris.cpp',
]
if CONFIG['NECKO_WIFI_DBUS']:
SOURCES += [
UNIFIED_SOURCES += [
'nsWifiScannerDBus.cpp',
]
CXXFLAGS += ['-Wno-error=shadow']