blob: 13c8714e6e90cb982dfa4b869cba8fb149a2d8f7 [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",
Dan Willemsen17b35592018-10-11 23:32:26 -07006 defaults: ["linux_bionic_supported"],
Jiyong Park5603c6e2018-04-27 21:53:11 +09007 recovery_available: true,
dimitryc5ea3eb2017-10-05 17:23:10 +02008
Elliott Hughesd50a1de2018-02-05 17:30:57 -08009 srcs: [
10 "libdl.cpp",
11 "libdl_cfi.cpp",
12 ],
dimitryc5ea3eb2017-10-05 17:23:10 +020013
14 cflags: [
15 "-Wall",
16 "-Wextra",
17 "-Wunused",
18 "-Werror",
19 ],
20
21 // For private/CFIShadow.h.
22 include_dirs: ["bionic/libc"],
23
24 stl: "none",
25
26 sanitize: {
27 never: true,
28 },
29}
30
Dan Willemsen208ae172015-09-16 16:33:27 -070031cc_library {
Dan Willemsen7ec52b12016-11-28 17:02:25 -080032 name: "libdl",
Jiyong Park5603c6e2018-04-27 21:53:11 +090033 recovery_available: true,
Dan Albert40f15ec2017-10-27 11:21:20 -070034 static_ndk_lib: true,
Dan Willemsen7ec52b12016-11-28 17:02:25 -080035
36 defaults: ["linux_bionic_supported"],
Dan Willemsen208ae172015-09-16 16:33:27 -070037
38 // NOTE: --exclude-libs=libgcc.a makes sure that any symbols libdl.so pulls from
39 // libgcc.a are made static to libdl.so. This in turn ensures that libraries that
40 // a) pull symbols from libgcc.a and b) depend on libdl.so will not rely on libdl.so
41 // to provide those symbols, but will instead pull them from libgcc.a. Specifically,
42 // we use this property to make sure libc.so has its own copy of the code from
43 // libgcc.a it uses.
44 //
45 // DO NOT REMOVE --exclude-libs!
46
Yi Kong7786a342018-08-31 19:01:56 -070047 ldflags: [
48 "-Wl,--exclude-libs=libgcc.a",
49 "-Wl,--exclude-libs=libclang_rt.builtins-arm-android.a",
50 "-Wl,--exclude-libs=libclang_rt.builtins-aarch64-android.a",
51 "-Wl,--exclude-libs=libclang_rt.builtins-x86-android.a",
52 "-Wl,--exclude-libs=libclang_rt.builtins-x86_64-android.a",
53 ],
Dan Willemsen208ae172015-09-16 16:33:27 -070054
55 // for x86, exclude libgcc_eh.a for the same reasons as above
56 arch: {
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080057 arm: {
58 version_script: "libdl.arm.map",
Chih-Hung Hsiehecbff832018-05-23 18:45:53 -070059 pack_relocations: false,
Ian Pedowitzb6310c22018-01-18 16:26:19 -080060 ldflags: ["-Wl,--hash-style=both"],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080061 },
62 arm64: {
63 version_script: "libdl.arm64.map",
64 },
65 mips: {
66 version_script: "libdl.mips.map",
67 },
68 mips64: {
69 version_script: "libdl.mips64.map",
70 },
Dan Willemsen208ae172015-09-16 16:33:27 -070071 x86: {
Chih-Hung Hsiehecbff832018-05-23 18:45:53 -070072 pack_relocations: false,
Dimitry Ivanovac4bd2f2016-11-21 12:50:38 -080073 ldflags: [
74 "-Wl,--exclude-libs=libgcc_eh.a",
Ian Pedowitzb6310c22018-01-18 16:26:19 -080075 "-Wl,--hash-style=both",
Dimitry Ivanovac4bd2f2016-11-21 12:50:38 -080076 ],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080077 version_script: "libdl.x86.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070078 },
79 x86_64: {
80 ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080081 version_script: "libdl.x86_64.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070082 },
83 },
dimitrydc7cc622017-08-30 10:52:19 +020084 shared: {
dimitryc5ea3eb2017-10-05 17:23:10 +020085 whole_static_libs: ["libdl_static"],
dimitrydc7cc622017-08-30 10:52:19 +020086 },
87 static: {
Elliott Hughes46a943c2018-04-03 15:56:35 -070088 srcs: ["libdl_static.cpp"],
dimitrydc7cc622017-08-30 10:52:19 +020089 },
Dan Willemsen208ae172015-09-16 16:33:27 -070090 cflags: [
91 "-Wall",
92 "-Wextra",
93 "-Wunused",
94 "-Werror",
95 ],
96 stl: "none",
97
Ryan Prichard470b6662018-03-27 22:10:55 -070098 nocrt: true,
Dan Willemsen208ae172015-09-16 16:33:27 -070099 system_shared_libs: [],
100
Dimitry Ivanovd9e427c2016-11-22 16:55:25 -0800101 // This is placeholder library the actual implementation is (currently)
102 // provided by the linker.
Elliott Hughesd50a1de2018-02-05 17:30:57 -0800103 shared_libs: ["ld-android"],
Dimitry Ivanovd9e427c2016-11-22 16:55:25 -0800104
105 sanitize: {
106 never: true,
107 },
108}
109
Dan Alberte8a91082016-08-04 13:45:44 -0700110ndk_library {
Dan Willemsen993b0832017-04-07 14:09:18 -0700111 name: "libdl",
Dan Alberte8a91082016-08-04 13:45:44 -0700112 symbol_file: "libdl.map.txt",
113 first_version: "9",
114}
Dan Willemsenb93d3c22017-03-20 14:07:47 -0700115
116llndk_library {
Dan Willemsen993b0832017-04-07 14:09:18 -0700117 name: "libdl",
Dan Willemsenb93d3c22017-03-20 14:07:47 -0700118 symbol_file: "libdl.map.txt",
119}