From 14bcf0f3d4bc02ab3b4ea421476e78aadaccefae Mon Sep 17 00:00:00 2001 From: Tess Strickland Date: Thu, 14 Oct 2021 11:51:32 +0000 Subject: [PATCH] [build] Make app snapshot build failures copy/pastable. * Use a filename without spaces for the non-existent DFE path. * Convert a relative path to the executable to an absolute one in gn_run_binary so the command can be run outside the build directory without editing. Change-Id: I31421acb54ad940115d4e000c4ec31605a33b5cf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216800 Reviewed-by: Alexander Thomas --- build/gn_run_binary.py | 9 +++------ utils/application_snapshot.gni | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/build/gn_run_binary.py b/build/gn_run_binary.py index 9b3c32d32d1..99cd20c2887 100755 --- a/build/gn_run_binary.py +++ b/build/gn_run_binary.py @@ -45,12 +45,9 @@ def main(argv): return 1 # Unless the path is absolute, this script is designed to run binaries - # produced by the current build. We always prefix it with "./" to avoid - # picking up system versions that might also be on the path. - if os.path.isabs(argv[2]): - path = argv[2] - else: - path = './' + argv[2] + # produced by the current build, which is the current working directory when + # this script is run. + path = os.path.abspath(argv[2]) if not os.path.isfile(path): print("Binary not found: " + path) diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni index 6a2efbb80ec..9c4cd3fbceb 100644 --- a/utils/application_snapshot.gni +++ b/utils/application_snapshot.gni @@ -148,7 +148,7 @@ template("_application_snapshot") { # Explicitly set DFE so Dart doesn't implicitly depend on the kernel service # snapshot (creating a circular dep. for kernel-service_snapshot). - dfe = "NEVER LOADED" + dfe = "NEVER_LOADED" abs_depfile = rebase_path(depfile) abs_output = rebase_path(output)