Bug 977964 - Move some flags to moz.build; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Mon, 03 Mar 2014 21:58:37 -0500
changeset 171666 36bd9996d6556b1682713da6f15d2599e8f3fd40
parent 171665 f60e8735ff29b596cc1a7fb8652a33c2748b6063
child 171667 f483d8507eea61c9ff3f9c1a0f08b21b064b915c
push id26335
push usercbook@mozilla.com
push dateTue, 04 Mar 2014 13:14:32 +0000
treeherdermozilla-central@765770122c29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs977964
milestone30.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 977964 - Move some flags to moz.build; r=glandium
hal/Makefile.in
hal/moz.build
media/omx-plugin/Makefile.in
media/omx-plugin/moz.build
netwerk/protocol/rtsp/Makefile.in
netwerk/protocol/rtsp/moz.build
toolkit/components/downloads/Makefile.in
toolkit/components/downloads/moz.build
toolkit/components/protobuf/Makefile.in
toolkit/components/protobuf/moz.build
--- a/hal/Makefile.in
+++ b/hal/Makefile.in
@@ -2,12 +2,8 @@
 # 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/.
 
 include $(topsrcdir)/config/rules.mk
 
 CFLAGS          += $(GLIB_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
 CXXFLAGS        += $(GLIB_CFLAGS) $(MOZ_DBUS_GLIB_CFLAGS)
-
-ifeq (gonk,$(MOZ_WIDGET_TOOLKIT))
-  LOCAL_INCLUDES += -I$(ANDROID_SOURCE)/hardware/libhardware_legacy/include
-endif
--- a/hal/moz.build
+++ b/hal/moz.build
@@ -183,8 +183,11 @@ if CONFIG['MOZ_GAMEPAD']:
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     # So that we can call nsScreenManagerGonk::GetConfiguration().
     LOCAL_INCLUDES += [
         '/widget/gonk',
         '/widget/xpwidgets'
     ]
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    CXXFLAGS += ['-I%s/hardware/libhardware_legacy/include' % CONFIG['ANDROID_SOURCE']]
--- a/media/omx-plugin/Makefile.in
+++ b/media/omx-plugin/Makefile.in
@@ -12,39 +12,21 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
 # Don't use STL wrappers; this isn't Gecko code
 STL_FLAGS =
 
 include $(topsrcdir)/config/rules.mk
 
-ifdef GNU_CXX
-# Stagefright header files define many multichar constants.
-CXXFLAGS += -Wno-multichar
-endif
-
 ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
 EXTRA_DSO_LDOPTS += \
                -lutils -lstagefright -lmedia -lstagefright_omx -lbinder -lui \
                -lhardware -lcutils \
 		$(NULL)
-
-CXXFLAGS += \
-                -I$(ANDROID_SOURCE)/dalvik/libnativehelper/include/nativehelper \
-                -I$(ANDROID_SOURCE)/frameworks/base/include/ \
-                -I$(ANDROID_SOURCE)/frameworks/base/include/binder/ \
-                -I$(ANDROID_SOURCE)/frameworks/base/include/utils/ \
-                -I$(ANDROID_SOURCE)/frameworks/base/include/media/ \
-                -I$(ANDROID_SOURCE)/frameworks/base/include/media/stagefright/openmax \
-                -I$(ANDROID_SOURCE)/frameworks/base/media/libstagefright/include \
-                -I$(ANDROID_SOURCE)/frameworks/base/native/include \
-                -I$(ANDROID_SOURCE)/system/core/include \
-                -I$(ANDROID_SOURCE)/hardware/libhardware/include \
-                $(NULL)
 else
 EXTRA_DSO_LDOPTS += \
 		-L$(DEPTH)/media/omx-plugin/lib/ics/libutils \
 		-lutils \
 		-L$(DEPTH)/media/omx-plugin/lib/ics/libstagefright \
 		-lstagefright \
 		-L$(DEPTH)/media/omx-plugin/lib/ics/libvideoeditorplayer \
 		-lvideoeditorplayer \
--- a/media/omx-plugin/moz.build
+++ b/media/omx-plugin/moz.build
@@ -28,8 +28,28 @@ LOCAL_INCLUDES += [
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     pass
 else:
     LOCAL_INCLUDES += [
         'include/ics',
         'include/ics/media/stagefright/openmax',
     ]
+
+if CONFIG['GNU_CXX']:
+    # Stagefright header files define many multichar constants.
+    CXXFLAGS += ['-Wno-multichar']
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
+    CXXFLAGS += [
+         '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
+             'dalvik/libnativehelper/include/nativehelper',
+             'frameworks/base/include/',
+             'frameworks/base/include/binder/',
+             'frameworks/base/include/utils/',
+             'frameworks/base/include/media/',
+             'frameworks/base/include/media/stagefright/openmax',
+             'frameworks/base/media/libstagefright/include',
+             'frameworks/base/native/include',
+             'system/core/include',
+             'hardware/libhardware/include',
+         ]
+    ]
deleted file mode 100644
--- a/netwerk/protocol/rtsp/Makefile.in
+++ /dev/null
@@ -1,19 +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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifeq ($(ANDROID_VERSION),$(findstring $(ANDROID_VERSION),15))
-CXXFLAGS += \
-  -I$(ANDROID_SOURCE)/frameworks/base/media/libstagefright/mpeg2ts \
-  $(NULL)
-else
-CXXFLAGS += \
-  -I$(ANDROID_SOURCE)/frameworks/av/media/libstagefright/mpeg2ts \
-  $(NULL)
-endif
-
-CXXFLAGS += \
-  -Wno-multichar \
-  $(NULL)
--- a/netwerk/protocol/rtsp/moz.build
+++ b/netwerk/protocol/rtsp/moz.build
@@ -58,8 +58,15 @@ LOCAL_INCLUDES += [
     '/dom/events',
     '/xpcom/ds',
     'controller',
     'rtsp',
 ]
 
 for var in ('IMPL_NS_NET', 'FORCE_PR_LOG'):
     DEFINES[var] = True
+
+if CONFIG['ANDROID_VERSION'] == '15':
+    CXXFLAGS += ['-I%s/frameworks/base/media/libstagefright/mpeg2ts' % CONFIG['ANDROID_SOURCE']]
+else:
+    CXXFLAGS += ['-I%s/frameworks/av/media/libstagefright/mpeg2ts' % CONFIG['ANDROID_SOURCE']]
+
+CXXFLAGS += ['-Wno-multichar']
--- a/toolkit/components/downloads/Makefile.in
+++ b/toolkit/components/downloads/Makefile.in
@@ -1,9 +1,9 @@
 #
 # 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/.
 
 include $(topsrcdir)/config/rules.mk
 
-CXXFLAGS += $(TK_CFLAGS) -DGOOGLE_PROTOBUF_NO_RTTI
+CXXFLAGS += $(TK_CFLAGS)
 
--- a/toolkit/components/downloads/moz.build
+++ b/toolkit/components/downloads/moz.build
@@ -52,8 +52,9 @@ if not CONFIG['MOZ_SUITE']:
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'toolkitcomps'
 
 LOCAL_INCLUDES += [
     '../protobuf',
 ]
 
+DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
--- a/toolkit/components/protobuf/Makefile.in
+++ b/toolkit/components/protobuf/Makefile.in
@@ -1,8 +1,8 @@
 #
 # 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/.
 
 include $(topsrcdir)/config/rules.mk
 
-CXXFLAGS += $(TK_CFLAGS) -DGOOGLE_PROTOBUF_NO_RTTI
+CXXFLAGS += $(TK_CFLAGS)
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -39,8 +39,10 @@ UNIFIED_SOURCES += [
     'google/protobuf/message_lite.cc',
     'google/protobuf/repeated_field.cc',
     'google/protobuf/stubs/common.cc',
     'google/protobuf/stubs/once.cc',
     'google/protobuf/wire_format_lite.cc',
 ]
 
 FINAL_LIBRARY = 'toolkitcomps'
+
+DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True