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

Side by Side 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/buildflag_header.gni") 5 import("//build/buildflag_header.gni")
6 import("//build/config/android/config.gni") 6 import("//build/config/android/config.gni")
7 import("//build/config/android/rules.gni") 7 import("//build/config/android/rules.gni")
8 import("//build/util/version.gni") 8 import("//build/util/version.gni")
9 import("//chrome/version.gni") 9 import("//chrome/version.gni")
10 import("//testing/test.gni") 10 import("//testing/test.gni")
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 rebase_path(depfile, root_build_dir), 816 rebase_path(depfile, root_build_dir),
817 "--lib-java-dir", 817 "--lib-java-dir",
818 rebase_path("$root_build_dir/lib.java/components/cronet/android", 818 rebase_path("$root_build_dir/lib.java/components/cronet/android",
819 root_build_dir), 819 root_build_dir),
820 ] 820 ]
821 deps = [ 821 deps = [
822 ":cronet_javadoc_classpath", 822 ":cronet_javadoc_classpath",
823 ] 823 ]
824 } 824 }
825 825
826 action("enforce_no_neon") {
827 script = "//components/cronet/tools/enforce_no_neon.py"
828 args = [
829 rebase_path(
830 "$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.
831 root_build_dir),
832
833 # libcronet.so may contain ARM Neon instructions from BoringSSL, but these
834 # are only used after checking whether the CPU supports NEON at runtime,
835 # so instead check base/ as it represents a large swath of code that only
836 # contains Neon instructions when Neon is enabled by default.
837 rebase_path("$root_out_dir/obj/base/base/*.o", root_build_dir),
838 ]
839 outputs = [
840 "$root_out_dir/cronet_$target_name.d",
841 ]
842 deps = [
843 "//base:base",
844 ]
845 }
846
826 copy("cronet_package_copy") { 847 copy("cronet_package_copy") {
827 sources = [ 848 sources = [
828 "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar", 849 "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar",
829 "//AUTHORS", 850 "//AUTHORS",
830 "//chrome/VERSION", 851 "//chrome/VERSION",
831 "//components/cronet/android/proguard.cfg", 852 "//components/cronet/android/proguard.cfg",
832 ] 853 ]
833 outputs = [ 854 outputs = [
834 "$_package_dir/{{source_file_part}}", 855 "$_package_dir/{{source_file_part}}",
835 ] 856 ]
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 ":cronet_package_copy", 889 ":cronet_package_copy",
869 ":cronet_package_copy_native_lib", 890 ":cronet_package_copy_native_lib",
870 ":cronet_package_copy_native_lib_unstripped", 891 ":cronet_package_copy_native_lib_unstripped",
871 ":generate_javadoc", 892 ":generate_javadoc",
872 ":generate_licenses", 893 ":generate_licenses",
873 ":jar_cronet_api_source", 894 ":jar_cronet_api_source",
874 ":jar_cronet_other_source", 895 ":jar_cronet_other_source",
875 ":jar_cronet_sample_source", 896 ":jar_cronet_sample_source",
876 ":repackage_extracted_jars", 897 ":repackage_extracted_jars",
877 ] 898 ]
899 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"
900 deps += [ ":enforce_no_neon" ]
901 }
878 } 902 }
OLDNEW
« 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