| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 # Do not add any imports to non-//build directories here. | 5 # Do not add any imports to non-//build directories here. |
| 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. | 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. |
| 7 import("//build_overrides/build.gni") | 7 import("//build_overrides/build.gni") |
| 8 import("//build/config/android/config.gni") | 8 import("//build/config/android/config.gni") |
| 9 import("//build/config/dcheck_always_on.gni") | 9 import("//build/config/dcheck_always_on.gni") |
| 10 import("//build/config/sanitizers/sanitizers.gni") | 10 import("//build/config/sanitizers/sanitizers.gni") |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 # See build/android/gyp/write_build_config.py and | 53 # See build/android/gyp/write_build_config.py and |
| 54 # build/android/gyp/util/build_utils.py:ExpandFileArgs | 54 # build/android/gyp/util/build_utils.py:ExpandFileArgs |
| 55 template("write_build_config") { | 55 template("write_build_config") { |
| 56 type = invoker.type | 56 type = invoker.type |
| 57 _is_prebuilt_binary = | 57 _is_prebuilt_binary = |
| 58 defined(invoker.is_prebuilt_binary) && invoker.is_prebuilt_binary | 58 defined(invoker.is_prebuilt_binary) && invoker.is_prebuilt_binary |
| 59 | 59 |
| 60 # Don't need to enforce naming scheme for these targets since we never | 60 # Don't need to enforce naming scheme for these targets since we never |
| 61 # consider them in dependency chains. | 61 # consider them in dependency chains. |
| 62 if (!_is_prebuilt_binary && type != "android_apk" && type != "java_binary" && | 62 if (!_is_prebuilt_binary && type != "android_apk" && type != "java_binary" && |
| 63 type != "resource_rewriter") { | 63 type != "resource_rewriter" && type != "dist_jar") { |
| 64 set_sources_assignment_filter(_java_target_whitelist) | 64 set_sources_assignment_filter(_java_target_whitelist) |
| 65 _parent_invoker = invoker.invoker | 65 _parent_invoker = invoker.invoker |
| 66 _target_label = | 66 _target_label = |
| 67 get_label_info(":${_parent_invoker.target_name}", "label_no_toolchain") | 67 get_label_info(":${_parent_invoker.target_name}", "label_no_toolchain") |
| 68 sources = [ | 68 sources = [ |
| 69 _target_label, | 69 _target_label, |
| 70 ] | 70 ] |
| 71 if (sources != []) { | 71 if (sources != []) { |
| 72 set_sources_assignment_filter(_java_target_blacklist) | 72 set_sources_assignment_filter(_java_target_blacklist) |
| 73 sources = [] | 73 sources = [] |
| 74 sources = [ | 74 sources = [ |
| 75 _target_label, | 75 _target_label, |
| 76 ] | 76 ] |
| 77 if (sources != []) { | 77 if (sources != []) { |
| 78 assert(false, "Invalid java target name: $_target_label") | 78 assert(false, "Invalid java target name: $_target_label") |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 sources = [] | 81 sources = [] |
| 82 } | 82 } |
| 83 | 83 |
| 84 action(target_name) { | 84 action(target_name) { |
| 85 set_sources_assignment_filter([]) | 85 set_sources_assignment_filter([]) |
| 86 build_config = invoker.build_config | 86 build_config = invoker.build_config |
| 87 | 87 |
| 88 assert(type == "android_apk" || type == "java_library" || | 88 assert(type == "android_apk" || type == "java_library" || |
| 89 type == "android_resources" || type == "deps_dex" || | 89 type == "android_resources" || type == "deps_dex" || |
| 90 type == "android_assets" || type == "resource_rewriter" || | 90 type == "dist_jar" || type == "android_assets" || |
| 91 type == "java_binary" || type == "group" || type == "java_prebuilt") | 91 type == "resource_rewriter" || type == "java_binary" || |
| 92 type == "group" || type == "java_prebuilt") |
| 92 | 93 |
| 93 forward_variables_from(invoker, | 94 forward_variables_from(invoker, |
| 94 [ | 95 [ |
| 95 "deps", | 96 "deps", |
| 96 "testonly", | 97 "testonly", |
| 97 ]) | 98 ]) |
| 98 if (!defined(deps)) { | 99 if (!defined(deps)) { |
| 99 deps = [] | 100 deps = [] |
| 100 } | 101 } |
| 101 | 102 |
| (...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2841 rebase_path(root_build_dir, root_build_dir), | 2842 rebase_path(root_build_dir, root_build_dir), |
| 2842 "--packed-libraries-dir", | 2843 "--packed-libraries-dir", |
| 2843 rebase_path(_packed_libraries_dir, root_build_dir), | 2844 rebase_path(_packed_libraries_dir, root_build_dir), |
| 2844 "--libraries=${invoker.libraries_filearg}", | 2845 "--libraries=${invoker.libraries_filearg}", |
| 2845 "--filelistjson", | 2846 "--filelistjson", |
| 2846 rebase_path(invoker.file_list_json, root_build_dir), | 2847 rebase_path(invoker.file_list_json, root_build_dir), |
| 2847 ] | 2848 ] |
| 2848 } | 2849 } |
| 2849 } | 2850 } |
| 2850 } | 2851 } |
| OLD | NEW |