[Bazel] Fix version defines
authorGeoffrey Martin-Noble <gcmn@google.com>
Fri, 20 Aug 2021 23:53:46 +0000 (16:53 -0700)
committerGeoffrey Martin-Noble <gcmn@google.com>
Sat, 21 Aug 2021 00:01:01 +0000 (17:01 -0700)
Some of these were the wrong version and some of them were the wrong
format. Did some hunting around to figure out what exactly they're
supposed to be. Since basically everything is derived from the LLVM
version we should probably make this a bit less hardcoded, but just
fixing the values for now.

Sources:
https://github.com/llvm/llvm-project/blob/b686fc7a1bea/clang/include/clang/Basic/Version.inc.in
https://github.com/llvm/llvm-project/blob/b686fc7a1bea/clang/CMakeLists.txt#L353-L363
https://github.com/llvm/llvm-project/blob/b686fc7a1bea/llvm/CMakeLists.txt#L13-L29
https://github.com/llvm/llvm-project/blob/b686fc7a1bea/lld/CMakeLists.txt#L131-L138

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D108500

utils/bazel/llvm-project-overlay/clang/BUILD.bazel
utils/bazel/llvm-project-overlay/lld/BUILD.bazel
utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/llvm-config.h

index 5822927..1996451 100644 (file)
@@ -344,11 +344,11 @@ genrule(
     name = "basic_version_gen",
     outs = ["include/clang/Basic/Version.inc"],
     cmd = (
-        "echo '#define CLANG_VERSION 12.0' >> $@\n" +
-        "echo '#define CLANG_VERSION_MAJOR 12' >> $@\n" +
+        "echo '#define CLANG_VERSION 14.0.0' >> $@\n" +
+        "echo '#define CLANG_VERSION_MAJOR 14' >> $@\n" +
         "echo '#define CLANG_VERSION_MINOR 0' >> $@\n" +
         "echo '#define CLANG_VERSION_PATCHLEVEL 0' >> $@\n" +
-        "echo '#define CLANG_VERSION_STRING \"git\"' >> $@\n"
+        "echo '#define CLANG_VERSION_STRING \"14.0.0\"' >> $@\n"
     ),
 )
 
index 00289e8..23a2ec2 100644 (file)
@@ -13,7 +13,7 @@ package(
 genrule(
     name = "config_version_gen",
     outs = ["include/lld/Common/Version.inc"],
-    cmd = "echo '#define LLD_VERSION_STRING \"git\"' > $@",
+    cmd = "echo '#define LLD_VERSION_STRING \"14.0.0\"' > $@",
 )
 
 genrule(
index 6c41bc8..1f7b7bf 100644 (file)
@@ -74,7 +74,7 @@
 #define LLVM_USE_PERF 0
 
 /* Major version of the LLVM API */
-#define LLVM_VERSION_MAJOR 13
+#define LLVM_VERSION_MAJOR 14
 
 /* Minor version of the LLVM API */
 #define LLVM_VERSION_MINOR 0
@@ -83,7 +83,7 @@
 #define LLVM_VERSION_PATCH 0
 
 /* LLVM version string */
-#define LLVM_VERSION_STRING "13.0.0git"
+#define LLVM_VERSION_STRING "14.0.0git"
 
 /* Whether LLVM records statistics for use with GetStatistics(),
  * PrintStatistics() or PrintStatisticsJSON()