Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 902 "$root_out_dir/lib.unstripped/libcronet.so", | 902 "$root_out_dir/lib.unstripped/libcronet.so", |
| 903 ] | 903 ] |
| 904 outputs = [ | 904 outputs = [ |
| 905 "$_package_dir/symbols/${android_app_abi}/libcronet.so", | 905 "$_package_dir/symbols/${android_app_abi}/libcronet.so", |
| 906 ] | 906 ] |
| 907 deps = [ | 907 deps = [ |
| 908 ":cronet", | 908 ":cronet", |
| 909 ] | 909 ] |
| 910 } | 910 } |
| 911 | 911 |
| 912 # Enforce that ARM Neon is not used when building for ARMv7 | |
| 913 if (target_cpu == "arm" && arm_version == 7 && !arm_use_neon) { | |
| 914 action("enforce_no_neon") { | |
| 915 assert(!arm_use_neon) | |
|
Dirk Pranke
2016/07/27 16:43:33
Given the if conditions, this assert is no longer
pauljensen
2016/08/19 11:52:05
Done.
| |
| 916 script = "//components/cronet/tools/check_no_neon.py" | |
| 917 args = [ | |
| 918 rebase_path("${android_tool_prefix}objdump", root_build_dir), | |
| 919 | |
| 920 # libcronet.so may contain ARM Neon instructions from BoringSSL, but these | |
| 921 # are only used after checking whether the CPU supports NEON at runtime, | |
| 922 # so instead check base/ as it represents a large swath of code that only | |
| 923 # contains Neon instructions when Neon is enabled by default. | |
| 924 rebase_path("$root_out_dir/obj/base/base/*.o", root_build_dir), | |
| 925 ] | |
| 926 outputs = [ | |
| 927 "$root_out_dir/cronet_$target_name.d", | |
| 928 ] | |
| 929 deps = [ | |
| 930 "//base:base", | |
| 931 ] | |
| 932 } | |
| 933 } | |
| 934 | |
| 912 group("cronet_package") { | 935 group("cronet_package") { |
| 913 deps = [ | 936 # Enforce that arm_use_neon==false when building for ARMv7 by |
| 914 ":cronet_package_copy", | 937 # not including any deps in cronet_package target otherwise. |
| 915 ":cronet_package_copy_native_lib", | 938 if (!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon) { |
| 916 ":cronet_package_copy_native_lib_unstripped", | 939 deps = [ |
|
Dirk Pranke
2016/07/27 16:43:33
Don't you want these deps to be set unconditionall
pauljensen
2016/08/18 16:12:33
No, that would allow building Cronet for ARMv7 wit
Dirk Pranke
2016/08/18 17:10:38
Ah, got it.
| |
| 917 ":generate_javadoc", | 940 ":cronet_package_copy", |
| 918 ":generate_licenses", | 941 ":cronet_package_copy_native_lib", |
| 919 ":jar_cronet_api_source", | 942 ":cronet_package_copy_native_lib_unstripped", |
| 920 ":jar_cronet_other_source", | 943 ":generate_javadoc", |
| 921 ":jar_cronet_sample_source", | 944 ":generate_licenses", |
| 922 ":repackage_extracted_jars", | 945 ":jar_cronet_api_source", |
| 923 ] | 946 ":jar_cronet_other_source", |
| 947 ":jar_cronet_sample_source", | |
| 948 ":repackage_extracted_jars", | |
| 949 ] | |
| 950 if (current_cpu == "arm" && arm_version == 7) { | |
| 951 deps += [ ":enforce_no_neon" ] | |
| 952 } | |
| 953 } | |
| 924 } | 954 } |
| OLD | NEW |