| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/version.h" | 7 #include "src/version.h" |
| 8 | 8 |
| 9 // These macros define the version number for the current version. | 9 // These macros define the version number for the current version. |
| 10 // NOTE these macros are used by some of the tool scripts and the build | 10 // NOTE these macros are used by some of the tool scripts and the build |
| 11 // system so their names cannot be changed without changing the scripts. | 11 // system so their names cannot be changed without changing the scripts. |
| 12 #define MAJOR_VERSION 4 | 12 #define MAJOR_VERSION 4 |
| 13 #define MINOR_VERSION 2 | 13 #define MINOR_VERSION 2 |
| 14 #define BUILD_NUMBER 0 | 14 #define BUILD_NUMBER 0 |
| 15 #define PATCH_LEVEL 0 | 15 #define PATCH_LEVEL 0 |
| 16 // Use 1 for candidates and 0 otherwise. | 16 // Use 1 for candidates and 0 otherwise. |
| 17 // (Boolean macro values are not supported by all preprocessors.) | 17 // (Boolean macro values are not supported by all preprocessors.) |
| 18 #define IS_CANDIDATE_VERSION 1 | 18 #define IS_CANDIDATE_VERSION 1 |
| 19 | 19 |
| 20 // Used to mark a version built from a bad tag. |
| 21 #define IS_INVALID_VERSION 0 |
| 22 |
| 20 // Define SONAME to have the build system put a specific SONAME into the | 23 // Define SONAME to have the build system put a specific SONAME into the |
| 21 // shared library instead the generic SONAME generated from the V8 version | 24 // shared library instead the generic SONAME generated from the V8 version |
| 22 // number. This define is mainly used by the build system script. | 25 // number. This define is mainly used by the build system script. |
| 23 #define SONAME "" | 26 #define SONAME "" |
| 24 | 27 |
| 28 #if IS_INVALID_VERSION |
| 29 #define SUFFIX_STRING " (invalid)" |
| 30 #else |
| 25 #if IS_CANDIDATE_VERSION | 31 #if IS_CANDIDATE_VERSION |
| 26 #define CANDIDATE_STRING " (candidate)" | 32 #define SUFFIX_STRING " (candidate)" |
| 27 #else | 33 #else |
| 28 #define CANDIDATE_STRING "" | 34 #define SUFFIX_STRING "" |
| 35 #endif |
| 29 #endif | 36 #endif |
| 30 | 37 |
| 31 #define SX(x) #x | 38 #define SX(x) #x |
| 32 #define S(x) SX(x) | 39 #define S(x) SX(x) |
| 33 | 40 |
| 34 #if PATCH_LEVEL > 0 | 41 #if PATCH_LEVEL > 0 |
| 35 #define VERSION_STRING \ | 42 #define VERSION_STRING \ |
| 36 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) "." \ | 43 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) "." S(PATCH_LEVEL) \ |
| 37 S(PATCH_LEVEL) CANDIDATE_STRING | 44 SUFFIX_STRING |
| 38 #else | 45 #else |
| 39 #define VERSION_STRING \ | 46 #define VERSION_STRING \ |
| 40 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) \ | 47 S(MAJOR_VERSION) "." S(MINOR_VERSION) "." S(BUILD_NUMBER) SUFFIX_STRING |
| 41 CANDIDATE_STRING | |
| 42 #endif | 48 #endif |
| 43 | 49 |
| 44 namespace v8 { | 50 namespace v8 { |
| 45 namespace internal { | 51 namespace internal { |
| 46 | 52 |
| 47 int Version::major_ = MAJOR_VERSION; | 53 int Version::major_ = MAJOR_VERSION; |
| 48 int Version::minor_ = MINOR_VERSION; | 54 int Version::minor_ = MINOR_VERSION; |
| 49 int Version::build_ = BUILD_NUMBER; | 55 int Version::build_ = BUILD_NUMBER; |
| 50 int Version::patch_ = PATCH_LEVEL; | 56 int Version::patch_ = PATCH_LEVEL; |
| 51 bool Version::candidate_ = (IS_CANDIDATE_VERSION != 0); | 57 bool Version::candidate_ = (IS_CANDIDATE_VERSION != 0); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 SNPrintF(str, "libv8-%d.%d.%d%s.so", | 90 SNPrintF(str, "libv8-%d.%d.%d%s.so", |
| 85 GetMajor(), GetMinor(), GetBuild(), candidate); | 91 GetMajor(), GetMinor(), GetBuild(), candidate); |
| 86 } | 92 } |
| 87 } else { | 93 } else { |
| 88 // Use specific SONAME. | 94 // Use specific SONAME. |
| 89 SNPrintF(str, "%s", soname_); | 95 SNPrintF(str, "%s", soname_); |
| 90 } | 96 } |
| 91 } | 97 } |
| 92 | 98 |
| 93 } } // namespace v8::internal | 99 } } // namespace v8::internal |
| OLD | NEW |