forked from bazelbuild/rules_android_ndk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.ndk_root.tpl
38 lines (32 loc) · 1.06 KB
/
BUILD.ndk_root.tpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Top-level aliases."""
package(default_visibility = ["//visibility:public"])
load("//:target_systems.bzl", "CPU_CONSTRAINT", "TARGET_SYSTEM_NAMES")
exports_files(["target_systems.bzl"])
alias(
name = "toolchain",
actual = "//{clang_directory}:cc_toolchain_suite",
)
# Loop over TARGET_SYSTEM_NAMES and define all toolchain targets.
[toolchain(
name = "toolchain_%s" % target_system_name,
target_compatible_with = [
"@platforms//os:android",
CPU_CONSTRAINT[target_system_name],
],
toolchain = "//{clang_directory}:cc_toolchain_%s" % target_system_name,
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
) for target_system_name in TARGET_SYSTEM_NAMES]
cc_library(
name = "cpufeatures",
srcs = glob([
"sources/android/cpufeatures/*.c",
# TODO(#32): Remove this hack
"ndk/sources/android/cpufeatures/*.c",
]),
hdrs = glob([
"sources/android/cpufeatures/*.h",
# TODO(#32): Remove this hack
"ndk/sources/android/cpufeatures/*.h",
]),
linkopts = ["-ldl"],
)