v8-version-string.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2017 the V8 project authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef V8_VERSION_STRING_H_
  5. #define V8_VERSION_STRING_H_
  6. #include "v8-version.h" // NOLINT(build/include_directory)
  7. // This is here rather than v8-version.h to keep that file simple and
  8. // machine-processable.
  9. #if V8_IS_CANDIDATE_VERSION
  10. #define V8_CANDIDATE_STRING " (candidate)"
  11. #else
  12. #define V8_CANDIDATE_STRING ""
  13. #endif
  14. #ifndef V8_EMBEDDER_STRING
  15. #define V8_EMBEDDER_STRING ""
  16. #endif
  17. #define V8_SX(x) #x
  18. #define V8_S(x) V8_SX(x)
  19. #if V8_PATCH_LEVEL > 0
  20. #define V8_VERSION_STRING \
  21. V8_S(V8_MAJOR_VERSION) \
  22. "." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) "." V8_S( \
  23. V8_PATCH_LEVEL) V8_EMBEDDER_STRING V8_CANDIDATE_STRING
  24. #else
  25. #define V8_VERSION_STRING \
  26. V8_S(V8_MAJOR_VERSION) \
  27. "." V8_S(V8_MINOR_VERSION) "." V8_S(V8_BUILD_NUMBER) \
  28. V8_EMBEDDER_STRING V8_CANDIDATE_STRING
  29. #endif
  30. #endif // V8_VERSION_STRING_H_