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

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: sync 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 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 rebase_path(depfile, root_build_dir), 862 rebase_path(depfile, root_build_dir),
863 "--lib-java-dir", 863 "--lib-java-dir",
864 rebase_path("$root_build_dir/lib.java/components/cronet/android", 864 rebase_path("$root_build_dir/lib.java/components/cronet/android",
865 root_build_dir), 865 root_build_dir),
866 ] 866 ]
867 deps = [ 867 deps = [
868 ":cronet_javadoc_classpath", 868 ":cronet_javadoc_classpath",
869 ] 869 ]
870 } 870 }
871 871
872 action("enforce_no_neon") {
873 assert(!arm_use_neon)
874 script = "//components/cronet/tools/check_no_neon.py"
875 args = [
876 rebase_path("${android_tool_prefix}objdump", root_build_dir),
877
878 # libcronet.so may contain ARM Neon instructions from BoringSSL, but these
879 # are only used after checking whether the CPU supports NEON at runtime,
880 # so instead check base/ as it represents a large swath of code that only
881 # contains Neon instructions when Neon is enabled by default.
882 rebase_path("$root_out_dir/obj/base/base/*.o", root_build_dir),
883 ]
884 outputs = [
885 "$root_out_dir/cronet_$target_name.d",
886 ]
887 deps = [
888 "//base:base",
889 ]
890 }
891
872 copy("cronet_package_copy") { 892 copy("cronet_package_copy") {
873 sources = [ 893 sources = [
874 "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar", 894 "$root_out_dir/lib.java/components/cronet/android/cronet_api.jar",
875 "//AUTHORS", 895 "//AUTHORS",
876 "//chrome/VERSION", 896 "//chrome/VERSION",
877 "//components/cronet/android/proguard.cfg", 897 "//components/cronet/android/proguard.cfg",
878 ] 898 ]
879 outputs = [ 899 outputs = [
880 "$_package_dir/{{source_file_part}}", 900 "$_package_dir/{{source_file_part}}",
881 ] 901 ]
(...skipping 20 matching lines...) Expand all
902 "$root_out_dir/lib.unstripped/libcronet.so", 922 "$root_out_dir/lib.unstripped/libcronet.so",
903 ] 923 ]
904 outputs = [ 924 outputs = [
905 "$_package_dir/symbols/${android_app_abi}/libcronet.so", 925 "$_package_dir/symbols/${android_app_abi}/libcronet.so",
906 ] 926 ]
907 deps = [ 927 deps = [
908 ":cronet", 928 ":cronet",
909 ] 929 ]
910 } 930 }
911 931
912 group("cronet_package") { 932 # Enforce that arm_use_neon==false when building for ARMv7 by
913 deps = [ 933 # not generating the cronet_package target otherwise.
914 ":cronet_package_copy", 934 if (!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon) {
915 ":cronet_package_copy_native_lib", 935 group("cronet_package") {
Dirk Pranke 2016/07/27 00:01:49 It seems like you generally want cronet_package to
pauljensen 2016/07/27 12:11:46 Done.
916 ":cronet_package_copy_native_lib_unstripped", 936 deps = [
917 ":generate_javadoc", 937 ":cronet_package_copy",
918 ":generate_licenses", 938 ":cronet_package_copy_native_lib",
919 ":jar_cronet_api_source", 939 ":cronet_package_copy_native_lib_unstripped",
920 ":jar_cronet_other_source", 940 ":generate_javadoc",
921 ":jar_cronet_sample_source", 941 ":generate_licenses",
922 ":repackage_extracted_jars", 942 ":jar_cronet_api_source",
923 ] 943 ":jar_cronet_other_source",
944 ":jar_cronet_sample_source",
945 ":repackage_extracted_jars",
946 ]
947 if (current_cpu == "arm" && arm_version == 7) {
948 deps += [ ":enforce_no_neon" ]
949 }
950 }
924 } 951 }
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