Bug 1271886 - Move netapi32 to delay load DLLs. r?ted
netapi32's API isn't used at startup and browsing page. So netapi32 should move to delay load DLLs.
MozReview-Commit-ID: 1g25lnuwbfY
--- a/browser/components/build/moz.build
+++ b/browser/components/build/moz.build
@@ -20,23 +20,25 @@ LOCAL_INCLUDES += [
'../feeds',
'../migration',
'../shell',
]
if CONFIG['OS_ARCH'] == 'WINNT':
OS_LIBS += [
'esent',
+ 'netapi32',
'ole32',
'shell32',
'shlwapi',
'version',
]
DELAYLOAD_DLLS += [
'esent.dll',
+ 'netapi32.dll',
]
# Mac: Need to link with CoreFoundation for Mac Migrators (PList reading code)
# GTK2: Need to link with glib for GNOME shell service
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'gtk2', 'gtk3'):
OS_LIBS += CONFIG['TK_LIBS']
if CONFIG['GNU_CXX']:
--- a/old-configure.in
+++ b/old-configure.in
@@ -1320,17 +1320,17 @@ case "$target" in
MKCSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
RC='$(WINDRES)'
# Use static libgcc and libstdc++
LDFLAGS="$LDFLAGS -static"
NSPR_LDFLAGS="$NSPR_LDFLAGS -static-libgcc"
# Use temp file for windres (bug 213281)
RCFLAGS='-O coff --use-temp-file'
# mingw doesn't require kernel32, user32, and advapi32 explicitly
- LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32 -lnetapi32"
+ LIBS="$LIBS -luuid -lgdi32 -lwinmm -lwsock32 -luserenv -lsecur32"
MOZ_FIX_LINK_PATHS=
DLL_PREFIX=
IMPORT_LIB_SUFFIX=a
WIN32_CONSOLE_EXE_LDFLAGS=-mconsole
WIN32_GUI_EXE_LDFLAGS=-mwindows
# GCC/binutils can't link to a function if we try to include dllexport function
@@ -1467,17 +1467,17 @@ case "$target" in
# classes, and clang-cl helpfully warns about its non-support
# for such cases. We're not particularly worried about that,
# so ignore that warning.
CXXFLAGS="$CXXFLAGS -Wno-ignored-attributes"
fi
# make 'foo == bar;' error out
CFLAGS="$CFLAGS -we4553"
CXXFLAGS="$CXXFLAGS -we4553"
- LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib netapi32.lib"
+ LIBS="$LIBS kernel32.lib user32.lib gdi32.lib winmm.lib wsock32.lib advapi32.lib secur32.lib"
MOZ_DEBUG_LDFLAGS='-DEBUG -DEBUGTYPE:CV'
WARNINGS_AS_ERRORS='-WX'
MOZ_OPTIMIZE_FLAGS='-O1 -Oi'
MOZ_FIX_LINK_PATHS=
LDFLAGS="$LDFLAGS -LARGEADDRESSAWARE -NXCOMPAT"
if test -z "$DEVELOPER_OPTIONS"; then
LDFLAGS="$LDFLAGS -RELEASE"
fi
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -13,16 +13,17 @@ def Libxul(name):
SHARED_LIBRARY_NAME = 'XUL'
else:
GeckoSharedLibrary(name, linkage=None)
SHARED_LIBRARY_NAME = 'xul'
DELAYLOAD_DLLS += [
'comdlg32.dll',
'dbghelp.dll',
+ 'netapi32.dll',
'PowrProf.dll',
'psapi.dll',
'rasapi32.dll',
'rasdlg.dll',
'secur32.dll',
'wininet.dll',
'winspool.drv'
]
@@ -336,16 +337,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
OS_LIBS += [
'shell32',
'ole32',
'version',
'winspool',
'comdlg32',
'imm32',
'msimg32',
+ 'netapi32',
'shlwapi',
'psapi',
'ws2_32',
'dbghelp',
'rasapi32',
'rasdlg',
'iphlpapi',
'uxtheme',