| 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 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 ] | 809 ] |
| 810 } | 810 } |
| 811 | 811 |
| 812 template("jar_src") { | 812 template("jar_src") { |
| 813 action(target_name) { | 813 action(target_name) { |
| 814 _rebased_src_dirs = rebase_path(invoker.src_dirs, root_build_dir) | 814 _rebased_src_dirs = rebase_path(invoker.src_dirs, root_build_dir) |
| 815 | 815 |
| 816 script = "//components/cronet/tools/jar_src.py" | 816 script = "//components/cronet/tools/jar_src.py" |
| 817 depfile = "$target_gen_dir/$target_name.d" | 817 depfile = "$target_gen_dir/$target_name.d" |
| 818 outputs = [ | 818 outputs = [ |
| 819 depfile, | |
| 820 invoker.jar_path, | 819 invoker.jar_path, |
| 821 ] | 820 ] |
| 822 args = [ | 821 args = [ |
| 823 "--src-dir=${_rebased_src_dirs}", | 822 "--src-dir=${_rebased_src_dirs}", |
| 824 "--jar-path", | 823 "--jar-path", |
| 825 rebase_path(invoker.jar_path, root_build_dir), | 824 rebase_path(invoker.jar_path, root_build_dir), |
| 826 "--depfile", | 825 "--depfile", |
| 827 rebase_path(depfile, root_build_dir), | 826 rebase_path(depfile, root_build_dir), |
| 828 ] | 827 ] |
| 829 | 828 |
| 830 if (defined(invoker.src_jars)) { | 829 if (defined(invoker.src_jars)) { |
| 830 inputs = invoker.src_jars |
| 831 _rebased_src_jars = rebase_path(invoker.src_jars, root_build_dir) | 831 _rebased_src_jars = rebase_path(invoker.src_jars, root_build_dir) |
| 832 args += [ "--src-jar=${_rebased_src_jars}" ] | 832 args += [ "--src-jar=${_rebased_src_jars}" ] |
| 833 } | 833 } |
| 834 deps = [ | 834 deps = [ |
| 835 ":effective_connection_type_java", | 835 ":effective_connection_type_java", |
| 836 ] | 836 ] |
| 837 } | 837 } |
| 838 } | 838 } |
| 839 | 839 |
| 840 jar_src("jar_cronet_api_source") { | 840 jar_src("jar_cronet_api_source") { |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 ] | 957 ] |
| 958 deps = [ | 958 deps = [ |
| 959 ":cronet", | 959 ":cronet", |
| 960 ] | 960 ] |
| 961 } | 961 } |
| 962 | 962 |
| 963 # Enforce that ARM Neon is not used when building for ARMv7 | 963 # Enforce that ARM Neon is not used when building for ARMv7 |
| 964 if (target_cpu == "arm" && arm_version == 7 && !arm_use_neon) { | 964 if (target_cpu == "arm" && arm_version == 7 && !arm_use_neon) { |
| 965 action("enforce_no_neon") { | 965 action("enforce_no_neon") { |
| 966 script = "//components/cronet/tools/check_no_neon.py" | 966 script = "//components/cronet/tools/check_no_neon.py" |
| 967 outputs = [ |
| 968 "$target_gen_dir/$target_name.stamp", |
| 969 ] |
| 967 args = [ | 970 args = [ |
| 968 rebase_path("${android_tool_prefix}objdump", root_build_dir), | 971 rebase_path("${android_tool_prefix}objdump", root_build_dir), |
| 969 | 972 |
| 970 # libcronet.so may contain ARM Neon instructions from BoringSSL, but these | 973 # libcronet.so may contain ARM Neon instructions from BoringSSL, but these |
| 971 # are only used after checking whether the CPU supports NEON at runtime, | 974 # are only used after checking whether the CPU supports NEON at runtime, |
| 972 # so instead check base/ as it represents a large swath of code that only | 975 # so instead check base/ as it represents a large swath of code that only |
| 973 # contains Neon instructions when Neon is enabled by default. | 976 # contains Neon instructions when Neon is enabled by default. |
| 974 rebase_path("$root_out_dir/obj/base/base/*.o", root_build_dir), | 977 rebase_path("$root_out_dir/obj/base/base/*.o", root_build_dir), |
| 975 ] | 978 "--stamp", |
| 976 outputs = [ | 979 rebase_path(outputs[0], root_build_dir), |
| 977 "$root_out_dir/cronet_$target_name.d", | |
| 978 ] | 980 ] |
| 979 deps = [ | 981 deps = [ |
| 980 "//base:base", | 982 "//base:base", |
| 981 ] | 983 ] |
| 982 } | 984 } |
| 983 } | 985 } |
| 984 | 986 |
| 985 group("cronet_package") { | 987 group("cronet_package") { |
| 986 # Enforce that arm_use_neon==false when building for ARMv7 by | 988 # Enforce that arm_use_neon==false when building for ARMv7 by |
| 987 # not including any deps in cronet_package target otherwise. | 989 # not including any deps in cronet_package target otherwise. |
| 988 if (!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon) { | 990 if (!(target_cpu == "arm" && arm_version == 7) || !arm_use_neon) { |
| 989 deps = [ | 991 deps = [ |
| 990 ":cronet_combine_proguard_flags", | 992 ":cronet_combine_proguard_flags", |
| 991 ":cronet_package_copy", | 993 ":cronet_package_copy", |
| 992 ":cronet_package_copy_native_lib", | 994 ":cronet_package_copy_native_lib", |
| 993 ":cronet_package_copy_native_lib_unstripped", | 995 ":cronet_package_copy_native_lib_unstripped", |
| 994 ":generate_javadoc", | 996 ":generate_javadoc", |
| 995 ":generate_licenses", | 997 ":generate_licenses", |
| 996 ":jar_cronet_api_source", | 998 ":jar_cronet_api_source", |
| 997 ":jar_cronet_other_source", | 999 ":jar_cronet_other_source", |
| 998 ":jar_cronet_sample_source", | 1000 ":jar_cronet_sample_source", |
| 999 ":repackage_extracted_jars", | 1001 ":repackage_extracted_jars", |
| 1000 ] | 1002 ] |
| 1001 if (current_cpu == "arm" && arm_version == 7) { | 1003 if (current_cpu == "arm" && arm_version == 7) { |
| 1002 deps += [ ":enforce_no_neon" ] | 1004 deps += [ ":enforce_no_neon" ] |
| 1003 } | 1005 } |
| 1004 } | 1006 } |
| 1005 } | 1007 } |
| OLD | NEW |