summaryrefslogtreecommitdiffstats
path: root/build/moz.configure/memory.configure
diff options
context:
space:
mode:
Diffstat (limited to 'build/moz.configure/memory.configure')
-rw-r--r--build/moz.configure/memory.configure23
1 files changed, 21 insertions, 2 deletions
diff --git a/build/moz.configure/memory.configure b/build/moz.configure/memory.configure
index 4368ad8c86..477c9c58a4 100644
--- a/build/moz.configure/memory.configure
+++ b/build/moz.configure/memory.configure
@@ -25,6 +25,14 @@ set_define("MOZ_MEMORY", True, when="--enable-jemalloc")
add_old_configure_assignment("MOZ_MEMORY", True, when="--enable-jemalloc")
+@depends("--enable-jemalloc", moz_debug, win32_redist_dir)
+def check_redist(jemalloc, debug, win32_redist_dir):
+ if not jemalloc and not win32_redist_dir and not debug:
+ log.warning(
+ "When not building jemalloc, you need to build with --with-redist or set WIN32_REDIST_DIR."
+ )
+
+
@depends(milestone, build_project)
def replace_malloc_default(milestone, build_project):
if build_project == "memory":
@@ -63,16 +71,27 @@ set_config("MOZ_REPLACE_MALLOC_STATIC", replace_malloc_static)
# crash reporter.
@depends(
build_project,
+ milestone,
target,
when="--enable-jemalloc",
)
-def phc_default(build_project, target):
+def phc_default(build_project, milestone, target):
if build_project == "js":
return False
+ # PHC has a performance bottleneck on aarch64 (Bug 1874022) it's okay
+ # for nightly but not for release yet. To support unified builds on
+ # MacOS the x86_64 and aarch64 builds must match, so we disable PHC for
+ # x86_64 on MacOS late beta and release.
+ cpu_support = ("x86_64",)
+ if milestone.is_early_beta_or_earlier:
+ cpu_support = ("x86_64", "aarch64")
+ elif target.os == "OSX":
+ cpu_support = ()
+
# Both Linux32 and Win32 have frequent crashes when stack tracing (for
# unclear reasons), so PHC is enabled only on 64-bit only in both cases.
- return (target.cpu in ("x86_64", "aarch64")) and (
+ return (target.cpu in cpu_support) and (
(target.os == "GNU" and target.kernel == "Linux")
or (target.kernel == "WINNT")
or (target.os == "OSX")