Skip to content

Commit 25f1b7b

Browse files
chore: Bump version of LLVM
1 parent 50bb043 commit 25f1b7b

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

fetch_deps.bzl

+27-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ _BAZEL_SKYLIB_VERSION = "1.3.0"
44
_PLATFORMS_COMMIT = "3fbc687756043fb58a407c2ea8c944bc2fe1d922" # 2022 Nov 10
55
_BAZEL_TOOLCHAIN_VERSION = "0.10.3"
66
_RULES_BOOST_COMMIT = "ed40cc3c6fb76fe46f40150ebb81ef6a625b6e36"
7-
_LLVM_COMMIT = "e0f3110b854a476c16cce7b44472cd7838d344e9" # Keep in sync with Version.h
7+
_LLVM_COMMIT = "a344db793aca6881379c7c83f5112d2870dbf958" # Keep in sync with Version.h
8+
9+
# _LLVM_COMMIT = "e0f3110b854a476c16cce7b44472cd7838d344e9" # Keep in sync with Version.h
810
_ABSL_COMMIT = "4ffaea74c1f5408e0757547a1ca0518ad43fa9f1"
911
_CXXOPTS_VERSION = "3.0.0"
1012
_RAPIDJSON_COMMIT = "a98e99992bd633a2736cc41f96ec85ef0c50e44d"
@@ -79,6 +81,17 @@ def fetch_direct_dependencies():
7981
# Keep the name 'zlib' so that Protobuf doesn't pull in another copy.
8082
#
8183
# https://sourcegraph.com/github.com/protocolbuffers/protobuf/-/blob/protobuf_deps.bzl?L48-58
84+
#
85+
# Yes, LLVM pulls in zlib-ng, but I can't figure out how to unify the two.
86+
# I tried adding this to the llvm_zlib http_archive call:
87+
#
88+
# repo_mapping = {"@zlib": "@llvm_zlib"}
89+
#
90+
# but that resulted in a build error.
91+
# Compiling src/google/protobuf/io/gzip_stream.cc failed: undeclared inclusion(s) in rule '@com_google_protobuf//:protobuf':
92+
# this rule is missing dependency declarations for the following files included by 'src/google/protobuf/io/gzip_stream.cc':
93+
# 'external/zlib/zlib.h'
94+
# 'external/zlib/zconf.h'
8295
http_archive(
8396
name = "zlib",
8497
build_file = "@scip_clang//third_party:zlib.BUILD",
@@ -90,6 +103,17 @@ def fetch_direct_dependencies():
90103
],
91104
)
92105

106+
http_archive(
107+
name = "llvm_zlib",
108+
build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
109+
sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
110+
strip_prefix = "zlib-ng-2.0.7",
111+
urls = [
112+
"https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
113+
],
114+
repo_mapping = {"@zlib": "@llvm_zlib"},
115+
)
116+
93117
http_archive(
94118
name = "llvm_zstd",
95119
build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
@@ -102,7 +126,8 @@ def fetch_direct_dependencies():
102126

103127
http_archive(
104128
name = "llvm-raw",
105-
sha256 = "04b76a5be88331f71a4e4fe96bccfebec302ddd0dbd9418fd5c186a7361c54fb",
129+
sha256 = "9b9c46e9fd3b62cc588bf4a622924b0227624b5741cbc6b909a5d315ec1b79b0",
130+
# sha256 = "04b76a5be88331f71a4e4fe96bccfebec302ddd0dbd9418fd5c186a7361c54fb",
106131
strip_prefix = "llvm-project-%s" % _LLVM_COMMIT,
107132
build_file_content = "# empty",
108133
urls = ["https://github.com/llvm/llvm-project/archive/%s.tar.gz" % _LLVM_COMMIT],

indexer/Version.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ constexpr bool debugMode = false;
1616
#endif
1717

1818
#define VERSION "0.3.1"
19-
#define LLVM_COMMIT \
20-
"e0f3110b854a476c16cce7b44472cd7838d344e9" // Keep synced with fetch_deps.bzl
19+
#define LLVM_COMMIT "a344db793aca6881379c7c83f5112d2870dbf958" //
20+
/* "e0f3110b854a476c16cce7b44472cd7838d344e9" // Keep synced with fetch_deps.bzl
21+
*/
2122

2223
// TODO: Add scip-clang Git SHA + dirty bit.
2324

setup_deps.bzl

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
22
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
33
load("@com_grail_bazel_compdb//:deps.bzl", "bazel_compdb_deps")
44
load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
5-
load("@llvm-raw//utils/bazel:terminfo.bzl", "llvm_terminfo_disable")
6-
load("@llvm-raw//utils/bazel:zlib.bzl", "llvm_zlib_external")
5+
6+
# load("@llvm-raw//utils/bazel:terminfo.bzl", "llvm_terminfo_disable")
7+
# load("@llvm-raw//utils/bazel:zlib.bzl", "llvm_zlib_external")
78
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
89
load("@python_3_10//:defs.bzl", "interpreter")
910
load("@rules_python//python:pip.bzl", "pip_parse")
@@ -14,8 +15,8 @@ def setup_dependencies():
1415
boost_deps()
1516
bazel_compdb_deps()
1617

17-
llvm_terminfo_disable(name = "llvm_terminfo")
18-
llvm_zlib_external(name = "llvm_zlib", external_zlib = "@zlib//:zlib")
18+
# llvm_terminfo_disable(name = "llvm_terminfo")
19+
# llvm_zlib_external(name = "llvm_zlib", external_zlib = "@zlib//:zlib")
1920

2021
# FIXME: Should we allow all targets in a release build?
2122
# Limit the number of backends here to save on compile time for now.

0 commit comments

Comments
 (0)