blob: 273a887f927df5d28a71be5a3f2113d31e9adc4e [file] [log] [blame]
Dan Willemsen208ae172015-09-16 16:33:27 -07001//
2// libdl
3//
4cc_library {
5
6 // NOTE: --exclude-libs=libgcc.a makes sure that any symbols libdl.so pulls from
7 // libgcc.a are made static to libdl.so. This in turn ensures that libraries that
8 // a) pull symbols from libgcc.a and b) depend on libdl.so will not rely on libdl.so
9 // to provide those symbols, but will instead pull them from libgcc.a. Specifically,
10 // we use this property to make sure libc.so has its own copy of the code from
11 // libgcc.a it uses.
12 //
13 // DO NOT REMOVE --exclude-libs!
14
15 ldflags: ["-Wl,--exclude-libs=libgcc.a"],
Dan Willemsen208ae172015-09-16 16:33:27 -070016
17 // for x86, exclude libgcc_eh.a for the same reasons as above
18 arch: {
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080019 arm: {
20 version_script: "libdl.arm.map",
21 },
22 arm64: {
23 version_script: "libdl.arm64.map",
24 },
25 mips: {
26 version_script: "libdl.mips.map",
27 },
28 mips64: {
29 version_script: "libdl.mips64.map",
30 },
Dan Willemsen208ae172015-09-16 16:33:27 -070031 x86: {
32 ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080033 version_script: "libdl.x86.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070034 },
35 x86_64: {
36 ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
Dan Willemsen9e6f98f2015-11-03 14:30:57 -080037 version_script: "libdl.x86_64.map",
Dan Willemsen208ae172015-09-16 16:33:27 -070038 },
39 },
40 srcs: ["libdl.c"],
41 cflags: [
42 "-Wall",
43 "-Wextra",
44 "-Wunused",
45 "-Werror",
46 ],
47 stl: "none",
48
49 name: "libdl",
50
51 // NOTE: libdl needs __aeabi_unwind_cpp_pr0 from libgcc.a but libgcc.a needs a
52 // few symbols from libc. Using --no-undefined here results in having to link
53 // against libc creating a circular dependency which is removed and we end up
54 // with missing symbols. Since this library is just a bunch of stubs, we set
55 // LOCAL_ALLOW_UNDEFINED_SYMBOLS to remove --no-undefined from the linker flags.
56 allow_undefined_symbols: true,
57 system_shared_libs: [],
58
Colin Cross27c43c52016-04-07 13:27:24 -070059 sanitize: {
60 never: true,
61 },
Dan Willemsen208ae172015-09-16 16:33:27 -070062}
Dan Alberte8a91082016-08-04 13:45:44 -070063
64ndk_library {
65 name: "libdl.ndk",
66 symbol_file: "libdl.map.txt",
67 first_version: "9",
68}