Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 1 | load("@org_frc971//tools/build_rules:select.bzl", "compiler_select") |
| 2 | |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 3 | common_copts = [ |
| 4 | "-DPLATFORM_LINUX", |
| 5 | "-DINTEL_NO_ITTNOTIFY_API", |
| 6 | "-Wno-cast-align", |
| 7 | "-Wno-cast-qual", |
| 8 | ] |
| 9 | |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 10 | cc_library( |
| 11 | name = "s3", |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 12 | srcs = glob(["generated/src/aws-cpp-sdk-s3/source/**/*.cpp"]), |
| 13 | hdrs = glob(["generated/src/aws-cpp-sdk-s3/include/**/*.h"]), |
| 14 | copts = common_copts, |
| 15 | includes = ["generated/src/aws-cpp-sdk-s3/include"], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 16 | target_compatible_with = ["@platforms//os:linux"], |
| 17 | visibility = ["//visibility:public"], |
| 18 | deps = [ |
| 19 | ":aws-c-auth", |
| 20 | ":core", |
| 21 | ], |
| 22 | ) |
| 23 | |
| 24 | genrule( |
| 25 | name = "gen_SDKConfig", |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 26 | outs = ["src/aws-cpp-sdk-core/include/aws/core/SDKConfig.h"], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 27 | cmd = "echo '#undef USE_AWS_MEMORY_MANAGEMENT' > $@", |
| 28 | target_compatible_with = ["@platforms//os:linux"], |
| 29 | ) |
| 30 | |
| 31 | cc_library( |
| 32 | name = "core", |
| 33 | srcs = glob( |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 34 | include = ["src/aws-cpp-sdk-core/source/**/*.cpp"], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 35 | exclude = [ |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 36 | "src/aws-cpp-sdk-core/source/utils/crypto/*/*.cpp", |
| 37 | "src/aws-cpp-sdk-core/source/platform/**/*.cpp", |
| 38 | "src/aws-cpp-sdk-core/source/platform/windows/**/*.cpp", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 39 | # net/*.cpp is for not-(linux or windows), so exclude everything in there. |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 40 | "src/aws-cpp-sdk-core/source/net/**/*.cpp", |
| 41 | "src/aws-cpp-sdk-core/source/http/windows/**/*.cpp", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 42 | ], |
| 43 | ) + glob([ |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 44 | "src/aws-cpp-sdk-core/source/utils/crypto/openssl/*.cpp", |
| 45 | "src/aws-cpp-sdk-core/source/utils/crypto/factory/*.cpp", |
| 46 | "src/aws-cpp-sdk-core/source/platform/linux-shared/**/*.cpp", |
| 47 | "src/aws-cpp-sdk-core/source/net/linux-shared/*.cpp", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 48 | ]) + [ |
| 49 | ":gen_SDKConfig", |
| 50 | ], |
| 51 | hdrs = glob( |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 52 | include = ["src/aws-cpp-sdk-core/include/**/*.h"], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 53 | exclude = [ |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 54 | "src/aws-cpp-sdk-core/include/aws/core/utils/crypto/*/*.h", |
| 55 | "src/aws-cpp-sdk-core/include/aws/core/http/windows/**/*.h", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 56 | ], |
| 57 | ) + glob([ |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 58 | "src/aws-cpp-sdk-core/include/aws/core/utils/crypto/openssl/*.h", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 59 | ]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 60 | copts = common_copts + [ |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 61 | "-DAWS_SDK_VERSION_MAJOR=10", |
| 62 | "-DAWS_SDK_VERSION_MINOR=34", |
| 63 | "-DAWS_SDK_VERSION_PATCH=\"\\\"BRT\"\\\"", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 64 | "-DENABLE_OPENSSL_ENCRYPTION", |
| 65 | "-DENABLE_CURL_CLIENT", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 66 | "-Wno-format-nonliteral", |
| 67 | ], |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 68 | includes = ["src/aws-cpp-sdk-core/include"], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 69 | target_compatible_with = ["@platforms//os:linux"], |
| 70 | visibility = ["//visibility:public"], |
| 71 | deps = [ |
| 72 | ":aws-c-auth", |
| 73 | ":aws-c-common", |
| 74 | ":aws-c-http", |
| 75 | ":crt", |
| 76 | "@boringssl//:crypto", |
| 77 | "@com_github_curl_curl//:curl", |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 78 | "@io_opentelemetry_cpp//api", |
| 79 | "@io_opentelemetry_cpp//exporters/ostream:ostream_metric_exporter", |
| 80 | "@io_opentelemetry_cpp//exporters/ostream:ostream_span_exporter", |
| 81 | "@io_opentelemetry_cpp//sdk:headers", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 82 | ], |
| 83 | ) |
| 84 | |
| 85 | genrule( |
| 86 | name = "gen_Config", |
| 87 | outs = ["crt/aws-crt-cpp/include/aws/crt/Config.h"], |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 88 | cmd = "; ".join([ |
| 89 | "echo '#define AWS_CRT_CPP_VERSION \"1.11.321\"' > $@", |
| 90 | "echo '#define AWS_CRT_CPP_VERSION_MAJOR 1' >> $@", |
| 91 | "echo '#define AWS_CRT_CPP_VERSION_MINOR 11' >> $@", |
| 92 | "echo '#define AWS_CRT_CPP_VERSION_PATCH 321' >> $@", |
| 93 | ]), |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 94 | target_compatible_with = ["@platforms//os:linux"], |
| 95 | ) |
| 96 | |
| 97 | cc_library( |
| 98 | name = "crt", |
| 99 | srcs = glob(["crt/aws-crt-cpp/source/**/*.cpp"]), |
| 100 | hdrs = glob(["crt/aws-crt-cpp/include/**/*.h"]) + [ |
| 101 | ":gen_Config", |
| 102 | ], |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 103 | copts = common_copts + [ |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 104 | "-Wno-sign-compare", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 105 | "-Wno-tautological-type-limit-compare", |
| 106 | "-Wno-missing-field-initializers", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 107 | ], |
| 108 | includes = ["crt/aws-crt-cpp/include"], |
| 109 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 110 | visibility = ["//visibility:public"], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 111 | deps = [ |
| 112 | ":aws-c-auth", |
| 113 | ":aws-c-common", |
| 114 | ":aws-c-event-stream", |
| 115 | ":aws-c-mqtt", |
| 116 | ":aws-c-s3", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 117 | ":aws-c-sdkutils", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 118 | ], |
| 119 | ) |
| 120 | |
| 121 | genrule( |
| 122 | name = "gen_config", |
| 123 | outs = ["crt/aws-crt-cpp/crt/aws-c-common/include/aws/common/config.h"], |
| 124 | cmd = "\n".join([ |
| 125 | "cat >$@ <<END", |
| 126 | "#define AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS 1", |
| 127 | "#define AWS_HAVE_GCC_INLINE_ASM 1", |
| 128 | "#undef AWS_HAVE_MSVC_MULX", |
| 129 | "#define AWS_HAVE_EXECINFO 1", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 130 | "#define AWS_AFFINITY_METHOD 0", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 131 | "END", |
| 132 | ]), |
| 133 | target_compatible_with = ["@platforms//os:linux"], |
| 134 | ) |
| 135 | |
| 136 | cc_library( |
| 137 | name = "aws-c-common", |
| 138 | srcs = glob([ |
| 139 | "crt/aws-crt-cpp/crt/aws-c-common/source/*.c", |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 140 | "crt/aws-crt-cpp/crt/aws-c-common/source/linux/*.c", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 141 | "crt/aws-crt-cpp/crt/aws-c-common/source/external/*.c", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 142 | "crt/aws-crt-cpp/crt/aws-c-common/source/posix/*.c", |
| 143 | ]) + [ |
| 144 | ":gen_config", |
| 145 | ] + select({ |
| 146 | # See the paths in crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt for the appropriate globs for each architecture. |
| 147 | "@//tools:cpu_k8": glob( |
| 148 | include = [ |
| 149 | "crt/aws-crt-cpp/crt/aws-c-common/source/arch/intel/*.c", |
| 150 | "crt/aws-crt-cpp/crt/aws-c-common/source/arch/intel/asm/*.c", |
| 151 | ], |
| 152 | exclude = [ |
| 153 | # We don't build with AVX, see crt/aws-crt-cpp/crt/aws-c-common/CMakeLists.txt for details of the macros that need to be set if this is enabled. |
| 154 | "crt/aws-crt-cpp/crt/aws-c-common/source/arch/intel/encoding_avx2.c", |
| 155 | ], |
| 156 | ), |
| 157 | "@//tools:cpu_arm64": glob([ |
| 158 | "crt/aws-crt-cpp/crt/aws-c-common/source/arch/arm/asm/*.c", |
| 159 | ]), |
| 160 | "@//tools:cpu_armv7": glob([ |
| 161 | "crt/aws-crt-cpp/crt/aws-c-common/source/arch/arm/asm/*.c", |
| 162 | ]), |
| 163 | "//conditions:default": [], |
| 164 | }), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 165 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-common/include/**/*.h"]) + ["crt/aws-crt-cpp/crt/aws-c-common/source/external/cJSON.h"], |
| 166 | copts = common_copts + [ |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 167 | "-Wno-sign-compare", |
| 168 | "-Wno-format-nonliteral", |
| 169 | ] + compiler_select({ |
| 170 | "clang": [], |
| 171 | "gcc": [ |
| 172 | "-Wno-old-style-declaration", |
| 173 | ], |
| 174 | }), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 175 | includes = [ |
| 176 | "crt/aws-crt-cpp/crt/aws-c-common/include", |
| 177 | "crt/aws-crt-cpp/crt/aws-c-common/source", |
| 178 | ], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 179 | target_compatible_with = ["@platforms//os:linux"], |
| 180 | textual_hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-common/include/**/*.inl"]), |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 181 | visibility = ["//visibility:public"], |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 182 | ) |
| 183 | |
| 184 | # -march=armv8-a+crc |
| 185 | cc_library( |
| 186 | name = "aws-c-event-stream", |
| 187 | srcs = glob(["crt/aws-crt-cpp/crt/aws-c-event-stream/source/*.c"]) + select({ |
| 188 | "@//tools:cpu_k8": glob(["crt/aws-crt-cpp/crt/aws-c-event-stream/source/intel/asm/*.c"]), |
| 189 | "@//tools:cpu_arm64": glob(["crt/aws-crt-cpp/crt/aws-c-event-stream/source/arm/*.c"]), |
| 190 | "@//tools:cpu_armv7": glob(["crt/aws-crt-cpp/crt/aws-c-event-stream/source/arm/*.c"]), |
| 191 | "//conditions:default": [], |
| 192 | }), |
| 193 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-event-stream/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 194 | copts = common_copts, |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 195 | includes = ["crt/aws-crt-cpp/crt/aws-c-event-stream/include"], |
| 196 | deps = [ |
| 197 | ":aws-c-common", |
| 198 | ":aws-c-io", |
| 199 | ":aws-checksums", |
| 200 | ], |
| 201 | ) |
| 202 | |
| 203 | cc_library( |
| 204 | name = "aws-checksums", |
| 205 | srcs = glob(["crt/aws-crt-cpp/crt/aws-checksums/source/*.c"]) + select({ |
| 206 | "@//tools:cpu_k8": glob(["crt/aws-crt-cpp/crt/aws-checksums/source/intel/asm/*.c"]), |
| 207 | "@//tools:cpu_arm64": glob(["crt/aws-crt-cpp/crt/aws-checksums/source/arm/*.c"]), |
| 208 | "@//tools:cpu_armv7": glob(["crt/aws-crt-cpp/crt/aws-checksums/source/arm/*.c"]), |
| 209 | "//conditions:default": [], |
| 210 | }), |
| 211 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-checksums/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 212 | copts = common_copts + [ |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 213 | "-Wno-implicit-function-declaration", |
| 214 | ], |
| 215 | includes = ["crt/aws-crt-cpp/crt/aws-checksums/include"], |
| 216 | target_compatible_with = ["@platforms//os:linux"], |
| 217 | deps = [ |
| 218 | ":aws-c-common", |
| 219 | ], |
| 220 | ) |
| 221 | |
| 222 | cc_library( |
| 223 | name = "aws-c-cal", |
| 224 | srcs = glob([ |
| 225 | "crt/aws-crt-cpp/crt/aws-c-cal/source/*.c", |
| 226 | "crt/aws-crt-cpp/crt/aws-c-cal/source/unix/*.c", |
| 227 | ]), |
| 228 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-cal/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 229 | copts = common_copts + [ |
| 230 | #"-DOPENSSL_IS_AWSLC", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 231 | "-Wno-incompatible-pointer-types", |
| 232 | "-Wno-unused-function", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 233 | "-Wno-unused-parameter", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 234 | ], |
| 235 | includes = ["crt/aws-crt-cpp/crt/aws-c-cal/include"], |
| 236 | target_compatible_with = ["@platforms//os:linux"], |
| 237 | deps = [ |
| 238 | ":aws-c-common", |
| 239 | "@boringssl//:crypto", |
| 240 | ], |
| 241 | ) |
| 242 | |
| 243 | cc_library( |
| 244 | name = "aws-c-s3", |
| 245 | srcs = glob(["crt/aws-crt-cpp/crt/aws-c-s3/source/**/*.c"]), |
| 246 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-s3/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 247 | copts = common_copts, |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 248 | includes = ["crt/aws-crt-cpp/crt/aws-c-s3/include"], |
| 249 | target_compatible_with = ["@platforms//os:linux"], |
| 250 | deps = [ |
| 251 | ":aws-c-auth", |
| 252 | ":aws-c-common", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 253 | ":aws-checksums", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 254 | ], |
| 255 | ) |
| 256 | |
| 257 | cc_library( |
| 258 | name = "aws-c-compression", |
| 259 | srcs = glob(["crt/aws-crt-cpp/crt/aws-c-compression/source/*.c"]), |
| 260 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-compression/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 261 | copts = common_copts, |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 262 | includes = ["crt/aws-crt-cpp/crt/aws-c-compression/include"], |
| 263 | target_compatible_with = ["@platforms//os:linux"], |
| 264 | deps = [ |
| 265 | ":aws-c-common", |
| 266 | ], |
| 267 | ) |
| 268 | |
| 269 | cc_library( |
| 270 | name = "aws-c-http", |
| 271 | srcs = glob(["crt/aws-crt-cpp/crt/aws-c-http/source/**/*.c"]), |
| 272 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-http/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 273 | copts = common_copts + [ |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 274 | "-Wno-unused-but-set-variable", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 275 | ], |
| 276 | includes = ["crt/aws-crt-cpp/crt/aws-c-http/include"], |
| 277 | target_compatible_with = ["@platforms//os:linux"], |
| 278 | textual_hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-http/include/**/*.def"]), |
| 279 | deps = [ |
| 280 | ":aws-c-common", |
| 281 | ":aws-c-compression", |
| 282 | ":aws-c-io", |
| 283 | ], |
| 284 | ) |
| 285 | |
| 286 | cc_library( |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 287 | name = "aws-c-sdkutils", |
| 288 | srcs = glob(["crt/aws-crt-cpp/crt/aws-c-sdkutils/source/**/*.c"]), |
| 289 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-sdkutils/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 290 | copts = common_copts, |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 291 | includes = ["crt/aws-crt-cpp/crt/aws-c-sdkutils/include"], |
| 292 | target_compatible_with = ["@platforms//os:linux"], |
| 293 | deps = [ |
| 294 | ":aws-c-common", |
| 295 | ], |
| 296 | ) |
| 297 | |
| 298 | cc_library( |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 299 | name = "aws-c-auth", |
| 300 | srcs = glob(["crt/aws-crt-cpp/crt/aws-c-auth/source/**/*.c"]), |
| 301 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-auth/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 302 | copts = common_copts, |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 303 | includes = ["crt/aws-crt-cpp/crt/aws-c-auth/include"], |
| 304 | target_compatible_with = ["@platforms//os:linux"], |
| 305 | deps = [ |
| 306 | ":aws-c-common", |
| 307 | ":aws-c-http", |
| 308 | ":aws-c-io", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 309 | ":aws-c-sdkutils", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 310 | ], |
| 311 | ) |
| 312 | |
| 313 | cc_library( |
| 314 | name = "aws-c-mqtt", |
| 315 | srcs = glob(["crt/aws-crt-cpp/crt/aws-c-mqtt/source/**/*.c"]), |
| 316 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-mqtt/include/**/*.h"]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 317 | copts = common_copts + [ |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 318 | "-DAWS_MQTT_WITH_WEBSOCKETS", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 319 | ], |
| 320 | includes = ["crt/aws-crt-cpp/crt/aws-c-mqtt/include"], |
| 321 | target_compatible_with = ["@platforms//os:linux"], |
| 322 | deps = [ |
| 323 | ":aws-c-common", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 324 | ":aws-c-http", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 325 | ":aws-c-io", |
| 326 | ], |
| 327 | ) |
| 328 | |
| 329 | cc_library( |
| 330 | name = "aws-c-io", |
| 331 | srcs = glob([ |
| 332 | "crt/aws-crt-cpp/crt/aws-c-io/source/*.c", |
| 333 | "crt/aws-crt-cpp/crt/aws-c-io/source/linux/*.c", |
| 334 | "crt/aws-crt-cpp/crt/aws-c-io/source/s2n/*.c", |
| 335 | "crt/aws-crt-cpp/crt/aws-c-io/source/posix/*.c", |
| 336 | ]), |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 337 | hdrs = glob(["crt/aws-crt-cpp/crt/aws-c-io/include/**/*.h"]) + [ |
| 338 | "crt/aws-crt-cpp/crt/aws-c-io/source/pkcs11_private.h", |
| 339 | ] + glob([ |
| 340 | "crt/aws-crt-cpp/crt/aws-c-io/source/pkcs11/v2.40/*.h", |
| 341 | ]), |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 342 | copts = common_copts + [ |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 343 | "-DUSE_S2N", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 344 | "-DAWS_USE_EPOLL", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 345 | "-Wno-sign-compare", |
| 346 | "-Wno-unused-parameter", |
| 347 | ], |
| 348 | includes = ["crt/aws-crt-cpp/crt/aws-c-io/include"], |
| 349 | target_compatible_with = ["@platforms//os:linux"], |
| 350 | deps = [ |
| 351 | ":aws-c-cal", |
| 352 | ":aws-c-common", |
| 353 | ":s2n", |
| 354 | ], |
| 355 | ) |
| 356 | |
| 357 | cc_library( |
| 358 | name = "s2n", |
| 359 | srcs = glob([ |
| 360 | "crt/aws-crt-cpp/crt/s2n/**/*.h", |
| 361 | "crt/aws-crt-cpp/crt/s2n/tls/**/*.c", |
| 362 | "crt/aws-crt-cpp/crt/s2n/error/**/*.c", |
| 363 | "crt/aws-crt-cpp/crt/s2n/utils/**/*.c", |
| 364 | "crt/aws-crt-cpp/crt/s2n/stuffer/**/*.c", |
| 365 | "crt/aws-crt-cpp/crt/s2n/crypto/**/*.c", |
James Kuszmaul | b0931ac | 2023-01-24 14:23:13 -0800 | [diff] [blame] | 366 | "crt/aws-crt-cpp/crt/s2n/pq-crypto/*.c", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 367 | ]), |
| 368 | hdrs = ["crt/aws-crt-cpp/crt/s2n/api/s2n.h"], |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 369 | copts = common_copts + [ |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 370 | "-Iexternal/aws_sdk/crt/aws-crt-cpp/crt/s2n", |
| 371 | "-DS2N_NO_PQ", |
| 372 | "-Wno-unknown-pragmas", |
Austin Schuh | 8611071 | 2022-09-16 15:40:54 -0700 | [diff] [blame] | 373 | "-Wno-unused-parameter", |
| 374 | "-Wno-sign-compare", |
| 375 | ], |
| 376 | includes = ["crt/aws-crt-cpp/crt/s2n/api"], |
| 377 | target_compatible_with = ["@platforms//os:linux"], |
| 378 | deps = [ |
| 379 | "@boringssl//:crypto", |
| 380 | ], |
| 381 | ) |