blob: d5f8e70a7481f71d440c171b4e3d363a84098640 [file] [log] [blame]
Dan Willemsen208ae172015-09-16 16:33:27 -07001//
2// libdl
3//
dimitryc5ea3eb2017-10-05 17:23:10 +02004cc_library_static {
5 name: "libdl_static",
Jiyong Park5603c6e2018-04-27 21:53:11 +09006 recovery_available: true,
dimitryc5ea3eb2017-10-05 17:23:10 +02007
Elliott Hughesd50a1de2018-02-05 17:30:57 -08008 srcs: [
9 "libdl.cpp",
10 "libdl_cfi.cpp",
11 ],
dimitryc5ea3eb2017-10-05 17:23:10 +020012
13 cflags: [
14 "-Wall",
15 "-Wextra",
16 "-Wunused",
17 "-Werror",
18 ],
19
20 // For private/CFIShadow.h.
21 include_dirs: ["bionic/libc"],
22
23 stl: "none",
24
25 sanitize: {
26 never: true,
27 },
28}
29
Dan Willemsen208ae172015-09-16 16:33:27 -070030cc_library {
Dan Willemsen7ec52b12016-11-28 17:02:25 -080031 name: "libdl",
Jiyong Park5603c6e2018-04-27 21:53:11 +090032 recovery_available: true,
Dan Albert40f15ec2017-10-27 11:21:20 -070033 static_ndk_lib: true,
Dan Willemsen7ec52b12016-11-28 17:02:25 -080034
35 defaults: ["linux_bionic_supported"],
Dan Willemsen208ae172015-09-16 16:33:27 -070036
37 // NOTE: --exclude-libs=libgcc.a makes sure that any symbols libdl.so pulls from
38 // libgcc.a are made static to libdl.so. This in turn ensures that libraries that
39 // a) pull symbols from libgcc.a and b) depend on libdl.so will not rely on libdl.so
40 // to provide those symbols, but will instead pull them from libgcc.a. Specifically,
41 // we use this property to make sure libc.so has its own copy of the code from
42 // libgcc.a it uses.
43 //
44 // DO NOT REMOVE --exclude-libs!
45
46 ldflags: ["-Wl,--exclude-libs=libgcc.a"],
Dan Willemsen208ae172015-09-16 16:33:27 -070047
48 // for x86, exclude libgcc_eh.a for the same reasons as above
49 arch: {
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080050 arm: {
51 version_script: "libdl.arm.map",
Chih-Hung Hsiehecbff832018-05-23 18:45:53 -070052 pack_relocations: false,
Ian Pedowitzb6310c22018-01-18 16:26:19 -080053 ldflags: ["-Wl,--hash-style=both"],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080054 },
55 arm64: {
56 version_script: "libdl.arm64.map",
57 },
58 mips: {
59 version_script: "libdl.mips.map",
60 },
61 mips64: {
62 version_script: "libdl.mips64.map",
63 },
Dan Willemsen208ae172015-09-16 16:33:27 -070064 x86: {
Chih-Hung Hsiehecbff832018-05-23 18:45:53 -070065 pack_relocations: false,
Dimitry Ivanovac4bd2f2016-11-21 12:50:38 -080066 ldflags: [
67 "-Wl,--exclude-libs=libgcc_eh.a",
Ian Pedowitzb6310c22018-01-18 16:26:19 -080068 "-Wl,--hash-style=both",
Dimitry Ivanovac4bd2f2016-11-21 12:50:38 -080069 ],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080070 version_script: "libdl.x86.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070071 },
72 x86_64: {
73 ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080074 version_script: "libdl.x86_64.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070075 },
76 },
dimitrydc7cc622017-08-30 10:52:19 +020077 shared: {
dimitryc5ea3eb2017-10-05 17:23:10 +020078 whole_static_libs: ["libdl_static"],
dimitrydc7cc622017-08-30 10:52:19 +020079 },
80 static: {
Elliott Hughes46a943c2018-04-03 15:56:35 -070081 srcs: ["libdl_static.cpp"],
dimitrydc7cc622017-08-30 10:52:19 +020082 },
Dan Willemsen208ae172015-09-16 16:33:27 -070083 cflags: [
84 "-Wall",
85 "-Wextra",
86 "-Wunused",
87 "-Werror",
88 ],
89 stl: "none",
90
Ryan Prichard470b6662018-03-27 22:10:55 -070091 nocrt: true,
Dan Willemsen208ae172015-09-16 16:33:27 -070092 system_shared_libs: [],
93
Dimitry Ivanovd9e427c2016-11-22 16:55:25 -080094 // This is placeholder library the actual implementation is (currently)
95 // provided by the linker.
Elliott Hughesd50a1de2018-02-05 17:30:57 -080096 shared_libs: ["ld-android"],
Dimitry Ivanovd9e427c2016-11-22 16:55:25 -080097
98 sanitize: {
99 never: true,
100 },
101}
102
Dan Alberte8a91082016-08-04 13:45:44 -0700103ndk_library {
Dan Willemsen993b0832017-04-07 14:09:18 -0700104 name: "libdl",
Dan Alberte8a91082016-08-04 13:45:44 -0700105 symbol_file: "libdl.map.txt",
106 first_version: "9",
107}
Dan Willemsenb93d3c22017-03-20 14:07:47 -0700108
109llndk_library {
Dan Willemsen993b0832017-04-07 14:09:18 -0700110 name: "libdl",
Dan Willemsenb93d3c22017-03-20 14:07:47 -0700111 symbol_file: "libdl.map.txt",
112}