mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:59:39 +00:00
[infra] Add a GN flag to omit git information
After Clang 6.0, changing the value of a single string can change the order of symbols in the .rodata section. This confuses Golem's checks for the equivalence of two binaries. This change adds a GN flag to omit the git hash and commit time from the Dart VM's version string to avoid re-running Golem benchmarks on commits where the only VM change is in the version string. To use it, pass --gn-args="dart_version_git_info=false" to gn.py Change-Id: I8134714d50e3c9b6dae750a515dc3c2228d76b53 Reviewed-on: https://dart-review.googlesource.com/33000 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Zach Anderson <zra@google.com>
This commit is contained in:
parent
ae068aaabe
commit
f4758727dc
|
@ -339,4 +339,7 @@ action("generate_version_cc_file") {
|
|||
"--input",
|
||||
rebase_path("vm/version_in.cc", root_build_dir),
|
||||
]
|
||||
if (!dart_version_git_info) {
|
||||
args += [ "--ignore_svn_revision" ]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,4 +52,8 @@ declare_args() {
|
|||
# core-jit snapshot breaks the ability to change various flags that affect
|
||||
# code generation.
|
||||
dart_core_snapshot_kind = "core"
|
||||
|
||||
# Whether the Dart binary version string should include the git hash and
|
||||
# git commit time.
|
||||
dart_version_git_info = true
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ def makeFile(quiet, output_file, input_file, ignore_svn_revision):
|
|||
version_cc_text = version_cc_text.replace("{{VERSION_STR}}",
|
||||
version_string)
|
||||
version_time = utils.GetGitTimestamp()
|
||||
if version_time == None:
|
||||
if ignore_svn_revision or version_time == None:
|
||||
version_time = "Unknown timestamp"
|
||||
version_cc_text = version_cc_text.replace("{{COMMIT_TIME}}",
|
||||
version_time)
|
||||
|
|
Loading…
Reference in a new issue