forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
executable_action.gni
43 lines (35 loc) · 1.03 KB
/
executable_action.gni
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if (host_os == "win") {
host_executable_suffix = ".exe"
} else {
host_executable_suffix = ""
}
template("executable_action") {
action(target_name) {
assert(defined(invoker.tool), "The executable tool must be specified.")
assert(defined(invoker.args), "The command line args must be specified.")
if (defined(invoker.visibility)) {
visibility = invoker.visibility
}
if (defined(invoker.testonly)) {
testonly = invoker.testonly
}
script = "//build/gn_run_binary.py"
host_executable =
rebase_path("${invoker.tool}${host_executable_suffix}", root_build_dir)
if (defined(invoker.deps)) {
deps = invoker.deps
} else {
deps = []
}
if (defined(invoker.inputs)) {
inputs = invoker.inputs
} else {
inputs = []
}
outputs = invoker.outputs
args = [ host_executable ] + invoker.args
}
}