mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 01:45:06 +00:00
d366f9619a
- Remove random build-id. - Replace build time in embedded version string with commit time. - Remove timestamps from Observatory tarball. - Zero-initialize skipped bytes in snapshot streams. - Fix uninitialized fields in PatchClass, Script and Library. - Disable (under flag) random identity hashes and concurrent GC. Bug: https://github.com/dart-lang/sdk/issues/31427 Change-Id: I3e95de679c8372841cd27ca60df78d9b00ffbfe1 Reviewed-on: https://dart-review.googlesource.com/22901 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Zach Anderson <zra@google.com>
37 lines
960 B
C++
37 lines
960 B
C++
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
#include "vm/version.h"
|
|
|
|
#include "vm/cpu.h"
|
|
#include "vm/os.h"
|
|
|
|
namespace dart {
|
|
|
|
// TODO(iposva): Avoid racy initialization.
|
|
static const char* formatted_version = NULL;
|
|
|
|
const char* Version::String() {
|
|
if (formatted_version == NULL) {
|
|
const char* os = OS::Name();
|
|
const char* arch = CPU::Id();
|
|
formatted_version = OS::SCreate(NULL, "%s on \"%s_%s\"", str_, os, arch);
|
|
}
|
|
return formatted_version;
|
|
}
|
|
|
|
const char* Version::SnapshotString() {
|
|
return snapshot_hash_;
|
|
}
|
|
|
|
const char* Version::CommitString() {
|
|
return commit_;
|
|
}
|
|
|
|
const char* Version::snapshot_hash_ = "{{SNAPSHOT_HASH}}";
|
|
const char* Version::str_ = "{{VERSION_STR}} ({{COMMIT_TIME}})";
|
|
const char* Version::commit_ = "{{VERSION_STR}}";
|
|
|
|
} // namespace dart
|