Skip to content

Commit

Permalink
Fix build on Mac M1.
Browse files Browse the repository at this point in the history
Fixes #29.

PiperOrigin-RevId: 605422573
  • Loading branch information
QrczakMK committed Feb 8, 2024
1 parent 631fa2a commit 7cbd871
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions third_party/highwayhash.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ config_setting(
values = {"cpu": "aarch64"},
)

config_setting(
name = "cpu_darwin_arm64",
values = {"cpu": "darwin_arm64"},
)

#-----------------------------------------------------------------------------
# Platform-specific

Expand Down Expand Up @@ -198,6 +203,7 @@ cc_library(
hdrs = ["highwayhash/highwayhash_target.h"],
copts = select({
":cpu_aarch64": [],
":cpu_darwin_arm64": [],
"//conditions:default": ["-DHH_DISABLE_TARGET_SPECIFIC"],
}),
textual_hdrs = [
Expand Down Expand Up @@ -264,6 +270,7 @@ cc_library(
] + select({
":cpu_ppc": [":hh_vsx"],
":cpu_aarch64": [":hh_neon"],
":cpu_darwin_arm64": [":hh_neon"],
"//conditions:default": [
":hh_avx2",
":hh_sse41",
Expand All @@ -283,6 +290,7 @@ cc_library(
":hh_types",
] + select({
":cpu_aarch64": [":hh_neon"],
":cpu_darwin_arm64": [":hh_neon"],
"//conditions:default": [
":hh_avx2",
":hh_sse41",
Expand Down

0 comments on commit 7cbd871

Please sign in to comment.