Add a variable for deciding when to use openmax_dl.

Modifies the previous condition to additionally not use openmax_dl on
iOS. Remove the All target's direct dependency on it, as it is now
pulled in by the targets that need it.

Add gn support since an openmax_dl gn target is available.

BUG=chromium:415393, webrtc:3906
R=turaj@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/23949004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7397 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2014-10-08 18:01:27 +00:00
parent f71785cd3b
commit 4165f7aa22
5 changed files with 27 additions and 22 deletions

View File

@ -18,7 +18,6 @@
'target_name': 'All',
'type': 'none',
'dependencies': [
'third_party/openmax_dl/dl/dl.gyp:*',
'webrtc/webrtc.gyp:*',
'<(libjingle_root)/talk/libjingle.gyp:*',
'<(libjingle_root)/talk/libjingle_examples.gyp:*',

View File

@ -155,6 +155,13 @@
['target_arch=="arm" or target_arch=="armv7"', {
'prefer_fixed_point%': 1,
}],
# TODO(ajm): Workaround until openmax_dl has non-Android ARM support.
# See: crbug.com/415393
['OS!="ios" and (target_arch!="arm" or OS=="android")', {
'rtc_use_openmax_dl%': 1,
}, {
'rtc_use_openmax_dl%': 0,
}],
], # conditions
},
'target_defaults': {

View File

@ -103,6 +103,14 @@ declare_args() {
rtc_prefer_fixed_point = true
}
# TODO(ajm): Workaround until openmax_dl has non-Android ARM support.
# See: crbug.com/415393
if (!is_ios && (cpu_arch != "arm" || is_android)) {
rtc_use_openmax_dl = true
} else {
rtc_use_openmax_dl = false
}
# WebRTC builds ARM v7 Neon instruction set optimized code for both iOS and
# Android, which is why we currently cannot use the variables in
# //build/config/arm.gni (since it disables Neon for Android).

View File

@ -90,21 +90,16 @@ source_set("common_audio") {
deps = [ "../system_wrappers" ]
# TODO(ajm): Enable when GN support for openmax_dl is added.
# See: crbug.com/419206
# Not needed immediately, since nothing built by GN depends on these bits.
# TODO(ajm): Workaround until openmax_dl has non-Android ARM support.
# See: crbug.com/415393
#if (cpu_arch != "arm" or (cpu_arch == "arm" and is_android)) {
# 'sources' += [
# 'lapped_transform.cc',
# 'lapped_transform.h',
# 'real_fourier.cc',
# 'real_fourier.h',
# ]
#
# deps += [ "//third_party/openmax_dl/dl" ]
#}
if (rtc_use_openmax_dl) {
sources += [
"lapped_transform.cc",
"lapped_transform.h",
"real_fourier.cc",
"real_fourier.h",
]
deps += [ "//third_party/openmax_dl/dl" ]
}
if (cpu_arch == "arm") {
sources += [

View File

@ -102,9 +102,7 @@
'window_generator.h',
],
'conditions': [
# TODO(ajm): Workaround until openmax_dl has non-Android ARM support.
# See: crbug.com/415393
['target_arch!="arm" or (target_arch=="arm" and OS=="android")', {
['rtc_use_openmax_dl==1', {
'sources': [
'lapped_transform.cc',
'lapped_transform.h',
@ -247,9 +245,7 @@
'window_generator_unittest.cc',
],
'conditions': [
# TODO(ajm): Workaround until openmax_dl has non-Android ARM
# support. See: crbug.com/415393
['target_arch!="arm" or (target_arch=="arm" and OS=="android")', {
['rtc_use_openmax_dl==1', {
'sources': [
'lapped_transform_unittest.cc',
'real_fourier_unittest.cc',