-
Notifications
You must be signed in to change notification settings - Fork 16
/
BUILD.ndk_root.tpl
58 lines (50 loc) · 1.61 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""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,
toolchain = "//{clang_directory}:cc_toolchain_%s" % target_system_name,
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
target_compatible_with = [
"@platforms//os:android",
CPU_CONSTRAINT[target_system_name],
],
) 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"],
)
# NOTE: New projects should use GameActivity instead.
# https://developer.android.com/games/agdk/game-activity
cc_library(
name = "native_app_glue",
srcs = glob([
"sources/android/native_app_glue/*.c",
# TODO(#32): Remove this hack
"ndk/sources/android/native_app_glue/*.c",
]),
hdrs = glob([
"sources/android/native_app_glue/*.h",
# TODO(#32): Remove this hack
"ndk/sources/android/native_app_glue/*.h",
]),
)
exports_files ([
"sources/android/native_app_glue/android_native_app_glue.h",
])