1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-03 00:08:46 +00:00

[gn] Don't run a python script unconditionally

Part of https://github.com/flutter/flutter/issues/144430

Change-Id: Ie0d998ed98fc5fe3ad8508809f1495cdd3663c59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355548
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This commit is contained in:
Zach Anderson 2024-03-05 03:08:40 +00:00 committed by Commit Queue
parent 210e120fbd
commit a257981ddc

View File

@ -19,12 +19,7 @@ declare_args() {
# to out/ReleaseX64/args.gn. The path above can be extracted from the `.git`
# file under the git worktree folder.
# The script run here should take care of everything automatically though.
default_git_folder = exec_script("$_dart_root/tools/get_dot_git_folder.py",
[
rebase_path("$_dart_root/.git"),
"$_dart_root/.git",
],
"trim string")
default_git_folder = ""
# Whether to enable the SDK hash check that will prevent loading a kernel
# into a VM which was built with a different SDK.
@ -34,6 +29,15 @@ declare_args() {
dart_sdk_output = "dart-sdk"
}
if (default_git_folder == "") {
default_git_folder = exec_script("$_dart_root/tools/get_dot_git_folder.py",
[
rebase_path("$_dart_root/.git"),
"$_dart_root/.git",
],
"trim string")
}
# The SDK hash to build into VM and kernels.
# The value 0000000000 signifies no hash is set, which will disable the check.
if (verify_sdk_hash) {