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
This commit is contained in:
kjellander@webrtc.org 2015-03-04 09:50:31 +00:00
parent 1d25c87199
commit 6dab6d700d
5 changed files with 4 additions and 48 deletions

View File

@ -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" ]
}
}

View File

@ -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',
],
}],
],
}],

View File

@ -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.

View File

@ -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",

View File

@ -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',