mirror of
https://github.com/google/cpu_features.git
synced 2025-04-27 23:22:31 +02:00
Merge pull request #379 from google/fix_windows_platform
[bazel] Use a macro instead of @platforms//os:windows
This commit is contained in:
commit
4f45bf2669
@ -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", "PLATFORM_OS_LINUX", "PLATFORM_OS_FREEBSD", "PLATFORM_OS_OPENBSD", "PLATFORM_OS_ANDROID")
|
||||
load("//:bazel/platforms.bzl", "PLATFORM_OS_MACOS", "PLATFORM_OS_LINUX", "PLATFORM_OS_FREEBSD", "PLATFORM_OS_OPENBSD", "PLATFORM_OS_ANDROID", "PLATFORM_OS_WINDOWS")
|
||||
|
||||
package(
|
||||
default_visibility = ["//visibility:public"],
|
||||
@ -14,7 +14,7 @@ exports_files(["LICENSE"])
|
||||
INCLUDES = ["include"]
|
||||
|
||||
C99_FLAGS = select({
|
||||
"@platforms//os:windows": [],
|
||||
PLATFORM_OS_WINDOWS: [],
|
||||
"//conditions:default": [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
@ -394,7 +394,7 @@ cc_library(
|
||||
copts = C99_FLAGS,
|
||||
includes = INCLUDES + ["ndk_compat"],
|
||||
target_compatible_with = select({
|
||||
"@platforms//os:windows": ["@platforms//:incompatible"],
|
||||
PLATFORM_OS_WINDOWS: ["@platforms//:incompatible"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
textual_hdrs = ["ndk_compat/cpu-features.h"],
|
||||
|
@ -24,3 +24,5 @@ PLATFORM_OS_ANDROID = ("@platforms//os:android")
|
||||
PLATFORM_OS_FREEBSD = ("@platforms//os:freebsd")
|
||||
|
||||
PLATFORM_OS_OPENBSD = ("@platforms//os:openbsd")
|
||||
|
||||
PLATFORM_OS_WINDOWS = ("@platforms//os:windows")
|
||||
|
Loading…
x
Reference in New Issue
Block a user