diff options
author | andrew@webrtc.org <andrew@webrtc.org> | 2014-10-08 18:01:27 +0000 |
---|---|---|
committer | andrew@webrtc.org <andrew@webrtc.org> | 2014-10-08 18:01:27 +0000 |
commit | e8188593aba243f1752f76cd22279101d4a67322 (patch) | |
tree | c180b2b011b9865a2ee6b84acac5a32a2b731182 | |
parent | 20cc0ad0555ece11a955a326e199d548bcde3670 (diff) | |
download | webrtc-e8188593aba243f1752f76cd22279101d4a67322.tar.gz |
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/webrtc@7397 4adac7df-926f-26a2-2b94-8c16560cd09d
-rw-r--r-- | build/common.gypi | 7 | ||||
-rw-r--r-- | build/webrtc.gni | 8 | ||||
-rw-r--r-- | common_audio/BUILD.gn | 25 | ||||
-rw-r--r-- | common_audio/common_audio.gyp | 8 |
4 files changed, 27 insertions, 21 deletions
diff --git a/build/common.gypi b/build/common.gypi index 64c2a6eb..c5ba41fd 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -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': { diff --git a/build/webrtc.gni b/build/webrtc.gni index 878b6ff1..e0f69249 100644 --- a/build/webrtc.gni +++ b/build/webrtc.gni @@ -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). diff --git a/common_audio/BUILD.gn b/common_audio/BUILD.gn index 36740e87..9091c42a 100644 --- a/common_audio/BUILD.gn +++ b/common_audio/BUILD.gn @@ -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 += [ diff --git a/common_audio/common_audio.gyp b/common_audio/common_audio.gyp index 4581f588..9378f729 100644 --- a/common_audio/common_audio.gyp +++ b/common_audio/common_audio.gyp @@ -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', |