From 3aa9a0a7804b5b5354eda7895fc023f7e2639e43 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 28 May 2024 01:13:59 +0000 Subject: [PATCH] Bug 1872320 - Fix --enable-project=memory build. r=pbone Differential Revision: https://phabricator.services.mozilla.com/D211796 --- memory/build/moz.build | 3 +++ memory/build/test/moz.build | 2 +- memory/mozjemalloc_info/moz.build | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/memory/build/moz.build b/memory/build/moz.build index da679773308b..06711b7052f1 100644 --- a/memory/build/moz.build +++ b/memory/build/moz.build @@ -16,6 +16,9 @@ EXPORTS += [ LIBRARY_DEFINES["MOZ_HAS_MOZGLUE"] = True DEFINES["MOZ_MEMORY_IMPL"] = True +if CONFIG["MOZ_BUILD_APP"] == "memory": + DEFINES["IMPL_MFBT"] = True + if CONFIG["MOZ_REPLACE_MALLOC"]: EXPORTS += [ "replace_malloc.h", diff --git a/memory/build/test/moz.build b/memory/build/test/moz.build index d93cc48c6545..e61f0dbc6bfc 100644 --- a/memory/build/test/moz.build +++ b/memory/build/test/moz.build @@ -17,5 +17,5 @@ CppUnitTests( ) # The gtests won't work in a SpiderMonkey-only build or a build without # jemalloc. -if CONFIG["MOZ_PHC"]: +if CONFIG["MOZ_PHC"] and CONFIG["MOZ_BUILD_APP"] != "memory": TEST_DIRS += ["gtest"] diff --git a/memory/mozjemalloc_info/moz.build b/memory/mozjemalloc_info/moz.build index ac4f8567cb31..c0fc07e8ad31 100644 --- a/memory/mozjemalloc_info/moz.build +++ b/memory/mozjemalloc_info/moz.build @@ -9,6 +9,7 @@ Program("mozjemalloc-info") SOURCES += [ "/mfbt/Assertions.cpp", "/mfbt/RandomNum.cpp", + "/mfbt/TaggedAnonymousMemory.cpp", "/mozglue/misc/StackWalk.cpp", "MozjemallocInfo.cpp", ]