blob: cdd776480c5f5b5c50775506926dd61681cff5a4 [file] [log] [blame]
Jooyung Han1f65e772019-03-07 16:55:04 +09001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// libandroid_runtime_lazy is a shim library.
18// This provides very limited small set of APIs from libandroid_runtime.
19//
20// By depending on this instead of libandroid_runtime,
21// a library can be loaded without paying the cost of libandroid_runtime
22// which is quite huge. The cost will be paid when libandroid_runtime is actually used.
23//
24// For Partial-source PDK build, there is a constraint that
25// frameworks/native modules should not depend on frameworks/base.
26// This library can be used to cut down the dependency between them.
27// (e.g. libbinder_ndk)
28//
29// Some libraries which serve as LL-NDK and NDK as well may depend on this
30// instead of libandroid_runtime. When they are used by a vendor process,
31// depending on libandroid_runtime is meaningless. In this case,
32// they can depend on libandroid_runtime_lazy.
33cc_library {
34 name: "libandroid_runtime_lazy",
35 vendor_available: true,
Jooyung Han278e05b2019-03-27 11:50:49 +090036 double_loadable: true,
Steven Morelande8a434d2019-09-20 18:42:35 +000037 host_supported: true,
Yifan Hongf856a982020-10-30 14:51:17 -070038 target: {
39 darwin: {
40 enabled: false,
41 }
42 },
Jooyung Han1f65e772019-03-07 16:55:04 +090043
44 cflags: [
45 "-Wall",
46 "-Werror",
47 "-Wunused",
48 "-Wunreachable-code",
49 ],
50
51 srcs: [
52 "android_runtime_lazy.cpp",
53 ],
54
55 shared_libs: [
56 "liblog",
Steven Moreland51947322019-07-12 22:54:03 +000057 "libutils",
Jooyung Han1f65e772019-03-07 16:55:04 +090058 ],
59
Jooyung Han1f65e772019-03-07 16:55:04 +090060 export_include_dirs: [
61 "include",
62 ],
63
64 header_libs: [
65 "jni_headers",
66 "libbinder_headers",
67 ],
68}