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

Unified Diff: build/config/android/rules.gni

Issue 1854733003: Reland of GN: Make breakpad_unittests & sandbox_linux_unittests use test() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-minor-renames
Patch Set: use _dist for executable Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index b974baf1b73465cc55f157006927eaa754423565..9a24f4ac72029687a93b08d6c04eb6fa9b272888 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -2243,34 +2243,27 @@ template("android_aidl") {
# deps = [ ":the_thing_that_makes_foo" ]
# }
template("create_native_executable_dist") {
- set_sources_assignment_filter([])
forward_variables_from(invoker, [ "testonly" ])
- dist_dir = invoker.dist_dir
- binary = invoker.binary
- template_name = target_name
-
- libraries_list =
- "${target_gen_dir}/${template_name}_library_dependencies.list"
+ _libraries_list = "${target_gen_dir}/${target_name}_library_dependencies.list"
- find_deps_target_name = "${template_name}__find_library_dependencies"
- copy_target_name = "${template_name}__copy_libraries_and_exe"
+ _find_deps_target_name = "${target_name}__find_library_dependencies"
- action(find_deps_target_name) {
+ # TODO(agrieve): Extract dependent libs from GN rather than readelf.
+ action(_find_deps_target_name) {
forward_variables_from(invoker, [ "deps" ])
- visibility = [ ":$copy_target_name" ]
script = "//build/android/gyp/write_ordered_libraries.py"
depfile = "$target_gen_dir/$target_name.d"
inputs = [
- binary,
+ invoker.binary,
android_readelf,
]
outputs = [
depfile,
- libraries_list,
+ _libraries_list,
]
- rebased_binaries = rebase_path([ binary ], root_build_dir)
+ rebased_binaries = rebase_path([ invoker.binary ], root_build_dir)
args = [
"--depfile",
rebase_path(depfile, root_build_dir),
@@ -2278,47 +2271,38 @@ template("create_native_executable_dist") {
"--libraries-dir",
rebase_path(root_shlib_dir, root_build_dir),
"--output",
- rebase_path(libraries_list, root_build_dir),
+ rebase_path(_libraries_list, root_build_dir),
"--readelf",
rebase_path(android_readelf, root_build_dir),
]
}
- copy_ex(copy_target_name) {
- visibility = [ ":$template_name" ]
-
+ copy_ex(target_name) {
clear_dir = true
inputs = [
- libraries_list,
+ _libraries_list,
]
if (defined(invoker.include_main_binary) && invoker.include_main_binary) {
- inputs += [ binary ]
+ inputs += [ invoker.binary ]
}
- dest = dist_dir
+ dest = invoker.dist_dir
- rebased_libraries_list = rebase_path(libraries_list, root_build_dir)
+ rebased_libraries_list = rebase_path(_libraries_list, root_build_dir)
args = [ "--files=@FileArg($rebased_libraries_list:lib_paths)" ]
if (defined(invoker.include_main_binary) && invoker.include_main_binary) {
- rebased_binaries_list = rebase_path([ binary ], root_build_dir)
+ rebased_binaries_list = rebase_path([ invoker.binary ], root_build_dir)
args += [ "--files=$rebased_binaries_list" ]
}
deps = [
- ":$find_deps_target_name",
+ ":$_find_deps_target_name",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
}
-
- group(template_name) {
- forward_variables_from(invoker, [ "visibility" ])
- public_deps = [
- ":$copy_target_name",
- ]
- }
}
# Compile a protocol buffer to java.

Powered by Google App Engine
This is Rietveld 408576698