Bug 1706774: Adds required sources for the "memory" application r=firefox-build-system-reviewers,glandium

Replay, moajemalloc_info, phc, and memory needed additional
pieces (mostly Printf.cpp and dependencies) to build
successfully on Windows.

Depends on D114651

Differential Revision: https://phabricator.services.mozilla.com/D114652
This commit is contained in:
Mitchell Hentges 2021-05-18 15:00:39 +00:00
parent fc799c0fab
commit 304c8d6362
4 changed files with 39 additions and 3 deletions

View File

@ -14,3 +14,14 @@ DIRS += [
'/memory',
'/mfbt',
]
EXPORTS.mozilla += [
"/mozglue/misc/IntegerPrintfMacros.h",
"/mozglue/misc/Sprintf.h",
]
if CONFIG["OS_ARCH"] == "WINNT":
EXPORTS.mozilla += [
"/mozglue/misc/StackWalk_windows.h",
"/mozglue/misc/StackWalkThread.h",
]

View File

@ -23,6 +23,16 @@ DEFINES["IMPL_MFBT"] = True
if CONFIG["MOZ_NEEDS_LIBATOMIC"]:
OS_LIBS += ["atomic"]
UNIFIED_SOURCES += [
"/mfbt/double-conversion/double-conversion/bignum-dtoa.cc",
"/mfbt/double-conversion/double-conversion/bignum.cc",
"/mfbt/double-conversion/double-conversion/cached-powers.cc",
"/mfbt/double-conversion/double-conversion/double-to-string.cc",
"/mfbt/double-conversion/double-conversion/fast-dtoa.cc",
"/mfbt/double-conversion/double-conversion/fixed-dtoa.cc",
"/mozglue/misc/Printf.cpp",
]
DisableStlWrapping()
include("/mozglue/build/replace_malloc.mozbuild")

View File

@ -45,7 +45,7 @@ if CONFIG["MOZ_BUILD_APP"] == "memory":
"/mozglue/misc/StackWalk.h",
]
if CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
if CONFIG["MOZ_BUILD_APP"] == "memory" or CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
UNIFIED_SOURCES += [
"/mfbt/double-conversion/double-conversion/bignum-dtoa.cc",
"/mfbt/double-conversion/double-conversion/bignum.cc",
@ -57,7 +57,8 @@ if CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
"/mfbt/double-conversion/double-conversion/strtod.cc",
"/mozglue/misc/Printf.cpp",
]
else:
if not CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
SOURCES += [
"../FdPrintf.cpp",
]

View File

@ -7,6 +7,7 @@
ReplaceMalloc("phc")
DEFINES["MOZ_NO_MOZALLOC"] = True
DEFINES["IMPL_MFBT"] = True
LOCAL_INCLUDES += [
"../logalloc",
@ -21,8 +22,21 @@ UNIFIED_SOURCES += [
"PHC.cpp",
]
if CONFIG["MOZ_BUILD_APP"] == "memory":
UNIFIED_SOURCES += [
"/mfbt/double-conversion/double-conversion/bignum-dtoa.cc",
"/mfbt/double-conversion/double-conversion/bignum.cc",
"/mfbt/double-conversion/double-conversion/cached-powers.cc",
"/mfbt/double-conversion/double-conversion/double-to-string.cc",
"/mfbt/double-conversion/double-conversion/fast-dtoa.cc",
"/mfbt/double-conversion/double-conversion/fixed-dtoa.cc",
"/mfbt/double-conversion/double-conversion/string-to-double.cc",
"/mfbt/double-conversion/double-conversion/strtod.cc",
"/mozglue/misc/Printf.cpp",
]
if not CONFIG["MOZ_REPLACE_MALLOC_STATIC"]:
SOURCES += [
UNIFIED_SOURCES += [
"../logalloc/FdPrintf.cpp",
"/mozglue/misc/StackWalk.cpp",
]