Upgrade to bazel 7.1.1
Change-Id: I7207da90df84e4634cdb3661a27f5e380fe9ca5c
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/debian/BUILD b/debian/BUILD
index a7b3b97..3aa05a3 100644
--- a/debian/BUILD
+++ b/debian/BUILD
@@ -3,60 +3,20 @@
apache2_debs = "files",
)
load(
- ":postgresql_amd64.bzl",
- postgresql_amd64_debs = "files",
-)
-load(
- ":patch.bzl",
- patch_debs = "files",
-)
-load(
- ":rsync.bzl",
- rsync_debs = "files",
-)
-load(
- ":ssh.bzl",
- ssh_debs = "files",
-)
-load(
- ":pandoc.bzl",
- pandoc_debs = "files",
-)
-load(
- ":libusb.bzl",
- libusb_debs = "files",
-)
-load(
- ":mingw_compiler.bzl",
- mingw_compiler_debs = "files",
-)
-load(
- ":patchelf.bzl",
- patchelf_debs = "files",
-)
-load(
":arm_frc_gnueabi_deps.bzl",
arm_frc_gnueabi_deps_debs = "files",
)
load(
- ":gtk_runtime.bzl",
- gtk_runtime_debs = "files",
-)
-load(
- ":opencv_amd64.bzl",
- opencv_amd64_debs = "files",
+ ":clang_amd64.bzl",
+ clang_amd64_debs = "files",
)
load(
":gstreamer_amd64.bzl",
gstreamer_amd64_debs = "files",
)
load(
- ":lzma_amd64.bzl",
- lzma_amd64_debs = "files",
-)
-load(
- ":lzma_arm64.bzl",
- lzma_arm64_debs = "files",
+ ":gtk_runtime.bzl",
+ gtk_runtime_debs = "files",
)
load(
":libtinfo5_amd64.bzl",
@@ -67,14 +27,54 @@
libtinfo5_arm64_debs = "files",
)
load(
+ ":libusb.bzl",
+ libusb_debs = "files",
+)
+load(
+ ":lzma_amd64.bzl",
+ lzma_amd64_debs = "files",
+)
+load(
+ ":lzma_arm64.bzl",
+ lzma_arm64_debs = "files",
+)
+load(
+ ":mingw_compiler.bzl",
+ mingw_compiler_debs = "files",
+)
+load(
+ ":opencv_amd64.bzl",
+ opencv_amd64_debs = "files",
+)
+load(":packages.bzl", "download_packages", "generate_deb_tarball")
+load(
+ ":pandoc.bzl",
+ pandoc_debs = "files",
+)
+load(
+ ":patch.bzl",
+ patch_debs = "files",
+)
+load(
+ ":patchelf.bzl",
+ patchelf_debs = "files",
+)
+load(
+ ":postgresql_amd64.bzl",
+ postgresql_amd64_debs = "files",
+)
+load(
+ ":rsync.bzl",
+ rsync_debs = "files",
+)
+load(
+ ":ssh.bzl",
+ ssh_debs = "files",
+)
+load(
":xvfb_amd64.bzl",
xvfb_amd64_debs = "files",
)
-load(
- ":clang_amd64.bzl",
- clang_amd64_debs = "files",
-)
-load(":packages.bzl", "download_packages", "generate_deb_tarball")
package(default_visibility = ["//visibility:public"])
diff --git a/debian/aws_sdk.BUILD b/debian/aws_sdk.BUILD
index 46ac375..b5b2619 100644
--- a/debian/aws_sdk.BUILD
+++ b/debian/aws_sdk.BUILD
@@ -1,10 +1,18 @@
load("@org_frc971//tools/build_rules:select.bzl", "compiler_select")
+common_copts = [
+ "-DPLATFORM_LINUX",
+ "-DINTEL_NO_ITTNOTIFY_API",
+ "-Wno-cast-align",
+ "-Wno-cast-qual",
+]
+
cc_library(
name = "s3",
- srcs = glob(["aws-cpp-sdk-s3/source/**/*.cpp"]),
- hdrs = glob(["aws-cpp-sdk-s3/include/**/*.h"]),
- includes = ["aws-cpp-sdk-s3/include"],
+ srcs = glob(["generated/src/aws-cpp-sdk-s3/source/**/*.cpp"]),
+ hdrs = glob(["generated/src/aws-cpp-sdk-s3/include/**/*.h"]),
+ copts = common_copts,
+ includes = ["generated/src/aws-cpp-sdk-s3/include"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
@@ -15,7 +23,7 @@
genrule(
name = "gen_SDKConfig",
- outs = ["aws-cpp-sdk-core/include/aws/core/SDKConfig.h"],
+ outs = ["src/aws-cpp-sdk-core/include/aws/core/SDKConfig.h"],
cmd = "echo '#undef USE_AWS_MEMORY_MANAGEMENT' > $@",
target_compatible_with = ["@platforms//os:linux"],
)
@@ -23,43 +31,41 @@
cc_library(
name = "core",
srcs = glob(
- include = ["aws-cpp-sdk-core/source/**/*.cpp"],
+ include = ["src/aws-cpp-sdk-core/source/**/*.cpp"],
exclude = [
- "aws-cpp-sdk-core/source/utils/crypto/*/*.cpp",
- "aws-cpp-sdk-core/source/platform/**/*.cpp",
- "aws-cpp-sdk-core/source/platform/windows/**/*.cpp",
+ "src/aws-cpp-sdk-core/source/utils/crypto/*/*.cpp",
+ "src/aws-cpp-sdk-core/source/platform/**/*.cpp",
+ "src/aws-cpp-sdk-core/source/platform/windows/**/*.cpp",
# net/*.cpp is for not-(linux or windows), so exclude everything in there.
- "aws-cpp-sdk-core/source/net/**/*.cpp",
- "aws-cpp-sdk-core/source/http/windows/**/*.cpp",
+ "src/aws-cpp-sdk-core/source/net/**/*.cpp",
+ "src/aws-cpp-sdk-core/source/http/windows/**/*.cpp",
],
) + glob([
- "aws-cpp-sdk-core/source/utils/crypto/openssl/*.cpp",
- "aws-cpp-sdk-core/source/utils/crypto/factory/*.cpp",
- "aws-cpp-sdk-core/source/platform/linux-shared/**/*.cpp",
- "aws-cpp-sdk-core/source/net/linux-shared/*.cpp",
+ "src/aws-cpp-sdk-core/source/utils/crypto/openssl/*.cpp",
+ "src/aws-cpp-sdk-core/source/utils/crypto/factory/*.cpp",
+ "src/aws-cpp-sdk-core/source/platform/linux-shared/**/*.cpp",
+ "src/aws-cpp-sdk-core/source/net/linux-shared/*.cpp",
]) + [
":gen_SDKConfig",
],
hdrs = glob(
- include = ["aws-cpp-sdk-core/include/**/*.h"],
+ include = ["src/aws-cpp-sdk-core/include/**/*.h"],
exclude = [
- "aws-cpp-sdk-core/include/aws/core/utils/crypto/*/*.h",
- "aws-cpp-sdk-core/include/aws/core/http/windows/**/*.h",
+ "src/aws-cpp-sdk-core/include/aws/core/utils/crypto/*/*.h",
+ "src/aws-cpp-sdk-core/include/aws/core/http/windows/**/*.h",
],
) + glob([
- "aws-cpp-sdk-core/include/aws/core/utils/crypto/openssl/*.h",
+ "src/aws-cpp-sdk-core/include/aws/core/utils/crypto/openssl/*.h",
]),
- copts = [
+ copts = common_copts + [
"-DAWS_SDK_VERSION_MAJOR=10",
"-DAWS_SDK_VERSION_MINOR=34",
"-DAWS_SDK_VERSION_PATCH=\"\\\"BRT\"\\\"",
"-DENABLE_OPENSSL_ENCRYPTION",
"-DENABLE_CURL_CLIENT",
- "-Wno-cast-align",
- "-Wno-cast-qual",
"-Wno-format-nonliteral",
],
- includes = ["aws-cpp-sdk-core/include"],
+ includes = ["src/aws-cpp-sdk-core/include"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
@@ -69,13 +75,22 @@
":crt",
"@boringssl//:crypto",
"@com_github_curl_curl//:curl",
+ "@io_opentelemetry_cpp//api",
+ "@io_opentelemetry_cpp//exporters/ostream:ostream_metric_exporter",
+ "@io_opentelemetry_cpp//exporters/ostream:ostream_span_exporter",
+ "@io_opentelemetry_cpp//sdk:headers",
],
)
genrule(
name = "gen_Config",
outs = ["crt/aws-crt-cpp/include/aws/crt/Config.h"],
- cmd = "echo '#define AWS_CRT_CPP_VERSION \"1.10.34\"' > $@",
+ cmd = "; ".join([
+ "echo '#define AWS_CRT_CPP_VERSION \"1.11.321\"' > $@",
+ "echo '#define AWS_CRT_CPP_VERSION_MAJOR 1' >> $@",
+ "echo '#define AWS_CRT_CPP_VERSION_MINOR 11' >> $@",
+ "echo '#define AWS_CRT_CPP_VERSION_PATCH 321' >> $@",
+ ]),
target_compatible_with = ["@platforms//os:linux"],
)
@@ -85,9 +100,8 @@
hdrs = glob(["crt/aws-crt-cpp/include/**/*.h"]) + [
":gen_Config",
],
- copts = [
+ copts = common_copts + [
"-Wno-sign-compare",
- "-Wno-cast-qual",
"-Wno-tautological-type-limit-compare",
"-Wno-missing-field-initializers",
],
@@ -123,6 +137,7 @@
name = "aws-c-common",
srcs = glob([
"crt/aws-crt-cpp/crt/aws-c-common/source/*.c",
+ "crt/aws-crt-cpp/crt/aws-c-common/source/linux/*.c",
"crt/aws-crt-cpp/crt/aws-c-common/source/external/*.c",
"crt/aws-crt-cpp/crt/aws-c-common/source/posix/*.c",
]) + [
@@ -147,10 +162,8 @@
]),
"//conditions:default": [],
}),
- hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-common/include/**/*.h"]),
- copts = [
- "-Wno-cast-align",
- "-Wno-cast-qual",
+ hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-common/include/**/*.h"]) + ["crt/aws-crt-cpp/crt/aws-c-common/source/external/cJSON.h"],
+ copts = common_copts + [
"-Wno-sign-compare",
"-Wno-format-nonliteral",
] + compiler_select({
@@ -159,7 +172,10 @@
"-Wno-old-style-declaration",
],
}),
- includes = ["crt/aws-crt-cpp/crt/aws-c-common/include"],
+ includes = [
+ "crt/aws-crt-cpp/crt/aws-c-common/include",
+ "crt/aws-crt-cpp/crt/aws-c-common/source",
+ ],
target_compatible_with = ["@platforms//os:linux"],
textual_hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-common/include/**/*.inl"]),
visibility = ["//visibility:public"],
@@ -175,10 +191,7 @@
"//conditions:default": [],
}),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-event-stream/include/**/*.h"]),
- copts = [
- "-Wno-cast-align",
- "-Wno-cast-qual",
- ],
+ copts = common_copts,
includes = ["crt/aws-crt-cpp/crt/aws-c-event-stream/include"],
deps = [
":aws-c-common",
@@ -196,9 +209,7 @@
"//conditions:default": [],
}),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-checksums/include/**/*.h"]),
- copts = [
- "-Wno-cast-qual",
- "-Wno-cast-align",
+ copts = common_copts + [
"-Wno-implicit-function-declaration",
],
includes = ["crt/aws-crt-cpp/crt/aws-checksums/include"],
@@ -215,13 +226,11 @@
"crt/aws-crt-cpp/crt/aws-c-cal/source/unix/*.c",
]),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-cal/include/**/*.h"]),
- copts = [
- "-DOPENSSL_IS_AWSLC",
+ copts = common_copts + [
+ #"-DOPENSSL_IS_AWSLC",
"-Wno-incompatible-pointer-types",
"-Wno-unused-function",
"-Wno-unused-parameter",
- "-Wno-cast-align",
- "-Wno-cast-qual",
],
includes = ["crt/aws-crt-cpp/crt/aws-c-cal/include"],
target_compatible_with = ["@platforms//os:linux"],
@@ -235,10 +244,7 @@
name = "aws-c-s3",
srcs = glob(["crt/aws-crt-cpp/crt/aws-c-s3/source/**/*.c"]),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-s3/include/**/*.h"]),
- copts = [
- "-Wno-cast-align",
- "-Wno-cast-qual",
- ],
+ copts = common_copts,
includes = ["crt/aws-crt-cpp/crt/aws-c-s3/include"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
@@ -252,7 +258,7 @@
name = "aws-c-compression",
srcs = glob(["crt/aws-crt-cpp/crt/aws-c-compression/source/*.c"]),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-compression/include/**/*.h"]),
- copts = ["-Wno-cast-qual"],
+ copts = common_copts,
includes = ["crt/aws-crt-cpp/crt/aws-c-compression/include"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
@@ -264,10 +270,8 @@
name = "aws-c-http",
srcs = glob(["crt/aws-crt-cpp/crt/aws-c-http/source/**/*.c"]),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-http/include/**/*.h"]),
- copts = [
+ copts = common_copts + [
"-Wno-unused-but-set-variable",
- "-Wno-cast-align",
- "-Wno-cast-qual",
],
includes = ["crt/aws-crt-cpp/crt/aws-c-http/include"],
target_compatible_with = ["@platforms//os:linux"],
@@ -283,10 +287,7 @@
name = "aws-c-sdkutils",
srcs = glob(["crt/aws-crt-cpp/crt/aws-c-sdkutils/source/**/*.c"]),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-sdkutils/include/**/*.h"]),
- copts = [
- "-Wno-cast-align",
- "-Wno-cast-qual",
- ],
+ copts = common_copts,
includes = ["crt/aws-crt-cpp/crt/aws-c-sdkutils/include"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
@@ -298,10 +299,7 @@
name = "aws-c-auth",
srcs = glob(["crt/aws-crt-cpp/crt/aws-c-auth/source/**/*.c"]),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-auth/include/**/*.h"]),
- copts = [
- "-Wno-cast-align",
- "-Wno-cast-qual",
- ],
+ copts = common_copts,
includes = ["crt/aws-crt-cpp/crt/aws-c-auth/include"],
target_compatible_with = ["@platforms//os:linux"],
deps = [
@@ -316,9 +314,7 @@
name = "aws-c-mqtt",
srcs = glob(["crt/aws-crt-cpp/crt/aws-c-mqtt/source/**/*.c"]),
hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-mqtt/include/**/*.h"]),
- copts = [
- "-Wno-cast-qual",
- "-Wno-cast-align",
+ copts = common_copts + [
"-DAWS_MQTT_WITH_WEBSOCKETS",
],
includes = ["crt/aws-crt-cpp/crt/aws-c-mqtt/include"],
@@ -343,11 +339,9 @@
] + glob([
"crt/aws-crt-cpp/crt/aws-c-io/source/pkcs11/v2.40/*.h",
]),
- copts = [
+ copts = common_copts + [
"-DUSE_S2N",
"-DAWS_USE_EPOLL",
- "-Wno-cast-align",
- "-Wno-cast-qual",
"-Wno-sign-compare",
"-Wno-unused-parameter",
],
@@ -372,12 +366,10 @@
"crt/aws-crt-cpp/crt/s2n/pq-crypto/*.c",
]),
hdrs = ["crt/aws-crt-cpp/crt/s2n/api/s2n.h"],
- copts = [
+ copts = common_copts + [
"-Iexternal/aws_sdk/crt/aws-crt-cpp/crt/s2n",
"-DS2N_NO_PQ",
"-Wno-unknown-pragmas",
- "-Wno-cast-align",
- "-Wno-cast-qual",
"-Wno-unused-parameter",
"-Wno-sign-compare",
],
diff --git a/debian/aws_sdk.patch b/debian/aws_sdk.patch
index 8780e9b..785cc24 100644
--- a/debian/aws_sdk.patch
+++ b/debian/aws_sdk.patch
@@ -1,25 +1,13 @@
-Submodule crt/aws-crt-cpp contains modified content
-Submodule crt/aws-c-cal contains modified content
diff --git a/crt/aws-crt-cpp/crt/aws-c-cal/source/unix/openssl_platform_init.c b/crt/aws-crt-cpp/crt/aws-c-cal/source/unix/openssl_platform_init.c
index 761455b..fc434ba 100644
--- a/crt/aws-crt-cpp/crt/aws-c-cal/source/unix/openssl_platform_init.c
+++ b/crt/aws-crt-cpp/crt/aws-c-cal/source/unix/openssl_platform_init.c
-@@ -37,7 +37,7 @@ struct openssl_evp_md_ctx_table *g_aws_openssl_evp_md_ctx_table = NULL;
- /* 1.1 */
- extern HMAC_CTX *HMAC_CTX_new(void) __attribute__((weak, used));
- extern void HMAC_CTX_free(HMAC_CTX *) __attribute__((weak, used));
--extern int HMAC_CTX_reset(HMAC_CTX *) __attribute__((weak, used));
-+//extern int HMAC_CTX_reset(HMAC_CTX *) __attribute__((weak, used));
-
- /* 1.0.2 */
- extern void HMAC_CTX_init(HMAC_CTX *) __attribute__((weak, used));
-@@ -46,7 +46,7 @@ extern void HMAC_CTX_cleanup(HMAC_CTX *) __attribute__((weak)) __attribute__((us
- /* common */
+@@ -44,7 +44,7 @@ extern void HMAC_CTX_init(HMAC_CTX *) __attribute__((weak, used));
+ extern void HMAC_CTX_cleanup(HMAC_CTX *) __attribute__((weak, used));
extern int HMAC_Update(HMAC_CTX *, const unsigned char *, size_t) __attribute__((weak, used));
extern int HMAC_Final(HMAC_CTX *, unsigned char *, unsigned int *) __attribute__((weak, used));
--extern int HMAC_Init_ex(HMAC_CTX *, const void *, int, const EVP_MD *, ENGINE *) __attribute__((weak, used));
-+//extern int HMAC_Init_ex(HMAC_CTX *, const void *, int, const EVP_MD *, ENGINE *) __attribute__((weak, used));
-
- /* libcrypto 1.1 stub for init */
- static void s_hmac_ctx_init_noop(HMAC_CTX *ctx) {
-Submodule crt/s2n contains modified content
+-extern int HMAC_Init_ex(HMAC_CTX *, const void *, size_t, const EVP_MD *, ENGINE *) __attribute__((weak, used));
++//extern int HMAC_Init_ex(HMAC_CTX *, const void *, size_t, const EVP_MD *, ENGINE *) __attribute__((weak, used));
+
+ static int s_hmac_init_ex_bssl(HMAC_CTX *ctx, const void *key, size_t key_len, const EVP_MD *md, ENGINE *impl) {
+ AWS_PRECONDITION(ctx);
diff --git a/debian/packages.bzl b/debian/packages.bzl
index 97d6355..dad67d4 100644
--- a/debian/packages.bzl
+++ b/debian/packages.bzl
@@ -1,5 +1,5 @@
-load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
+load("@rules_pkg//:pkg.bzl", "pkg_tar")
# In order to use deb packages in the build you have to follow these steps.
#