Bug 1941695 - Rename USE_STATIC_LIBS. r=firefox-build-system-reviewers,application-update-reviewers,media-playback-reviewers,padenot,bytesized,sergesanspaille
The name is confusing, as it doesn't apply to all libraries, and only on Windows non-mingw. Differential Revision: https://phabricator.services.mozilla.com/D234260
This commit is contained in:
@@ -10,7 +10,7 @@ SOURCES += ["pure_virtual.c"]
|
|||||||
|
|
||||||
FORCE_STATIC_LIB = True
|
FORCE_STATIC_LIB = True
|
||||||
|
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
# Build a real library so that the linker can remove it if the symbol
|
# Build a real library so that the linker can remove it if the symbol
|
||||||
# is never used.
|
# is never used.
|
||||||
|
|||||||
@@ -12,5 +12,5 @@ SharedLibrary("crashinjectdll")
|
|||||||
|
|
||||||
DEFFILE = "crashinjectdll.def"
|
DEFFILE = "crashinjectdll.def"
|
||||||
|
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
NO_PGO = True
|
NO_PGO = True
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if CONFIG["ENABLE_TESTS"]:
|
|||||||
SOURCES += [
|
SOURCES += [
|
||||||
"crashinject.cpp",
|
"crashinject.cpp",
|
||||||
]
|
]
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
NO_PGO = True
|
NO_PGO = True
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ if CONFIG["OS_ARCH"] == "WINNT":
|
|||||||
"user32",
|
"user32",
|
||||||
]
|
]
|
||||||
|
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
NoVisibilityFlags()
|
NoVisibilityFlags()
|
||||||
# Don't use STL wrappers; this isn't Gecko code
|
# Don't use STL wrappers; this isn't Gecko code
|
||||||
DisableStlWrapping()
|
DisableStlWrapping()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ SOURCES += [
|
|||||||
|
|
||||||
SharedLibrary("fakeopenh264")
|
SharedLibrary("fakeopenh264")
|
||||||
|
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
NoVisibilityFlags()
|
NoVisibilityFlags()
|
||||||
# Don't use STL wrappers; this isn't Gecko code
|
# Don't use STL wrappers; this isn't Gecko code
|
||||||
DisableStlWrapping()
|
DisableStlWrapping()
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ LOCAL_INCLUDES += [
|
|||||||
DEFINES["MAR_NSS"] = True
|
DEFINES["MAR_NSS"] = True
|
||||||
|
|
||||||
if CONFIG["OS_ARCH"] == "WINNT":
|
if CONFIG["OS_ARCH"] == "WINNT":
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|||||||
@@ -28,4 +28,4 @@ if CONFIG["MOZ_BUILD_APP"] != "tools/update-packaging":
|
|||||||
FORCE_STATIC_LIB = True
|
FORCE_STATIC_LIB = True
|
||||||
|
|
||||||
if CONFIG["OS_ARCH"] == "WINNT":
|
if CONFIG["OS_ARCH"] == "WINNT":
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ if CONFIG["MOZ_BUILD_APP"] != "tools/update-packaging":
|
|||||||
DEFINES["MAR_NSS"] = True
|
DEFINES["MAR_NSS"] = True
|
||||||
|
|
||||||
if CONFIG["OS_ARCH"] == "WINNT":
|
if CONFIG["OS_ARCH"] == "WINNT":
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
OS_LIBS += [
|
OS_LIBS += [
|
||||||
"ws2_32",
|
"ws2_32",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ UNIFIED_SOURCES += [
|
|||||||
FORCE_STATIC_LIB = True
|
FORCE_STATIC_LIB = True
|
||||||
|
|
||||||
if CONFIG["OS_ARCH"] == "WINNT":
|
if CONFIG["OS_ARCH"] == "WINNT":
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
elif CONFIG["OS_ARCH"] == "Darwin" and not CONFIG["MOZ_USE_NSS_FOR_MAR"]:
|
elif CONFIG["OS_ARCH"] == "Darwin" and not CONFIG["MOZ_USE_NSS_FOR_MAR"]:
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
"MacVerifyCrypto.cpp",
|
"MacVerifyCrypto.cpp",
|
||||||
|
|||||||
@@ -29,6 +29,6 @@ DEFINES['XZ_DEC_X86'] = 1
|
|||||||
DEFINES['XZ_USE_CRC64'] = 1
|
DEFINES['XZ_USE_CRC64'] = 1
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
Library('xz-embedded')
|
Library('xz-embedded')
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ if CONFIG['HOST_OS_ARCH'] == 'WINNT':
|
|||||||
HOST_OS_LIBS += [
|
HOST_OS_LIBS += [
|
||||||
'ws2_32',
|
'ws2_32',
|
||||||
]
|
]
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
LOCAL_INCLUDES += [
|
LOCAL_INCLUDES += [
|
||||||
'/toolkit/mozapps/update/updater',
|
'/toolkit/mozapps/update/updater',
|
||||||
|
|||||||
@@ -1738,7 +1738,7 @@ VARIABLES = {
|
|||||||
"""Whether the library in this directory is a static library.
|
"""Whether the library in this directory is a static library.
|
||||||
""",
|
""",
|
||||||
),
|
),
|
||||||
"USE_STATIC_LIBS": (
|
"USE_STATIC_MSVCRT": (
|
||||||
bool,
|
bool,
|
||||||
bool,
|
bool,
|
||||||
"""Whether the code in this directory is a built against the static
|
"""Whether the code in this directory is a built against the static
|
||||||
@@ -3112,6 +3112,7 @@ DEPRECATION_HINTS = {
|
|||||||
|
|
||||||
DIST_FILES += [ 'foo' ]
|
DIST_FILES += [ 'foo' ]
|
||||||
""",
|
""",
|
||||||
|
"USE_STATIC_LIBS": "Please use the USE_STATIC_MSVCRT variable instead.",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make sure that all template variables have a deprecation hint.
|
# Make sure that all template variables have a deprecation hint.
|
||||||
|
|||||||
@@ -1311,17 +1311,17 @@ class TreeMetadataEmitter(LoggingMixin):
|
|||||||
passthru.variables["NO_DIST_INSTALL"] = True
|
passthru.variables["NO_DIST_INSTALL"] = True
|
||||||
|
|
||||||
# Ideally, this should be done in templates, but this is difficult at
|
# Ideally, this should be done in templates, but this is difficult at
|
||||||
# the moment because USE_STATIC_LIBS can be set after a template
|
# the moment because USE_STATIC_MSVCRT can be set after a template
|
||||||
# returns. Eventually, with context-based templates, it will be
|
# returns. Eventually, with context-based templates, it will be
|
||||||
# possible.
|
# possible.
|
||||||
if (
|
if (
|
||||||
context.config.substs.get("OS_ARCH") == "WINNT"
|
context.config.substs.get("OS_ARCH") == "WINNT"
|
||||||
and context.config.substs.get("CC_TYPE") == "clang-cl"
|
and context.config.substs.get("CC_TYPE") == "clang-cl"
|
||||||
):
|
):
|
||||||
use_static_lib = context.get(
|
use_static_msvcrt = context.get(
|
||||||
"USE_STATIC_LIBS"
|
"USE_STATIC_MSVCRT"
|
||||||
) and not context.config.substs.get("MOZ_ASAN")
|
) and not context.config.substs.get("MOZ_ASAN")
|
||||||
rtl_flag = "-MT" if use_static_lib else "-MD"
|
rtl_flag = "-MT" if use_static_msvcrt else "-MD"
|
||||||
if context.config.substs.get("MOZ_DEBUG") and not context.config.substs.get(
|
if context.config.substs.get("MOZ_DEBUG") and not context.config.substs.get(
|
||||||
"MOZ_NO_DEBUG_RTL"
|
"MOZ_NO_DEBUG_RTL"
|
||||||
):
|
):
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if CONFIG["ENABLE_TESTS"] and CONFIG["OS_ARCH"] == "WINNT":
|
|||||||
SOURCES += [
|
SOURCES += [
|
||||||
"minidumpwriter.cpp",
|
"minidumpwriter.cpp",
|
||||||
]
|
]
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
||||||
WIN32_EXE_LDFLAGS += ["-municode"]
|
WIN32_EXE_LDFLAGS += ["-municode"]
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
|
|||||||
SOURCES += [
|
SOURCES += [
|
||||||
"win32-screenshot.cpp",
|
"win32-screenshot.cpp",
|
||||||
]
|
]
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
||||||
WIN32_EXE_LDFLAGS += ["-municode"]
|
WIN32_EXE_LDFLAGS += ["-municode"]
|
||||||
OS_LIBS += [
|
OS_LIBS += [
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ LOCAL_INCLUDES += [
|
|||||||
"/toolkit/xre",
|
"/toolkit/xre",
|
||||||
]
|
]
|
||||||
|
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
if CONFIG["CC_TYPE"] == "clang-cl":
|
if CONFIG["CC_TYPE"] == "clang-cl":
|
||||||
WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
|
WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
|
||||||
|
|||||||
@@ -19,6 +19,6 @@ if CONFIG["RUSTC_VERSION"] and CONFIG["RUSTC_VERSION"] >= "1.78.0":
|
|||||||
]
|
]
|
||||||
|
|
||||||
DEFFILE = "mozwer.def"
|
DEFFILE = "mozwer.def"
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
SharedLibrary("mozwer")
|
SharedLibrary("mozwer")
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ if CONFIG["OS_ARCH"] == "WINNT":
|
|||||||
Library("updatecommon")
|
Library("updatecommon")
|
||||||
|
|
||||||
DEFINES["NS_NO_XPCOM"] = True
|
DEFINES["NS_NO_XPCOM"] = True
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
if CONFIG["DISABLE_UPDATER_AUTHENTICODE_CHECK"]:
|
if CONFIG["DISABLE_UPDATER_AUTHENTICODE_CHECK"]:
|
||||||
DEFINES["DISABLE_UPDATER_AUTHENTICODE_CHECK"] = True
|
DEFINES["DISABLE_UPDATER_AUTHENTICODE_CHECK"] = True
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ if CONFIG["CC_TYPE"] == "clang-cl":
|
|||||||
if CONFIG["OS_ARCH"] == "WINNT":
|
if CONFIG["OS_ARCH"] == "WINNT":
|
||||||
DEFINES["UNICODE"] = True
|
DEFINES["UNICODE"] = True
|
||||||
DEFINES["_UNICODE"] = True
|
DEFINES["_UNICODE"] = True
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
||||||
WIN32_EXE_LDFLAGS += ["-municode"]
|
WIN32_EXE_LDFLAGS += ["-municode"]
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
if CONFIG["OS_ARCH"] == "WINNT":
|
if CONFIG["OS_ARCH"] == "WINNT":
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
EXPORTS += [
|
EXPORTS += [
|
||||||
"bspatch.h",
|
"bspatch.h",
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if CONFIG["OS_ARCH"] == "WINNT":
|
|||||||
RCINCLUDE = "%supdater.rc" % updater_rel_path
|
RCINCLUDE = "%supdater.rc" % updater_rel_path
|
||||||
DEFINES["UNICODE"] = True
|
DEFINES["UNICODE"] = True
|
||||||
DEFINES["_UNICODE"] = True
|
DEFINES["_UNICODE"] = True
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
# Pick up nsWindowsRestart.cpp
|
# Pick up nsWindowsRestart.cpp
|
||||||
LOCAL_INCLUDES += [
|
LOCAL_INCLUDES += [
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ LOCAL_INCLUDES += [
|
|||||||
]
|
]
|
||||||
|
|
||||||
DisableStlWrapping()
|
DisableStlWrapping()
|
||||||
USE_STATIC_LIBS = True
|
USE_STATIC_MSVCRT = True
|
||||||
|
|
||||||
OS_LIBS += [
|
OS_LIBS += [
|
||||||
"advapi32",
|
"advapi32",
|
||||||
|
|||||||
Reference in New Issue
Block a user