From 6dab6d700dc5e89c8b5f88ac2dd253235120dd6f Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Wed, 4 Mar 2015 09:50:31 +0000 Subject: [PATCH] Let Chromium declare the mips_dsp_rev build variable. In https://codereview.chromium.org/883253003, the mips_dsp_rev build variable is added to Chromium's GYP and GN build files. Remove the declarations of mips_dsp_rev from WebRTC's GYP and GN build files. Replace mips_fpu with mips_float_abi and remove the compiler flags that are already set by Chromium. The main review of this was done in https://webrtc-codereview.appspot.com/39779004 but since that CL wasn't created with the right base URL, I made this in order to be able to run WebRTC trybots properly. BUG=446234 TBR=wtc@chromium.org Review URL: https://webrtc-codereview.appspot.com/44549004 Cr-Commit-Position: refs/heads/master@{#8590} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8590 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/BUILD.gn | 11 +------ webrtc/build/common.gypi | 32 +------------------ webrtc/build/webrtc.gni | 5 --- webrtc/modules/audio_processing/BUILD.gn | 2 +- .../audio_processing/audio_processing.gypi | 2 +- 5 files changed, 4 insertions(+), 48 deletions(-) diff --git a/webrtc/BUILD.gn b/webrtc/BUILD.gn index 04dd0f3e83..893dd9f39a 100644 --- a/webrtc/BUILD.gn +++ b/webrtc/BUILD.gn @@ -139,28 +139,19 @@ config("common_config") { if (current_cpu == "mipsel") { defines += [ "MIPS32_LE" ] - if (mips_fpu) { + if (mips_float_abi == "hard") { defines += [ "MIPS_FPU_LE" ] - cflags += [ "-mhard-float" ] - } else { - cflags += [ "-msoft-float" ] } if (mips_arch_variant == "r2") { defines += [ "MIPS32_R2_LE" ] - cflags += [ "-mips32r2" ] - cflags_cc += [ "-mips32r2" ] } if (mips_dsp_rev == 1) { defines += [ "MIPS_DSP_R1_LE" ] - cflags += [ "-mdsp" ] - cflags_cc += [ "-mdsp" ] } else if (mips_dsp_rev == 2) { defines += [ "MIPS_DSP_R1_LE", "MIPS_DSP_R2_LE", ] - cflags += [ "-mdspr2" ] - cflags_cc += [ "-mdspr2" ] } } diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 7369e1d433..05e1ba3ec2 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/build/common.gypi @@ -102,11 +102,6 @@ 'libyuv_dir%': '<(DEPTH)/third_party/libyuv', 'opus_dir%': '<(opus_dir)', - # Define MIPS architecture variant, MIPS DSP variant and MIPS FPU - # This may be subject to change in accordance to Chromium's MIPS flags - 'mips_dsp_rev%': 0, - 'mips_fpu%' : 1, - # Use Java based audio layer as default for Android. # Change this setting to 1 to use Open SL audio instead. # TODO(henrika): add support for Open SL ES. @@ -283,51 +278,26 @@ 'MIPS32_LE', ], 'conditions': [ - ['mips_fpu==1', { + ['mips_float_abi=="hard"', { 'defines': [ 'MIPS_FPU_LE', ], - 'cflags': [ - '-mhard-float', - ], - }, { - 'cflags': [ - '-msoft-float', - ], }], ['mips_arch_variant=="r2"', { 'defines': [ 'MIPS32_R2_LE', ], - 'cflags': [ - '-mips32r2', - ], - 'cflags_cc': [ - '-mips32r2', - ], }], ['mips_dsp_rev==1', { 'defines': [ 'MIPS_DSP_R1_LE', ], - 'cflags': [ - '-mdsp', - ], - 'cflags_cc': [ - '-mdsp', - ], }], ['mips_dsp_rev==2', { 'defines': [ 'MIPS_DSP_R1_LE', 'MIPS_DSP_R2_LE', ], - 'cflags': [ - '-mdspr2', - ], - 'cflags_cc': [ - '-mdspr2', - ], }], ], }], diff --git a/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni index 85caa557e6..a42c932279 100644 --- a/webrtc/build/webrtc.gni +++ b/webrtc/build/webrtc.gni @@ -50,11 +50,6 @@ declare_args() { # Enable to use the Mozilla internal settings. build_with_mozilla = false - # Define MIPS DSP variant and MIPS FPU. - # This may be subject to change in accordance to Chromium's MIPS flags. - mips_dsp_rev = 0 - mips_fpu = true - rtc_enable_android_opensl = false # Link-Time Optimizations. diff --git a/webrtc/modules/audio_processing/BUILD.gn b/webrtc/modules/audio_processing/BUILD.gn index 03afa08783..16bcf946d8 100644 --- a/webrtc/modules/audio_processing/BUILD.gn +++ b/webrtc/modules/audio_processing/BUILD.gn @@ -185,7 +185,7 @@ source_set("audio_processing") { if (current_cpu == "mipsel") { sources += [ "aecm/aecm_core_mips.c" ] - if (mips_fpu) { + if (mips_float_abi == "hard") { sources += [ "aec/aec_core_mips.c", "aec/aec_rdft_mips.c", diff --git a/webrtc/modules/audio_processing/audio_processing.gypi b/webrtc/modules/audio_processing/audio_processing.gypi index 1a264bc254..f14892a576 100644 --- a/webrtc/modules/audio_processing/audio_processing.gypi +++ b/webrtc/modules/audio_processing/audio_processing.gypi @@ -194,7 +194,7 @@ 'aecm/aecm_core_mips.c', ], 'conditions': [ - ['mips_fpu==1', { + ['mips_float_abi=="hard"', { 'sources': [ 'aec/aec_core_mips.c', 'aec/aec_rdft_mips.c',