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

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: address comments Created 4 years, 4 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
« no previous file with comments | « no previous file | components/cronet/tools/check_no_neon.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 "$root_out_dir/lib.unstripped/libcronet.so", 927 "$root_out_dir/lib.unstripped/libcronet.so",
928 ] 928 ]
929 outputs = [ 929 outputs = [
930 "$_package_dir/symbols/${android_app_abi}/libcronet.so", 930 "$_package_dir/symbols/${android_app_abi}/libcronet.so",
931 ] 931 ]
932 deps = [ 932 deps = [
933 ":cronet", 933 ":cronet",
934 ] 934 ]
935 } 935 }
936 936
937 # Enforce that ARM Neon is not used when building for ARMv7
938 if (target_cpu == "arm" && arm_version == 7 && !arm_use_neon) {
939 action("enforce_no_neon") {
940 script = "//components/cronet/tools/check_no_neon.py"
941 args = [
942 rebase_path("${android_tool_prefix}objdump", root_build_dir),
943
944 # libcronet.so may contain ARM Neon instructions from BoringSSL, but these
945 # are only used after checking whether the CPU supports NEON at runtime,
946 # so instead check base/ as it represents a large swath of code that only
947 # contains Neon instructions when Neon is enabled by default.
948 rebase_path("$root_out_dir/obj/base/base/*.o", root_build_dir),
949 ]
950 outputs = [
951 "$root_out_dir/cronet_$target_name.d",
952 ]
953 deps = [
954 "//base:base",
955 ]
956 }
957 }
958
937 group("cronet_package") { 959 group("cronet_package") {
938 deps = [ 960 # Enforce that arm_use_neon==false when building for ARMv7 by
939 ":cronet_package_copy", 961 # not including any deps in cronet_package target otherwise.
940 ":cronet_package_copy_native_lib", 962 if (!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon) {
941 ":cronet_package_copy_native_lib_unstripped", 963 deps = [
942 ":generate_javadoc", 964 ":cronet_package_copy",
943 ":generate_licenses", 965 ":cronet_package_copy_native_lib",
944 ":jar_cronet_api_source", 966 ":cronet_package_copy_native_lib_unstripped",
945 ":jar_cronet_other_source", 967 ":generate_javadoc",
946 ":jar_cronet_sample_source", 968 ":generate_licenses",
947 ":repackage_extracted_jars", 969 ":jar_cronet_api_source",
948 ] 970 ":jar_cronet_other_source",
971 ":jar_cronet_sample_source",
972 ":repackage_extracted_jars",
973 ]
974 if (current_cpu == "arm" && arm_version == 7) {
975 deps += [ ":enforce_no_neon" ]
976 }
977 }
949 } 978 }
OLDNEW
« no previous file with comments | « no previous file | components/cronet/tools/check_no_neon.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698