Skip to content

Commit

Permalink
[Bazel] Use PACKAGE_VERSION for version string.
Browse files Browse the repository at this point in the history
This enables "-rc" suffix in release branches.
  • Loading branch information
chapuni authored and banach-space committed Aug 7, 2024
1 parent cbe7a0f commit cb185fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions utils/bazel/llvm-project-overlay/clang/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

load(
"//:vars.bzl",
"LLVM_VERSION",
"LLVM_VERSION_MAJOR",
"LLVM_VERSION_MINOR",
"LLVM_VERSION_PATCH",
"PACKAGE_VERSION",
)
load("//:workspace_root.bzl", "workspace_root")
load("//llvm:binary_alias.bzl", "binary_alias")
Expand Down Expand Up @@ -553,12 +553,12 @@ genrule(
"echo '#define CLANG_VERSION_MAJOR_STRING \"{major}\"' >> $@\n" +
"echo '#define CLANG_VERSION_MINOR {minor}' >> $@\n" +
"echo '#define CLANG_VERSION_PATCHLEVEL {patch}' >> $@\n" +
"echo '#define CLANG_VERSION_STRING \"{vers}git\"' >> $@\n"
"echo '#define CLANG_VERSION_STRING \"{vers}\"' >> $@\n"
).format(
major = LLVM_VERSION_MAJOR,
minor = LLVM_VERSION_MINOR,
patch = LLVM_VERSION_PATCH,
vers = LLVM_VERSION,
vers = PACKAGE_VERSION,
),
)

Expand Down
4 changes: 2 additions & 2 deletions utils/bazel/llvm-project-overlay/llvm/config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

load(
"//:vars.bzl",
"LLVM_VERSION",
"LLVM_VERSION_MAJOR",
"LLVM_VERSION_MINOR",
"LLVM_VERSION_PATCH",
"PACKAGE_VERSION",
)

def native_arch_defines(arch, triple):
Expand Down Expand Up @@ -108,7 +108,7 @@ llvm_config_defines = os_defines + builtin_thread_pointer + select({
"LLVM_VERSION_MAJOR={}".format(LLVM_VERSION_MAJOR),
"LLVM_VERSION_MINOR={}".format(LLVM_VERSION_MINOR),
"LLVM_VERSION_PATCH={}".format(LLVM_VERSION_PATCH),
r'LLVM_VERSION_STRING=\"{}git\"'.format(LLVM_VERSION),
r'LLVM_VERSION_STRING=\"{}\"'.format(PACKAGE_VERSION),
# These shouldn't be needed by the C++11 standard, but are for some
# platforms (e.g. glibc < 2.18. See
# https://sourceware.org/bugzilla/show_bug.cgi?id=15366). These are also
Expand Down

0 comments on commit cb185fc

Please sign in to comment.