Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2380)

Unified Diff: components/cronet/android/BUILD.gn

Issue 2060333002: [Cronet] Enforce ARMv7 Cronet doesn't inadvertently use ARM Neon instructions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/cronet/tools/cr_cronet.py » ('j') | components/cronet/tools/enforce_no_neon.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/android/BUILD.gn
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn
index 48b91046012f32cc836c44a5f4da01d75150ab00..104024b15c21098bd4de7cf03649dc11af3cbfc4 100644
--- a/components/cronet/android/BUILD.gn
+++ b/components/cronet/android/BUILD.gn
@@ -823,6 +823,27 @@ action("generate_javadoc") {
]
}
+action("enforce_no_neon") {
+ script = "//components/cronet/tools/enforce_no_neon.py"
+ args = [
+ rebase_path(
+ "$android_ndk_root/toolchains/arm-linux-androideabi-*/prebuilt/$host_os-x86_64/",
mef 2016/06/24 20:18:08 this seems quite fragile. I wonder if there is a b
pauljensen 2016/06/27 12:58:42 Done, I fixed it up.
+ 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",
@@ -875,4 +896,7 @@ group("cronet_package") {
":jar_cronet_sample_source",
":repackage_extracted_jars",
]
+ if (current_cpu == "armv7" || current_cpu == "arm") {
mef 2016/06/24 20:18:08 does arm (v6, not armv7) ever get neon?
pauljensen 2016/06/27 12:58:42 No, NEON was introduced with ARMv7: http://infocen
mef 2016/06/28 16:46:24 So, why do we need to do it for current_cpu == "ar
pauljensen 2016/06/29 12:47:42 Actually "arm" means all versions of ARM. "armv7"
+ deps += [ ":enforce_no_neon" ]
+ }
}
« no previous file with comments | « no previous file | components/cronet/tools/cr_cronet.py » ('j') | components/cronet/tools/enforce_no_neon.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698