Bug 1256604 - Remove toolkit/content/Makefile.in and move setting CXXFLAGS for buildconfig.html to moz.build draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 09 Nov 2017 10:45:00 -0800
changeset 695728 1c5fc9a71d5980b14dac5a3fae3ae823c3c4d401
parent 695307 e2f87726b6082db0ae8a0866f65bff6b7062a07c
child 739689 594f3b44a3e0bd9de400085c7a846c38d459bb09
push id88519
push userbmo:cmanchester@mozilla.com
push dateThu, 09 Nov 2017 18:45:11 +0000
bugs1256604
milestone58.0a1
Bug 1256604 - Remove toolkit/content/Makefile.in and move setting CXXFLAGS for buildconfig.html to moz.build MozReview-Commit-ID: FZ6MTVAWSZa
config/faster/rules.mk
toolkit/content/Makefile.in
toolkit/content/buildconfig.html
toolkit/content/moz.build
--- a/config/faster/rules.mk
+++ b/config/faster/rules.mk
@@ -54,18 +54,17 @@ ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 default:
 	$(MAKE) -C $(TOPOBJDIR)/$(MOZ_BUILD_APP)/app repackage
 endif
 endif
 
 .PHONY: FORCE
 
 # Extra define to trigger some workarounds. We should strive to limit the
-# use of those. As of writing the only ones are in
-# toolkit/content/buildconfig.html and browser/locales/jar.mn.
+# use of those. As of writing the only one is in browser/locales/jar.mn.
 ACDEFINES += -DBUILD_FASTER
 
 # Files under the faster/ sub-directory, however, are not meant to use the
 # fallback
 $(TOPOBJDIR)/faster/%: ;
 
 # Generic rule to fall back to the recursive make backend.
 # This needs to stay after other $(TOPOBJDIR)/* rules because GNU Make
deleted file mode 100644
--- a/toolkit/content/Makefile.in
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# 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/.
-
-DEFINES += \
-  -DCXXFLAGS='$(CXXFLAGS)' \
-  -DCPPFLAGS='$(CPPFLAGS)' \
-  $(NULL)
--- a/toolkit/content/buildconfig.html
+++ b/toolkit/content/buildconfig.html
@@ -45,19 +45,17 @@
     <tr>
       <td>@CC@</td>
       <td>@CC_VERSION@</td>
       <td>@CFLAGS@</td>
     </tr>
     <tr>
       <td>@CXX@</td>
       <td>@CC_VERSION@</td>
-#ifndef BUILD_FASTER
-      <td>@CXXFLAGS@ @CPPFLAGS@</td>
-#endif
+      <td>@CXXFLAGS@</td>
     </tr>
   </tbody>
 </table>
 <h2>Configure options</h2>
 <p>@MOZ_CONFIGURE_OPTIONS@</p>
 #ifdef ANDROID
 <h2>Package name</h2>
 <p>@ANDROID_PACKAGE_NAME@</p>
--- a/toolkit/content/moz.build
+++ b/toolkit/content/moz.build
@@ -6,16 +6,22 @@
 
 TEST_DIRS += ['tests']
 
 for var in ('target', 'MOZ_CONFIGURE_OPTIONS', 'CC', 'CC_VERSION', 'CXX'):
     DEFINES[var] = CONFIG[var]
 
 DEFINES['CFLAGS'] = ' '.join(CONFIG['OS_CFLAGS'])
 
+cxx_flags = []
+for var in ('OS_CPPFLAGS', 'OS_CXXFLAGS', 'DEBUG', 'OPTIMIZE', 'FRAMEPTR'):
+    cxx_flags += COMPILE_FLAGS.get(var, [])
+
+DEFINES['CXXFLAGS'] = ' '.join(cxx_flags)
+
 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
 
 if CONFIG['MOZ_BUILD_APP'] == 'mobile/android':