diff --git a/build/autoconf/compiler-opts.m4 b/build/autoconf/compiler-opts.m4 index 68960acbc136..268c2d2f5a42 100644 --- a/build/autoconf/compiler-opts.m4 +++ b/build/autoconf/compiler-opts.m4 @@ -31,12 +31,6 @@ dnl ======================================================== AC_DEFUN([MOZ_DEBUGGING_OPTS], [ -if test -z "$MOZ_DEBUG" -o -n "$MOZ_ASAN"; then - MOZ_NO_DEBUG_RTL=1 -fi - -AC_SUBST(MOZ_NO_DEBUG_RTL) - if test -n "$MOZ_DEBUG"; then if test -n "$COMPILE_ENVIRONMENT"; then AC_MSG_CHECKING([for valid debug flags]) diff --git a/build/moz.configure/flags.configure b/build/moz.configure/flags.configure index d07d31f71344..1bf155989f07 100644 --- a/build/moz.configure/flags.configure +++ b/build/moz.configure/flags.configure @@ -100,6 +100,20 @@ def pass_manager(enabled, compiler, host, target, pgo, enable_fuzzing, ubsan): set_config("MOZ_PASS_MANAGER_FLAGS", pass_manager.flags) +# Debugging options +## + + +@depends(moz_debug, asan, target, "--enable-jemalloc") +def moz_no_debug_rtl(moz_debug, asan, target, enable_jemalloc): + if not moz_debug or asan: + return True + if enable_jemalloc and target.kernel == "WINNT": + return True + + +set_config("MOZ_NO_DEBUG_RTL", moz_no_debug_rtl) + # Try to make builds more reproducible and allow sharing built artifacts across # source and object directories by using -ffile-prefix-map and friends. To diff --git a/js/src/old-configure.in b/js/src/old-configure.in index a55b25273d31..e1861f3c4f22 100644 --- a/js/src/old-configure.in +++ b/js/src/old-configure.in @@ -669,13 +669,6 @@ else esac fi -if test "$MOZ_MEMORY"; then - case "${target}" in - *-mingw*) - export MOZ_NO_DEBUG_RTL=1 - ;; - esac -fi AC_SUBST(MOZ_GLUE_IN_PROGRAM) dnl ======================================================== diff --git a/old-configure.in b/old-configure.in index 5729a2f4b2a7..f3c08f327c82 100644 --- a/old-configure.in +++ b/old-configure.in @@ -766,17 +766,6 @@ Android|WINNT|Darwin) AC_DEFINE(MOZ_GLUE_IN_PROGRAM) ;; esac - -dnl ======================================================== -dnl = Jemalloc build setup -dnl ======================================================== -if test -n "$MOZ_MEMORY"; then - case "${target}" in - *-mingw*) - export MOZ_NO_DEBUG_RTL=1 - ;; - esac -fi # MOZ_MEMORY AC_SUBST(MOZ_GLUE_IN_PROGRAM) dnl ========================================================