Chromium Code Reviews| Index: components/cronet/android/BUILD.gn |
| diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn |
| index dece98533f630a4238816b03b8b0ff065fbf9bc3..270e2f99193da4f9fc080c342b915b983e6db695 100644 |
| --- a/components/cronet/android/BUILD.gn |
| +++ b/components/cronet/android/BUILD.gn |
| @@ -846,6 +846,25 @@ action("generate_javadoc") { |
| ] |
| } |
| +action("enforce_no_neon") { |
| + script = "//components/cronet/tools/check_no_neon.py" |
| + args = [ |
| + rebase_path("${android_tool_prefix}objdump", root_build_dir), |
| + |
| + # libcronet.so may contain ARM Neon instructions from BoringSSL, but these |
| + # are only used after checking whether the CPU supports NEON at runtime, |
| + # so instead check base/ as it represents a large swath of code that only |
| + # contains Neon instructions when Neon is enabled by default. |
| + rebase_path("$root_out_dir/obj/base/base/*.o", root_build_dir), |
| + ] |
| + outputs = [ |
| + "$root_out_dir/cronet_$target_name.d", |
| + ] |
| + deps = [ |
| + "//base:base", |
| + ] |
| +} |
| + |
| copy("cronet_package_copy") { |
| sources = [ |
| "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar", |
| @@ -898,4 +917,7 @@ group("cronet_package") { |
| ":jar_cronet_sample_source", |
| ":repackage_extracted_jars", |
| ] |
| + if (current_cpu == "arm" && arm_version == 7) { |
| + deps += [ ":enforce_no_neon" ] |
|
jbudorick
2016/07/19 18:49:16
This is an interesting way to handle this. You cou
pauljensen
2016/07/20 15:04:37
Done.
|
| + } |
| } |