blob: d12a7dba00bf86584b88682fb3e224a6ca7e9614 [file] [log] [blame]
diff --git a/BUILD b/BUILD
index cba9ccb1d..37fab16a7 100644
--- a/BUILD
+++ b/BUILD
@@ -16,6 +16,7 @@ licenses(["notice"])
exports_files(["LICENSE"])
+load("@//tools/build_rules:select.bzl", "compiler_select")
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
load(
@@ -25,6 +26,8 @@ load(
"crypto_sources",
"crypto_sources_linux_x86_64",
"crypto_sources_linux_ppc64le",
+ "crypto_sources_linux_aarch64",
+ "crypto_sources_linux_arm",
"crypto_sources_mac_x86_64",
"fips_fragments",
"ssl_headers",
@@ -36,7 +39,17 @@ load(
config_setting(
name = "linux_x86_64",
- values = {"cpu": "k8"},
+ constraint_values = ["@platforms//cpu:x86_64"],
+)
+
+config_setting(
+ name = "linux_aarch64",
+ constraint_values = ["@platforms//cpu:aarch64"],
+)
+
+config_setting(
+ name = "linux_arm",
+ constraint_values = ["@platforms//cpu:armv7"],
)
config_setting(
@@ -76,6 +89,10 @@ posix_copts = [
"-Wwrite-strings",
"-Wshadow",
"-fno-common",
+ "-Wno-cast-qual",
+ "-Wno-cast-align",
+ "-Wno-unused-parameter",
+ "-Wno-cast-function-type",
# Modern build environments should be able to set this to use atomic
# operations for reference counting rather than locks. However, it's
@@ -86,17 +103,26 @@ posix_copts = [
boringssl_copts = select({
":linux_x86_64": posix_copts,
":linux_ppc64le": posix_copts,
+ ":linux_arm": posix_copts,
+ ":linux_aarch64": posix_copts,
":mac_x86_64": posix_copts,
":windows_x86_64": [
"-DWIN32_LEAN_AND_MEAN",
"-DOPENSSL_NO_ASM",
],
"//conditions:default": ["-DOPENSSL_NO_ASM"],
+}) + compiler_select({
+ "clang": [],
+ "gcc": [
+ "-Wno-array-parameter",
+ ],
})
crypto_sources_asm = select({
":linux_x86_64": crypto_sources_linux_x86_64,
":linux_ppc64le": crypto_sources_linux_ppc64le,
+ ":linux_arm": crypto_sources_linux_arm,
+ ":linux_aarch64": crypto_sources_linux_aarch64,
":mac_x86_64": crypto_sources_mac_x86_64,
"//conditions:default": [],
})
@@ -112,6 +138,8 @@ posix_copts_c11 = [
boringssl_copts_c11 = boringssl_copts + select({
":linux_x86_64": posix_copts_c11,
":linux_ppc64le": posix_copts_c11,
+ ":linux_arm": posix_copts_c11,
+ ":linux_aarch64": posix_copts_c11,
":mac_x86_64": posix_copts_c11,
"//conditions:default": [],
})
@@ -125,6 +153,8 @@ posix_copts_cxx = [
boringssl_copts_cxx = boringssl_copts + select({
":linux_x86_64": posix_copts_cxx,
":linux_ppc64le": posix_copts_cxx,
+ ":linux_arm": posix_copts_cxx,
+ ":linux_aarch64": posix_copts_cxx,
":mac_x86_64": posix_copts_cxx,
"//conditions:default": [],
})