Add Emscripten (WASM) support to cpuinfo

PiperOrigin-RevId: 366494814
Change-Id: Ic3e9dcc5b39ac8e0d9d0bd5e4b6c918835a6f5f6
This commit is contained in:
Dmitry Kovalev 2021-04-02 12:44:02 -07:00 committed by TensorFlower Gardener
parent 69e7125988
commit d993cf4d99

View File

@ -93,6 +93,10 @@ MACH_ARM_SRCS = [
"src/arm/mach/init.c", "src/arm/mach/init.c",
] ]
EMSCRIPTEN_SRCS = [
"src/emscripten/init.c",
]
cc_library( cc_library(
name = "cpuinfo_impl", name = "cpuinfo_impl",
srcs = select({ srcs = select({
@ -123,6 +127,7 @@ cc_library(
":watchos_arm64_32": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, ":watchos_arm64_32": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
":tvos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, ":tvos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS,
":tvos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, ":tvos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS,
":emscripten_wasm": COMMON_SRCS + EMSCRIPTEN_SRCS,
}), }),
copts = select({ copts = select({
":windows_x86_64": [], ":windows_x86_64": [],