@@ -25,6 +25,11 @@ declare_args() {
25
25
# into a VM which was built with a different SDK.
26
26
verify_sdk_hash = true
27
27
28
+ # When verify_sdk_hash is true, this string is used as the verification hash
29
+ # instead of calculating one from the contents of the tree using the
30
+ # make_version.py script.
31
+ dart_sdk_verification_hash = " "
32
+
28
33
# The location in the build output directory of the built Dart SDK.
29
34
dart_sdk_output = " dart-sdk"
30
35
}
@@ -41,14 +46,17 @@ if (default_git_folder == "") {
41
46
# The SDK hash to build into VM and kernels.
42
47
# The value 0000000000 signifies no hash is set, which will disable the check.
43
48
if (verify_sdk_hash ) {
44
- sdk_hash = exec_script (" $_dart_root /tools/make_version.py" ,
45
- [ " --format={{GIT_HASH}}" ],
46
- " trim string" ,
47
- [
48
- " $_dart_root /tools/VERSION" ,
49
- " $_dart_root /tools/utils.py" ,
50
- " $default_git_folder /logs/HEAD" ,
51
- ])
49
+ sdk_hash = dart_sdk_verification_hash
50
+ if (sdk_hash == " " ) {
51
+ sdk_hash = exec_script (" $_dart_root /tools/make_version.py" ,
52
+ [ " --format={{GIT_HASH}}" ],
53
+ " trim string" ,
54
+ [
55
+ " $_dart_root /tools/VERSION" ,
56
+ " $_dart_root /tools/utils.py" ,
57
+ " $default_git_folder /logs/HEAD" ,
58
+ ])
59
+ }
52
60
} else {
53
61
sdk_hash = " 0000000000"
54
62
}
0 commit comments