1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-01 07:14:29 +00:00

[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 <athom@google.com>
This commit is contained in:
Tess Strickland 2021-10-14 11:51:32 +00:00
parent 63e5b0db57
commit 14bcf0f3d4
2 changed files with 4 additions and 7 deletions

View File

@ -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)

View File

@ -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)