diff --git a/webrtc/system_wrappers/source/cpu_features_android.c b/webrtc/system_wrappers/source/cpu_features_android.c index 7a4fa6ef20..8f5e3ea46f 100644 --- a/webrtc/system_wrappers/source/cpu_features_android.c +++ b/webrtc/system_wrappers/source/cpu_features_android.c @@ -8,7 +8,11 @@ * be found in the AUTHORS file in the root of the source tree. */ +#if defined(WEBRTC_CHROMIUM_BUILD) +#include +#else #include "android/cpu-features.h" +#endif // defined(WEBRTC_CHROMIUM_BUILD) uint64_t WebRtc_GetCPUFeaturesARM(void) { return android_getCpuFeatures(); diff --git a/webrtc/system_wrappers/source/system_wrappers.gyp b/webrtc/system_wrappers/source/system_wrappers.gyp index d629da9780..0a29d0e558 100644 --- a/webrtc/system_wrappers/source/system_wrappers.gyp +++ b/webrtc/system_wrappers/source/system_wrappers.gyp @@ -192,12 +192,22 @@ 'target_name': 'cpu_features_android', 'type': '<(library)', 'sources': [ - 'android/cpu-features.c', - 'android/cpu-features.h', # TODO(leozwang): Ideally we want to audomatically exclude .c files # as with .cc files, gyp currently only excludes .cc files. 'cpu_features_android.c', ], + 'conditions': [ + ['build_with_chromium==1', { + 'dependencies': [ + '<(android_ndk_root)/android_tools_ndk.gyp:cpu_features', + ], + }, { + 'sources': [ + 'android/cpu-features.c', + 'android/cpu-features.h', + ], + }], + ], }, ], }],