diff options
author | kkimlabs <kkimlabs@chromium.org> | 2016-01-05 13:57:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-05 21:58:32 +0000 |
commit | 80090bd83b13c23c0f1c75d16e5f878da719b30a (patch) | |
tree | 68348d8921ef540f950f4d3437f31aa7be1d8014 | |
parent | 52f84d388cc6b870c759c4bf6c9e379bdcc52ffc (diff) | |
download | chromium_src-80090bd83b13c23c0f1c75d16e5f878da719b30a.zip chromium_src-80090bd83b13c23c0f1c75d16e5f878da719b30a.tar.gz chromium_src-80090bd83b13c23c0f1c75d16e5f878da719b30a.tar.bz2 |
Fix x64 android_tools target compile failure.
Few functions were unused on x86 causing unused function errors.
BUG=574494
Review URL: https://codereview.chromium.org/1564443002
Cr-Commit-Position: refs/heads/master@{#367657}
-rw-r--r-- | build/android/ndk.gyp | 6 | ||||
-rw-r--r-- | build/secondary/third_party/android_tools/BUILD.gn | 14 |
2 files changed, 19 insertions, 1 deletions
diff --git a/build/android/ndk.gyp b/build/android/ndk.gyp index 2838a98..b491db2 100644 --- a/build/android/ndk.gyp +++ b/build/android/ndk.gyp @@ -15,6 +15,12 @@ 'sources': [ '<(android_ndk_root)/sources/android/cpufeatures/cpu-features.c', ], + 'variables': { + 'clang_warning_flags': [ + # cpu-features.c has few unused functions on x86 b/26403333 + '-Wno-unused-function', + ], + }, }, ], } diff --git a/build/secondary/third_party/android_tools/BUILD.gn b/build/secondary/third_party/android_tools/BUILD.gn index fa2f67a..e256258 100644 --- a/build/secondary/third_party/android_tools/BUILD.gn +++ b/build/secondary/third_party/android_tools/BUILD.gn @@ -8,6 +8,13 @@ config("cpu_features_include") { include_dirs = [ "ndk/sources/android/cpufeatures" ] } +config("cpu_features_warnings") { + if (is_clang) { + # cpu-features.c has few unused functions on x86 b/26403333 + cflags = [ "-Wno-unused-function" ] + } +} + # This is the GN version of # //build/android/ndk.gyp:cpu_features source_set("cpu_features") { @@ -17,7 +24,12 @@ source_set("cpu_features") { public_configs = [ ":cpu_features_include" ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + "//build/config/compiler:no_chromium_code", + + # Must be after no_chromium_code for warning flags to be ordered correctly. + ":cpu_features_warnings", + ] } android_java_prebuilt("android_gcm_java") { |