Skip to content

Commit

Permalink
Update Bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
toor1245 committed Sep 14, 2023
1 parent e454ffe commit 5459790
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

load("@bazel_skylib//lib:selects.bzl", "selects")
load("//:bazel/platforms.bzl", "PLATFORM_CPU_ARM", "PLATFORM_CPU_ARM64", "PLATFORM_CPU_MIPS", "PLATFORM_CPU_PPC", "PLATFORM_CPU_RISCV32", "PLATFORM_CPU_RISCV64", "PLATFORM_CPU_X86_64")
load("//:bazel/platforms.bzl", "PLATFORM_OS_MACOS")
load("//:bazel/platforms.bzl", "PLATFORM_OS_MACOS", "PLATFORM_OS_LINUX", "PLATFORM_OS_FREEBSD", "PLATFORM_OS_ANDROID")

package(
default_visibility = ["//visibility:public"],
Expand Down Expand Up @@ -177,7 +177,10 @@ cc_library(
copts = C99_FLAGS,
defines = selects.with_or({
PLATFORM_OS_MACOS: ["HAVE_DLFCN_H"],
"//conditions:default": ["HAVE_STRONG_GETAUXVAL", "HAVE_STRONG_ELF_AUX_INFO"],
PLATFORM_OS_FREEBSD: ["HAVE_STRONG_ELF_AUX_INFO"],
PLATFORM_OS_LINUX: ["HAVE_STRONG_GETAUXVAL"],
PLATFORM_OS_ANDROID: ["HAVE_STRONG_GETAUXVAL"],
"//conditions:default": [],
}),
includes = INCLUDES,
textual_hdrs = ["include/internal/hwcaps.h"],
Expand Down
6 changes: 6 additions & 0 deletions bazel/platforms.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ PLATFORM_CPU_RISCV64 = ("@platforms//cpu:riscv64")


PLATFORM_OS_MACOS = ("@platforms//os:macos")

PLATFORM_OS_LINUX = ("@platforms//os:linux")

PLATFORM_OS_ANDROID = ("@platforms//os:android")

PLATFORM_OS_FREEBSD = ("@platforms//os:freebsd")

0 comments on commit 5459790

Please sign in to comment.