• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2023 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15
16package {
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20cc_library_headers {
21    name: "libberberis_kernel_api_headers",
22    defaults: ["berberis_defaults"],
23    host_supported: true,
24    export_include_dirs: ["include"],
25}
26
27cc_library_static {
28    name: "libberberis_kernel_api_common",
29    defaults: [
30        "berberis_defaults",
31    ],
32    host_supported: true,
33    srcs: [
34        "exec_emulation.cc",
35        "fcntl_emulation.cc",
36        "main_executable_real_path_emulation.cc",
37        "open_emulation.cc",
38        "sys_prctl_emulation.cc",
39        "sys_ptrace_emulation.cc",
40        "unistd_emulation.cc",
41    ],
42    header_libs: [
43        "libberberis_base_headers",
44        "libberberis_kernel_api_headers",
45    ],
46    export_header_lib_headers: ["libberberis_kernel_api_headers"],
47}
48
49cc_library_static {
50    name: "libberberis_kernel_api_riscv64",
51    defaults: [
52        "berberis_defaults_64",
53    ],
54    host_supported: true,
55    whole_static_libs: [
56        "libberberis_kernel_api_common",
57    ],
58    srcs: [
59        "riscv64/epoll_emulation.cc",
60        "riscv64/open_emulation.cc",
61        "riscv64/syscall_emulation_arch.cc",
62        "riscv64/syscall_emulation.cc",
63        "riscv64/syscall_numbers.cc",
64        "riscv64/tracing.cc",
65        "runtime_bridge_stubs.cc",
66    ],
67    local_include_dirs: ["riscv64"],
68    header_libs: [
69        "libberberis_base_headers",
70        "libberberis_guest_state_headers",
71        "libberberis_kernel_api_headers",
72    ],
73    export_header_lib_headers: ["libberberis_kernel_api_headers"],
74}
75