[build] Remove unused "exec_script" mode from gn_run_binary.py.
Change-Id: Ie7d184dfe1694985fdff318736f34b45267a5bf3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/509141 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
42ebe08081
commit
40acd32778
@@ -89,9 +89,7 @@ template("_compiled_action") {
|
||||
deps += invoker.deps
|
||||
}
|
||||
|
||||
# The "compiled_action" argument to gn_run_binary.py indicates that
|
||||
# it will exit with a non-zero status when the target program does.
|
||||
args = [ "compiled_action" ]
|
||||
args = []
|
||||
|
||||
if (_is_dart && use_rbe && host_os == rbe_os && host_cpu == rbe_cpu) {
|
||||
args += [
|
||||
@@ -147,7 +145,7 @@ template("_prebuilt_tool_action") {
|
||||
inputs += [ invoker.dfe ]
|
||||
}
|
||||
|
||||
args = [ "compiled_action" ]
|
||||
args = []
|
||||
|
||||
if (_is_dart && use_rbe && host_os == rbe_os && host_cpu == rbe_cpu) {
|
||||
args += [
|
||||
|
||||
+6
-17
@@ -5,12 +5,9 @@
|
||||
"""Helper script for GN to run an arbitrary binary. See compiled_action.gni.
|
||||
|
||||
Run with:
|
||||
python3 gn_run_binary.py <invoker> <binary_name> [args ...]
|
||||
python3 gn_run_binary.py <binary_name> [args ...]
|
||||
|
||||
Where <invoker> is either "compiled_action" or "exec_script". If it is
|
||||
"compiled_action" the script has a non-zero exit code on a failure. If it is
|
||||
"exec_script" the script has no output on success and produces output otherwise,
|
||||
but always has an exit code of 0.
|
||||
Swallows output on success.
|
||||
"""
|
||||
|
||||
import os
|
||||
@@ -36,30 +33,22 @@ def _decode(bytes):
|
||||
|
||||
|
||||
def main(argv):
|
||||
error_exit = 0
|
||||
if argv[1] == "compiled_action":
|
||||
error_exit = 1
|
||||
elif argv[1] != "exec_script":
|
||||
print("The first argument should be either "
|
||||
"'compiled_action' or 'exec_script")
|
||||
return 1
|
||||
|
||||
# Unless the path is absolute, this script is designed to run binaries
|
||||
# produced by the current build, which is the current working directory when
|
||||
# this script is run.
|
||||
path = os.path.abspath(argv[2])
|
||||
path = os.path.abspath(argv[1])
|
||||
|
||||
if not os.path.isfile(path):
|
||||
print("Binary not found: " + path)
|
||||
return error_exit
|
||||
return 1
|
||||
|
||||
# The rest of the arguments are passed directly to the executable.
|
||||
args = [path] + argv[3:]
|
||||
args = [path] + argv[2:]
|
||||
|
||||
result = run_command(args)
|
||||
if result != 0:
|
||||
print(result)
|
||||
return error_exit
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ if (is_linux) {
|
||||
outputs = [ "$root_out_dir/dart_${version}-1_${debian_arch}.deb" ]
|
||||
script = "../../build/gn_run_binary.py"
|
||||
args = [
|
||||
"compiled_action",
|
||||
rebase_path("create_debian_package.py"),
|
||||
"--version=$version",
|
||||
"--timestamp=$timestamp",
|
||||
|
||||
@@ -68,12 +68,10 @@ template("compile_platform") {
|
||||
depfile = outputs[0] + ".d"
|
||||
|
||||
script = "$_dart_root/build/gn_run_binary.py"
|
||||
args = [
|
||||
"compiled_action",
|
||||
rebase_path(get_label_info(compile_platform_tool, "root_out_dir") +
|
||||
"/compile_platform.exe",
|
||||
root_build_dir),
|
||||
]
|
||||
args =
|
||||
[ rebase_path(get_label_info(compile_platform_tool, "root_out_dir") +
|
||||
"/compile_platform.exe",
|
||||
root_build_dir) ]
|
||||
args += invoker.args
|
||||
if (defined(invoker.single_root_scheme)) {
|
||||
args += [ "--single-root-scheme=" + invoker.single_root_scheme ]
|
||||
|
||||
@@ -11,7 +11,6 @@ template("wasm_module") {
|
||||
action(target_name) {
|
||||
script = rebase_path("//build/gn_run_binary.py")
|
||||
args = [
|
||||
"compiled_action",
|
||||
rebase_path("//third_party/emsdk/upstream/emscripten/emcc"),
|
||||
"--no-entry",
|
||||
rebase_path("//tests/web/wasm/ffi/${invoker.module_name}.c"),
|
||||
|
||||
@@ -112,12 +112,9 @@ template("kernel_service_dill") {
|
||||
scheme = "org-dartlang-kernel-service"
|
||||
|
||||
script = "$_dart_root/build/gn_run_binary.py"
|
||||
args = [
|
||||
"compiled_action",
|
||||
rebase_path(
|
||||
get_label_info(gen_kernel_tool, "root_out_dir") + "/gen_kernel.exe",
|
||||
root_build_dir),
|
||||
]
|
||||
args = [ rebase_path(get_label_info(gen_kernel_tool, "root_out_dir") +
|
||||
"/gen_kernel.exe",
|
||||
root_build_dir) ]
|
||||
args += invoker.extra_args
|
||||
args += [
|
||||
"--depfile=" + rebase_path(depfile, root_build_dir),
|
||||
|
||||
Reference in New Issue
Block a user