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

Unified Diff: build/symlink.gni

Issue 1882533004: 🐍 Fix GN deps needed by third_party/WebKit/Tools/Scripts/run-webkit-tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/symlink.gni
diff --git a/build/symlink.gni b/build/symlink.gni
index 691128c8d3b6c02a891675fb7b22d416af34183a..95a498de1b48e0123435e649124f33668d066a7e 100644
--- a/build/symlink.gni
+++ b/build/symlink.gni
@@ -35,8 +35,11 @@ template("symlink") {
#
# Args:
# binary_label: Target that builds the file to symlink to. e.g.:
-# ":foo($host_toolchain)".
-# output: Where to create the symlink (default="$root_out_dir/$target_name")
+# ":$target_name($host_toolchain)".
+# binary_output_name: The output_name set by the binary_label target
+# (if applicable).
+# output_name: Where to create the symlink
+# (default="$root_out_dir/$binary_output_name").
#
# Example:
# if (current_toolchain == host_toolchain) {
@@ -59,10 +62,17 @@ template("binary_symlink") {
]
_out_dir = get_label_info(invoker.binary_label, "root_out_dir")
- source = "$_out_dir/" + get_label_info(invoker.binary_label, "name")
+ if (defined(invoker.binary_output_name)) {
+ _name = invoker.binary_output_name
+ } else {
+ _name = get_label_info(invoker.binary_label, "name")
+ }
+ source = "$_out_dir/$_name"
- if (!defined(output)) {
- output = "$root_out_dir/${invoker.target_name}"
+ _output_name = _name
+ if (defined(invoker.output_name)) {
+ _output_name = invoker.output_name
}
+ output = "$root_out_dir/$_output_name"
}
}

Powered by Google App Engine
This is Rietveld 408576698