diff --git a/js/src/old-configure.in b/js/src/old-configure.in index e6b82e6840df..d9ac19c01c94 100644 --- a/js/src/old-configure.in +++ b/js/src/old-configure.in @@ -543,15 +543,6 @@ AC_LANG_CPLUSPLUS MOZ_CXX11 -case "${OS_TARGET}" in -WINNT|Darwin|Android) - ;; -*) - STL_FLAGS="-I${DIST}/stl_wrappers" - WRAP_STL_INCLUDES=1 - ;; -esac - dnl Checks for header files. dnl ======================================================== AC_HEADER_DIRENT diff --git a/old-configure.in b/old-configure.in index df8d394fbd9d..65c78a3b0cf0 100644 --- a/old-configure.in +++ b/old-configure.in @@ -125,9 +125,6 @@ case "$target" in fi WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && (pwd -W 2>/dev/null || pwd)` fi - - WRAP_STL_INCLUDES=1 - STL_FLAGS="-I${DIST}/stl_wrappers" else # Check w32api version _W32API_MAJOR_VERSION=`echo $W32API_VERSION | $AWK -F\. '{ print $1 }'` @@ -176,9 +173,6 @@ fi # COMPILE_ENVIRONMENT AC_SUBST(GNU_CC) AC_SUBST(GNU_CXX) -AC_SUBST_LIST(STL_FLAGS) -AC_SUBST(WRAP_STL_INCLUDES) - dnl ======================================================== dnl set the defaults first dnl ======================================================== @@ -603,13 +597,6 @@ MOZ_CXX11 AC_LANG_C -STL_FLAGS="-I${DIST}/stl_wrappers" -WRAP_STL_INCLUDES=1 - -if test "$MOZ_BUILD_APP" = "tools/crashreporter/injector"; then - WRAP_STL_INCLUDES= -fi - dnl Checks for header files. dnl ======================================================== AC_HEADER_DIRENT diff --git a/toolkit/moz.configure b/toolkit/moz.configure index 996b0bc484ce..47c10080a7ee 100644 --- a/toolkit/moz.configure +++ b/toolkit/moz.configure @@ -3314,3 +3314,12 @@ option( ) set_config("MOZ_SYSTEM_POLICIES", True, when="--enable-system-policies") + + +# STL wrapping +# ============================================================== +set_config("WRAP_STL_INCLUDES", True) +set_config( + "STL_FLAGS", + depends(build_environment.dist)(lambda dist: [f"-I{dist}/stl_wrappers"]), +)