diff --git a/.bazelrc b/.bazelrc index 4522b0fd..6e401219 100644 --- a/.bazelrc +++ b/.bazelrc @@ -1,2 +1,3 @@ # Build in C++17 mode without a custom CROSSTOOL build --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 +common --noenable_bzlmod diff --git a/WORKSPACE b/WORKSPACE index 3e4628e0..eb7c8dea 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -14,22 +14,38 @@ workspace(name = "com_google_sandboxed_api") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") + +# Bazel rules_python +maybe( + http_archive, + name = "rules_python", + sha256 = "5f5855c2a8af8fa9e09ed26720ed921f1a119f27cb041c5c137c8a5d3c8d9c55", # 2024-04-05 + strip_prefix = "rules_python-4a615bec59b51d9d5f0675ec312c5b84e2eb792c", + urls = ["https://github.com/bazelbuild/rules_python/archive/4a615bec59b51d9d5f0675ec312c5b84e2eb792c.zip"], +) + +load("@rules_python//python:repositories.bzl", "py_repositories") + +py_repositories() + load("//sandboxed_api/bazel:sapi_deps.bzl", "sapi_deps") # Load Sandboxed API dependencies sapi_deps() load("@bazel_skylib//lib:versions.bzl", "versions") -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +versions.check(minimum_bazel_version = "5.1.0") + +load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") + +protobuf_deps() + load( "//sandboxed_api/bazel:llvm_config.bzl", "llvm_disable_optional_support_deps", ) -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") - -versions.check(minimum_bazel_version = "5.1.0") - -protobuf_deps() llvm_disable_optional_support_deps() diff --git a/cmake/abseil-cpp.cmake b/cmake/abseil-cpp.cmake index e89df425..cc9d9fdf 100644 --- a/cmake/abseil-cpp.cmake +++ b/cmake/abseil-cpp.cmake @@ -13,8 +13,8 @@ # limitations under the License. FetchContent_Declare(absl - URL https://github.com/abseil/abseil-cpp/archive/8ebad34c3fa54a9ad2f46ca8cab98e75c4f750bf.zip # 2023-08-24 - URL_HASH SHA256=1ca4c7431b0818a10507af8eac34a1873e4e786a18ecd3f04d8faf3a0874e8bb + URL https://github.com/abseil/abseil-cpp/archive/61e47a454c81eb07147b0315485f476513cc1230.zip # 2024-04-05 + URL_HASH SHA256=9ba0e97acf7026f7479e24967866ba9560cf3256304b6c8932d2b1ab7d0dfcd2 ) set(ABSL_CXX_STANDARD ${SAPI_CXX_STANDARD} CACHE STRING "" FORCE) set(ABSL_PROPAGATE_CXX_STD ON CACHE BOOL "" FORCE) diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake index 98c7fbfe..aa41f8a1 100644 --- a/cmake/protobuf.cmake +++ b/cmake/protobuf.cmake @@ -13,8 +13,8 @@ # limitations under the License. FetchContent_Declare(protobuf - URL https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.tar.gz - URL_HASH SHA256=a700a49470d301f1190a487a923b5095bf60f08f4ae4cac9f5f7c36883d17971 + URL https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protobuf-26.1.tar.gz # 2024-03-27 + URL_HASH SHA256=4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8 ) set(protobuf_ABSL_PROVIDER "package" CACHE STRING "" FORCE) diff --git a/sandboxed_api/bazel/sapi_deps.bzl b/sandboxed_api/bazel/sapi_deps.bzl index 66b46a5d..65757adf 100644 --- a/sandboxed_api/bazel/sapi_deps.bzl +++ b/sandboxed_api/bazel/sapi_deps.bzl @@ -37,9 +37,9 @@ def sapi_deps(): maybe( http_archive, name = "com_google_absl", - sha256 = "1ca4c7431b0818a10507af8eac34a1873e4e786a18ecd3f04d8faf3a0874e8bb", # 2023-08-24 - strip_prefix = "abseil-cpp-8ebad34c3fa54a9ad2f46ca8cab98e75c4f750bf", - urls = ["https://github.com/abseil/abseil-cpp/archive/8ebad34c3fa54a9ad2f46ca8cab98e75c4f750bf.zip"], + sha256 = "9ba0e97acf7026f7479e24967866ba9560cf3256304b6c8932d2b1ab7d0dfcd2", # 2024-04-05 + strip_prefix = "abseil-cpp-61e47a454c81eb07147b0315485f476513cc1230", + urls = ["https://github.com/abseil/abseil-cpp/archive/61e47a454c81eb07147b0315485f476513cc1230.zip"], ) maybe( http_archive, @@ -63,9 +63,9 @@ def sapi_deps(): maybe( http_archive, name = "com_google_protobuf", - sha256 = "a700a49470d301f1190a487a923b5095bf60f08f4ae4cac9f5f7c36883d17971", # 2023-07-06 - strip_prefix = "protobuf-23.4", - urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.tar.gz"], + sha256 = "4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8", # 2024-03-27 + strip_prefix = "protobuf-26.1", + urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protobuf-26.1.tar.gz"], ) # libcap