Bug 1403346 - Use AC_SUBST_LIST for various configure variables containing compile flags. r=glandium
authorChris Manchester <cmanchester@mozilla.com>
Wed, 25 Oct 2017 15:11:54 -0700
changeset 441555 f11039e7ba7a394f4d186f29d0e586ac65f4b874
parent 441554 2b8f53e41e4e86ad4daaf870576f76e899b9c0e5
child 441556 3206a73af5455c96649d0192e1507437efc63729
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1403346
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1403346 - Use AC_SUBST_LIST for various configure variables containing compile flags. r=glandium MozReview-Commit-ID: 6BjKBSVGAw4
js/src/builtin/embedjs.py
js/src/old-configure.in
old-configure.in
toolkit/content/moz.build
--- a/js/src/builtin/embedjs.py
+++ b/js/src/builtin/embedjs.py
@@ -138,17 +138,17 @@ def get_config_defines(buildconfig):
   return env
 
 def process_inputs(namespace, c_out, msg_file, inputs):
   deps = [path for path in inputs if path.endswith(".h") or path.endswith(".h.js")]
   sources = [path for path in inputs if path.endswith(".js") and not path.endswith(".h.js")]
   assert len(deps) + len(sources) == len(inputs)
   cxx = shlex.split(buildconfig.substs['CXX'])
   pp_option = buildconfig.substs['PREPROCESS_OPTION']
-  cppflags = shlex.split(buildconfig.substs['OS_CPPFLAGS'])
+  cppflags = buildconfig.substs['OS_CPPFLAGS']
   cppflags += shlex.split(buildconfig.substs['WARNINGS_AS_ERRORS'])
   env = get_config_defines(buildconfig)
   js_path = re.sub(r"\.out\.h$", "", c_out.name) + ".js"
   msgs = messages(msg_file)
   with open(js_path, 'w') as js_out:
     embed(cxx, pp_option, cppflags, msgs, sources, c_out, js_out, namespace, env)
 
 def generate_selfhosted(c_out, msg_file, *inputs):
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1464,20 +1464,20 @@ if test -n "$MOZ_OPTIMIZE"; then
     AC_MSG_RESULT([$_results])
     if test "$_results" = "no"; then
         AC_MSG_ERROR([These compiler flags are invalid: $MOZ_OPTIMIZE_FLAGS])
     fi
     CFLAGS=$_SAVE_CFLAGS
 fi
 fi # COMPILE_ENVIRONMENT
 
-AC_SUBST(MOZ_FRAMEPTR_FLAGS)
-AC_SUBST(MOZ_OPTIMIZE_FLAGS)
+AC_SUBST_LIST(MOZ_FRAMEPTR_FLAGS)
+AC_SUBST_LIST(MOZ_OPTIMIZE_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
-AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS)
+AC_SUBST_LIST(MOZ_PGO_OPTIMIZE_FLAGS)
 
 dnl ========================================================
 dnl = Trace logging. Enabled by default in DEBUG builds.
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(trace-logging,
 [  --enable-trace-logging   Enable trace logging],
     ENABLE_TRACE_LOGGING=1,
     ENABLE_TRACE_LOGGING= )
@@ -2015,19 +2015,19 @@ AC_SUBST(MOZ_SYSTEM_NSPR)
 
 OS_CFLAGS="$CFLAGS"
 OS_CXXFLAGS="$CXXFLAGS"
 OS_CPPFLAGS="$CPPFLAGS"
 OS_COMPILE_CFLAGS="$COMPILE_CFLAGS"
 OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS"
 OS_LDFLAGS="$LDFLAGS"
 OS_LIBS="$LIBS"
-AC_SUBST(OS_CFLAGS)
-AC_SUBST(OS_CXXFLAGS)
-AC_SUBST(OS_CPPFLAGS)
+AC_SUBST_LIST(OS_CFLAGS)
+AC_SUBST_LIST(OS_CXXFLAGS)
+AC_SUBST_LIST(OS_CPPFLAGS)
 AC_SUBST_LIST(OS_COMPILE_CFLAGS)
 AC_SUBST_LIST(OS_COMPILE_CXXFLAGS)
 AC_SUBST(OS_LDFLAGS)
 AC_SUBST(OS_LIBS)
 
 AC_SUBST(HOST_CC)
 AC_SUBST(HOST_CXX)
 AC_SUBST(HOST_CFLAGS)
--- a/old-configure.in
+++ b/old-configure.in
@@ -3734,20 +3734,20 @@ if test -n "$MOZ_OPTIMIZE"; then
     AC_MSG_RESULT([$_results])
     if test "$_results" = "no"; then
         AC_MSG_ERROR([These compiler flags for C are invalid: $MOZ_OPTIMIZE_FLAGS])
     fi
     CFLAGS=$_SAVE_CFLAGS
 fi
 fi # COMPILE_ENVIRONMENT
 
-AC_SUBST(MOZ_FRAMEPTR_FLAGS)
-AC_SUBST(MOZ_OPTIMIZE_FLAGS)
+AC_SUBST_LIST(MOZ_FRAMEPTR_FLAGS)
+AC_SUBST_LIST(MOZ_OPTIMIZE_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
-AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS)
+AC_SUBST_LIST(MOZ_PGO_OPTIMIZE_FLAGS)
 
 dnl ========================================================
 dnl = Disable treating compiler warnings as errors
 dnl ========================================================
 if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
    WARNINGS_AS_ERRORS=''
 fi
 
@@ -4811,19 +4811,19 @@ AC_SUBST(OS_COMPILE_CMMFLAGS)
 
 OS_CFLAGS="$CFLAGS"
 OS_CXXFLAGS="$CXXFLAGS"
 OS_CPPFLAGS="$CPPFLAGS"
 OS_COMPILE_CFLAGS="$COMPILE_CFLAGS"
 OS_COMPILE_CXXFLAGS="$COMPILE_CXXFLAGS"
 OS_LDFLAGS="$LDFLAGS"
 OS_LIBS="$LIBS"
-AC_SUBST(OS_CFLAGS)
-AC_SUBST(OS_CXXFLAGS)
-AC_SUBST(OS_CPPFLAGS)
+AC_SUBST_LIST(OS_CFLAGS)
+AC_SUBST_LIST(OS_CXXFLAGS)
+AC_SUBST_LIST(OS_CPPFLAGS)
 AC_SUBST_LIST(OS_COMPILE_CFLAGS)
 AC_SUBST_LIST(OS_COMPILE_CXXFLAGS)
 AC_SUBST(OS_LDFLAGS)
 AC_SUBST(OS_LIBS)
 
 AC_SUBST(HOST_CC)
 AC_SUBST(HOST_CXX)
 AC_SUBST(HOST_CFLAGS)
--- a/toolkit/content/moz.build
+++ b/toolkit/content/moz.build
@@ -4,17 +4,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['tests']
 
 for var in ('target', 'MOZ_CONFIGURE_OPTIONS', 'CC', 'CC_VERSION', 'CXX'):
     DEFINES[var] = CONFIG[var]
 
-DEFINES['CFLAGS'] = CONFIG['OS_CFLAGS']
+DEFINES['CFLAGS'] = ' '.join(CONFIG['OS_CFLAGS'])
 
 if CONFIG['OS_TARGET'] == 'Android':
     DEFINES['ANDROID_PACKAGE_NAME'] = CONFIG['ANDROID_PACKAGE_NAME']
     DEFINES['MOZ_USE_LIBCXX'] = True
 
 if CONFIG['MOZ_INSTALL_TRACKING']:
     DEFINES['MOZ_INSTALL_TRACKING'] = 1