b096c44ffc
Sometimes, the embedder might want to merge a fix to an abandoned branch or to a supported branch but the fix is not relevant to Chromium. This adds a new version string that the embedder can set at compile time and that will be appended to the official V8 version. The separator must be provided in the string. For instance, to have a full version string like "6.0.287.53-emb.1", the embedder must set V8_EMBEDDER_STRING to "-emb.1". Related Node.js issue: https://github.com/nodejs/node/pull/9754 BUG=v8:5740 R=machenbach@chromium.org Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: Ifa2d9bd213795e6d54886436f8c3787ac6162823 Reviewed-on: https://chromium-review.googlesource.com/690475 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Michaël Zasso <mic.besace@gmail.com> Cr-Commit-Position: refs/heads/master@{#48301}
38 lines
1.0 KiB
C
38 lines
1.0 KiB
C
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef V8_VERSION_STRING_H_
|
|
#define V8_VERSION_STRING_H_
|
|
|
|
#include "v8-version.h" // NOLINT(build/include)
|
|
|
|
// This is here rather than v8-version.h to keep that file simple and
|
|
// machine-processable.
|
|
|
|
#if V8_IS_CANDIDATE_VERSION
|
|
#define V8_CANDIDATE_STRING " (candidate)"
|
|
#else
|
|
#define V8_CANDIDATE_STRING ""
|
|
#endif
|
|
|
|
#ifndef V8_EMBEDDER_STRING
|
|
#define V8_EMBEDDER_STRING ""
|
|
#endif
|
|
|
|
#define V8_SX(x) #x
|
|
#define V8_S(x) V8_SX(x)
|
|
|
|
#if V8_PATCH_LEVEL > 0
|
|
#define V8_VERSION_STRING \
|
|
V8_S(V8_MAJOR_VERSION) \
|
|
"." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) "." V8_S( \
|
|
V8_PATCH_LEVEL) V8_EMBEDDER_STRING V8_CANDIDATE_STRING
|
|
#else
|
|
#define V8_VERSION_STRING \
|
|
V8_S(V8_MAJOR_VERSION) \
|
|
"." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) V8_CANDIDATE_STRING
|
|
#endif
|
|
|
|
#endif // V8_VERSION_STRING_H_
|