diff --git a/all.gyp b/all.gyp index b43c3a17f..2280c036d 100644 --- a/all.gyp +++ b/all.gyp @@ -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:*', diff --git a/webrtc/build/common.gypi b/webrtc/build/common.gypi index 64c2a6eb0..c5ba41fd2 100644 --- a/webrtc/build/common.gypi +++ b/webrtc/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/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni index 878b6ff10..e0f69249b 100644 --- a/webrtc/build/webrtc.gni +++ b/webrtc/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/webrtc/common_audio/BUILD.gn b/webrtc/common_audio/BUILD.gn index 36740e87c..9091c42a3 100644 --- a/webrtc/common_audio/BUILD.gn +++ b/webrtc/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/webrtc/common_audio/common_audio.gyp b/webrtc/common_audio/common_audio.gyp index 4581f5886..9378f7290 100644 --- a/webrtc/common_audio/common_audio.gyp +++ b/webrtc/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',