blob: 87db4b1c7111c898cf43faf3abf2b085120b0343 [file] [log] [blame]
Dan Willemsen208ae172015-09-16 16:33:27 -07001//
2// libdl
3//
Bob Badouraa7d8352021-02-19 13:06:22 -08004package {
5 default_applicable_licenses: ["bionic_libdl_license"],
6}
7
8license {
9 name: "bionic_libdl_license",
10 visibility: [":__subpackages__"],
11 license_kinds: [
12 "SPDX-license-identifier-Apache-2.0",
13 ],
14 license_text: [
15 "NOTICE",
16 ],
17}
18
dimitryc5ea3eb2017-10-05 17:23:10 +020019cc_library_static {
20 name: "libdl_static",
Dan Willemsen17b35592018-10-11 23:32:26 -070021 defaults: ["linux_bionic_supported"],
Yifan Hong5a39cee2020-01-21 16:43:56 -080022 ramdisk_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -070023 vendor_ramdisk_available: true,
Jiyong Park5603c6e2018-04-27 21:53:11 +090024 recovery_available: true,
dimitry7f048802019-05-03 15:57:34 +020025 native_bridge_supported: true,
dimitryc5ea3eb2017-10-05 17:23:10 +020026
Elliott Hughesd50a1de2018-02-05 17:30:57 -080027 srcs: [
28 "libdl.cpp",
29 "libdl_cfi.cpp",
30 ],
dimitryc5ea3eb2017-10-05 17:23:10 +020031
32 cflags: [
33 "-Wall",
34 "-Wextra",
35 "-Wunused",
36 "-Werror",
37 ],
38
39 // For private/CFIShadow.h.
40 include_dirs: ["bionic/libc"],
41
42 stl: "none",
Dan Willemsen6b3be172018-12-03 13:57:20 -080043 system_shared_libs: [],
Martin Stjernholm82d84bc2020-04-06 20:32:09 +010044 header_libs: ["libc_headers"],
Martin Stjernholm3ddcc1e2020-05-06 23:44:08 +010045 export_header_lib_headers: ["libc_headers"],
dimitryc5ea3eb2017-10-05 17:23:10 +020046
47 sanitize: {
48 never: true,
49 },
Spandan Das0a6cfe92024-01-04 18:06:50 +000050 apex_available: [
51 "com.android.runtime",
52 ],
dimitryc5ea3eb2017-10-05 17:23:10 +020053}
54
Dan Willemsen208ae172015-09-16 16:33:27 -070055cc_library {
Dan Willemsen7ec52b12016-11-28 17:02:25 -080056 name: "libdl",
Yifan Hong5a39cee2020-01-21 16:43:56 -080057 ramdisk_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -070058 vendor_ramdisk_available: true,
Jiyong Park5603c6e2018-04-27 21:53:11 +090059 recovery_available: true,
dimitry7f048802019-05-03 15:57:34 +020060 native_bridge_supported: true,
Dan Albert40f15ec2017-10-27 11:21:20 -070061 static_ndk_lib: true,
Dan Willemsen7ec52b12016-11-28 17:02:25 -080062
Elliott Hughes1c2ba6a2024-06-18 18:15:19 +000063 defaults: [
64 "linux_bionic_supported",
65 "bug_24465209_workaround",
66 ],
Dan Willemsen208ae172015-09-16 16:33:27 -070067
Dan Willemsen208ae172015-09-16 16:33:27 -070068 arch: {
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080069 arm: {
Elliott Hughesd19b3c52018-09-06 16:04:08 -070070 version_script: ":libdl.arm.map",
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080071 },
72 arm64: {
Elliott Hughesd19b3c52018-09-06 16:04:08 -070073 version_script: ":libdl.arm64.map",
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080074 },
Elliott Hughesed70c172022-10-11 19:01:30 +000075 riscv64: {
76 version_script: ":libdl.riscv64.map",
77 },
Dan Willemsen208ae172015-09-16 16:33:27 -070078 x86: {
Elliott Hughesd19b3c52018-09-06 16:04:08 -070079 version_script: ":libdl.x86.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070080 },
81 x86_64: {
Elliott Hughesd19b3c52018-09-06 16:04:08 -070082 version_script: ":libdl.x86_64.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070083 },
84 },
dimitrydc7cc622017-08-30 10:52:19 +020085 shared: {
dimitryc5ea3eb2017-10-05 17:23:10 +020086 whole_static_libs: ["libdl_static"],
dimitrydc7cc622017-08-30 10:52:19 +020087 },
88 static: {
Elliott Hughes46a943c2018-04-03 15:56:35 -070089 srcs: ["libdl_static.cpp"],
dimitrydc7cc622017-08-30 10:52:19 +020090 },
Dan Willemsen208ae172015-09-16 16:33:27 -070091 cflags: [
92 "-Wall",
93 "-Wextra",
94 "-Wunused",
95 "-Werror",
96 ],
97 stl: "none",
98
Ryan Prichard470b6662018-03-27 22:10:55 -070099 nocrt: true,
Dan Willemsen208ae172015-09-16 16:33:27 -0700100 system_shared_libs: [],
Martin Stjernholm82d84bc2020-04-06 20:32:09 +0100101 header_libs: ["libc_headers"],
Pirama Arumuga Nainareeb2ee62019-02-15 11:40:40 -0800102
103 // Opt out of native_coverage when opting out of system_shared_libs
Pirama Arumuga Nainar852d5232018-12-20 13:52:19 -0800104 native_coverage: false,
Dan Willemsen208ae172015-09-16 16:33:27 -0700105
Dimitry Ivanovd9e427c2016-11-22 16:55:25 -0800106 // This is placeholder library the actual implementation is (currently)
107 // provided by the linker.
Elliott Hughesd50a1de2018-02-05 17:30:57 -0800108 shared_libs: ["ld-android"],
Dimitry Ivanovd9e427c2016-11-22 16:55:25 -0800109
110 sanitize: {
111 never: true,
112 },
Jiyong Parkc45fe9f2018-12-13 18:26:48 +0900113
114 stubs: {
115 symbol_file: "libdl.map.txt",
Jooyung Han26ddc4d2020-02-27 18:33:25 +0900116 versions: [
117 "29",
Dan Albert48943b22020-07-27 13:28:56 -0700118 "current",
Jooyung Han26ddc4d2020-02-27 18:33:25 +0900119 ],
Jiyong Parkc45fe9f2018-12-13 18:26:48 +0900120 },
Colin Crossa0a4a6c2021-03-02 10:23:04 -0800121 llndk: {
122 symbol_file: "libdl.map.txt",
123 },
Jiyong Parke87e0dc2019-10-02 17:09:33 +0900124
125 apex_available: [
Jiyong Parke87e0dc2019-10-02 17:09:33 +0900126 "com.android.runtime",
127 ],
Dimitry Ivanovd9e427c2016-11-22 16:55:25 -0800128}
129
dimitry8868d9e2019-03-19 13:01:42 +0100130cc_library {
131 name: "libdl_android",
132
133 defaults: ["linux_bionic_supported"],
Yifan Hong5a39cee2020-01-21 16:43:56 -0800134 ramdisk_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -0700135 vendor_ramdisk_available: true,
Jiyong Park3ff116a2019-04-02 23:04:52 +0900136 recovery_available: true,
dimitry7f048802019-05-03 15:57:34 +0200137 native_bridge_supported: true,
dimitry8868d9e2019-03-19 13:01:42 +0100138
Elliott Hughes1eacc0e2024-01-19 19:05:36 +0000139 srcs: ["libdl_android.cpp"],
dimitry8868d9e2019-03-19 13:01:42 +0100140 version_script: "libdl_android.map.txt",
141
142 cflags: [
143 "-Wall",
144 "-Wextra",
145 "-Wunused",
146 "-Werror",
147 ],
148
149 stl: "none",
150
151 nocrt: true,
152 system_shared_libs: [],
Martin Stjernholm82d84bc2020-04-06 20:32:09 +0100153 header_libs: ["libc_headers"],
dimitry8868d9e2019-03-19 13:01:42 +0100154
155 // Opt out of native_coverage when opting out of system_shared_libs
156 native_coverage: false,
157
158 // This is placeholder library the actual implementation is (currently)
159 // provided by the linker.
160 shared_libs: ["ld-android"],
161
162 sanitize: {
163 never: true,
164 },
165
166 stubs: {
167 symbol_file: "libdl_android.map.txt",
Dan Albert48943b22020-07-27 13:28:56 -0700168 versions: ["current"],
dimitry8868d9e2019-03-19 13:01:42 +0100169 },
Martin Stjernholm3274cc42019-11-11 15:33:22 +0000170
171 apex_available: [
Martin Stjernholm3274cc42019-11-11 15:33:22 +0000172 "com.android.runtime",
173 ],
dimitry8868d9e2019-03-19 13:01:42 +0100174}
175
Dan Alberte8a91082016-08-04 13:45:44 -0700176ndk_library {
Dan Willemsen993b0832017-04-07 14:09:18 -0700177 name: "libdl",
Dan Alberte8a91082016-08-04 13:45:44 -0700178 symbol_file: "libdl.map.txt",
179 first_version: "9",
180}
Dan Willemsenb93d3c22017-03-20 14:07:47 -0700181
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700182genrule {
183 name: "libdl.arm.map",
Cole Faustf5968d82023-04-11 15:20:19 -0700184 out: ["libdl.arm.map.txt"],
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700185 srcs: ["libdl.map.txt"],
Elliott Hughes291f98a2022-06-30 23:35:11 +0000186 tools: ["generate-version-script"],
187 cmd: "$(location generate-version-script) arm $(in) $(out)",
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700188}
189
190genrule {
191 name: "libdl.arm64.map",
Cole Faustf5968d82023-04-11 15:20:19 -0700192 out: ["libdl.arm64.map.txt"],
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700193 srcs: ["libdl.map.txt"],
Elliott Hughes291f98a2022-06-30 23:35:11 +0000194 tools: ["generate-version-script"],
195 cmd: "$(location generate-version-script) arm64 $(in) $(out)",
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700196}
197
198genrule {
Elliott Hughesed70c172022-10-11 19:01:30 +0000199 name: "libdl.riscv64.map",
Cole Faustf5968d82023-04-11 15:20:19 -0700200 out: ["libdl.riscv64.map.txt"],
Elliott Hughesed70c172022-10-11 19:01:30 +0000201 srcs: ["libdl.map.txt"],
202 tools: ["generate-version-script"],
203 cmd: "$(location generate-version-script) riscv64 $(in) $(out)",
204}
205
206genrule {
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700207 name: "libdl.x86.map",
Cole Faustf5968d82023-04-11 15:20:19 -0700208 out: ["libdl.x86.map.txt"],
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700209 srcs: ["libdl.map.txt"],
Elliott Hughes291f98a2022-06-30 23:35:11 +0000210 tools: ["generate-version-script"],
211 cmd: "$(location generate-version-script) x86 $(in) $(out)",
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700212}
213
214genrule {
215 name: "libdl.x86_64.map",
Cole Faustf5968d82023-04-11 15:20:19 -0700216 out: ["libdl.x86_64.map.txt"],
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700217 srcs: ["libdl.map.txt"],
Elliott Hughes291f98a2022-06-30 23:35:11 +0000218 tools: ["generate-version-script"],
219 cmd: "$(location generate-version-script) x86_64 $(in) $(out)",
Elliott Hughesd19b3c52018-09-06 16:04:08 -0700220}