Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1 | // Define the common source files for all the libc instances |
| 2 | // ========================================================= |
Bob Badour | aa7d835 | 2021-02-19 13:06:22 -0800 | [diff] [blame] | 3 | package { |
| 4 | default_applicable_licenses: ["bionic_libc_license"], |
| 5 | } |
| 6 | |
| 7 | license { |
| 8 | name: "bionic_libc_license", |
| 9 | visibility: [":__subpackages__"], |
| 10 | license_kinds: [ |
| 11 | "SPDX-license-identifier-Apache-2.0", |
| 12 | "SPDX-license-identifier-BSD", |
| 13 | "SPDX-license-identifier-ISC", |
| 14 | "SPDX-license-identifier-MIT", |
| 15 | "legacy_notice", |
| 16 | "legacy_unencumbered", |
| 17 | ], |
| 18 | license_text: [ |
| 19 | "NOTICE", |
| 20 | ], |
| 21 | } |
| 22 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 23 | libc_common_src_files = [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 24 | "bionic/ether_aton.c", |
| 25 | "bionic/ether_ntoa.c", |
Victor Khimenko | 8e0707d | 2020-06-09 21:57:05 +0200 | [diff] [blame] | 26 | "bionic/exit.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 27 | "bionic/initgroups.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 28 | "bionic/isatty.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 29 | "bionic/sched_cpualloc.c", |
| 30 | "bionic/sched_cpucount.c", |
Mitch Phillips | e6997d5 | 2020-11-30 15:04:14 -0800 | [diff] [blame] | 31 | "bionic/sysprop_helpers.cpp", |
Elliott Hughes | 3a4c454 | 2017-07-19 17:20:24 -0700 | [diff] [blame] | 32 | "stdio/fmemopen.cpp", |
Elliott Hughes | 7f0849f | 2016-08-26 16:17:17 -0700 | [diff] [blame] | 33 | "stdio/parsefloat.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 34 | "stdio/refill.c", |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 35 | "stdio/stdio.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 36 | "stdio/stdio_ext.cpp", |
Elliott Hughes | 38e4aef | 2018-01-18 10:21:29 -0800 | [diff] [blame] | 37 | "stdio/vfscanf.cpp", |
Elliott Hughes | 1f462de | 2022-08-05 22:51:05 +0000 | [diff] [blame] | 38 | "stdio/vfwscanf.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 39 | ] |
| 40 | |
Peter Collingbourne | 570de33 | 2019-12-11 10:00:58 -0800 | [diff] [blame] | 41 | // off64_t/time64_t support on LP32. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 42 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 43 | libc_common_src_files_32 = [ |
| 44 | "bionic/legacy_32_bit_support.cpp", |
| 45 | "bionic/time64.c", |
| 46 | ] |
| 47 | |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 48 | libc_common_flags = [ |
| 49 | "-D_LIBC=1", |
Elliott Hughes | 25f17e4 | 2018-02-12 15:48:01 -0800 | [diff] [blame] | 50 | "-D__BIONIC_LP32_USE_STAT64", |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 51 | "-Wall", |
| 52 | "-Wextra", |
| 53 | "-Wunused", |
Elliott Hughes | 3048a36 | 2018-01-19 17:58:07 -0800 | [diff] [blame] | 54 | "-Wno-char-subscripts", |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 55 | "-Wno-deprecated-declarations", |
Elliott Hughes | b348d5c | 2017-07-24 16:53:11 -0700 | [diff] [blame] | 56 | "-Wno-gcc-compat", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 57 | "-Wframe-larger-than=2048", |
Christopher Ferris | 1de7a48 | 2023-09-12 11:06:29 -0700 | [diff] [blame] | 58 | "-Wno-reorder-init-list", |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 59 | |
| 60 | // Try to catch typical 32-bit assumptions that break with 64-bit pointers. |
| 61 | "-Werror=pointer-to-int-cast", |
| 62 | "-Werror=int-to-pointer-cast", |
| 63 | "-Werror=type-limits", |
| 64 | "-Werror", |
Ryan Prichard | 8f41957 | 2018-02-20 17:09:05 -0800 | [diff] [blame] | 65 | |
| 66 | // Clang's exit-time destructor registration hides __dso_handle, but |
| 67 | // __dso_handle needs to have default visibility on ARM32. See b/73485611. |
| 68 | "-Wexit-time-destructors", |
Mitch Phillips | f3968e8 | 2020-01-31 19:57:04 -0800 | [diff] [blame] | 69 | |
Elliott Hughes | a13d066 | 2021-12-02 14:42:16 -0800 | [diff] [blame] | 70 | // We know clang does a lot of harm by rewriting what we've said, and sadly |
| 71 | // never see any good it does, so let's just ask it to do what we say... |
| 72 | // (The specific motivating example was clang turning a loop that would only |
| 73 | // ever touch 0, 1, or 2 bytes into a call to memset, which was never going |
| 74 | // to amortize.) |
| 75 | "-fno-builtin", |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 76 | ] |
| 77 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 78 | // Define some common cflags |
| 79 | // ======================================================== |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 80 | cc_defaults { |
| 81 | name: "libc_defaults", |
Dan Willemsen | 7ec52b1 | 2016-11-28 17:02:25 -0800 | [diff] [blame] | 82 | defaults: ["linux_bionic_supported"], |
Elliott Hughes | 53cf348 | 2016-08-09 13:06:41 -0700 | [diff] [blame] | 83 | cflags: libc_common_flags, |
| 84 | asflags: libc_common_flags, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 85 | conlyflags: ["-std=gnu99"], |
| 86 | cppflags: [], |
Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 87 | include_dirs: [ |
| 88 | "bionic/libc/async_safe/include", |
Peter Collingbourne | 5d3aa86 | 2020-09-11 15:05:17 -0700 | [diff] [blame] | 89 | "bionic/libc/platform", |
Tom Cherry | 379ed1e | 2020-09-17 09:36:25 -0700 | [diff] [blame] | 90 | // For android_filesystem_config.h. |
| 91 | "system/core/libcutils/include", |
Christopher Ferris | 7a3681e | 2017-04-24 17:48:32 -0700 | [diff] [blame] | 92 | ], |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 93 | |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 94 | header_libs: [ |
| 95 | "libc_headers", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 96 | "liblog_headers", // needed by bionic/libc/async_safe/include |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 97 | ], |
| 98 | export_header_lib_headers: [ |
| 99 | "libc_headers", |
| 100 | ], |
Mitch Phillips | f3968e8 | 2020-01-31 19:57:04 -0800 | [diff] [blame] | 101 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 102 | stl: "none", |
| 103 | system_shared_libs: [], |
Colin Cross | 27c43c5 | 2016-04-07 13:27:24 -0700 | [diff] [blame] | 104 | sanitize: { |
Evgenii Stepanov | be551f5 | 2018-08-13 16:46:15 -0700 | [diff] [blame] | 105 | address: false, |
| 106 | integer_overflow: false, |
Mitch Phillips | dfde0ee | 2019-05-01 14:26:13 -0700 | [diff] [blame] | 107 | // TODO(b/132640749): Fix broken fuzzer support. |
| 108 | fuzzer: false, |
Colin Cross | 27c43c5 | 2016-04-07 13:27:24 -0700 | [diff] [blame] | 109 | }, |
Yifan Hong | 5a39cee | 2020-01-21 16:43:56 -0800 | [diff] [blame] | 110 | ramdisk_available: true, |
Yifan Hong | b04490d | 2020-10-21 18:36:36 -0700 | [diff] [blame] | 111 | vendor_ramdisk_available: true, |
Jiyong Park | 5603c6e | 2018-04-27 21:53:11 +0900 | [diff] [blame] | 112 | recovery_available: true, |
dimitry | 7f04880 | 2019-05-03 15:57:34 +0200 | [diff] [blame] | 113 | native_bridge_supported: true, |
Ivan Lozano | f17fd1d | 2018-11-27 07:56:17 -0800 | [diff] [blame] | 114 | |
Yi Kong | e3d90de | 2019-02-20 14:28:56 -0800 | [diff] [blame] | 115 | // lld complains about duplicate symbols in libcrt and libgcc. Suppress the |
| 116 | // warning since this is intended right now. |
| 117 | ldflags: ["-Wl,-z,muldefs"], |
Peter Collingbourne | e99912f | 2019-11-01 15:37:00 -0700 | [diff] [blame] | 118 | |
| 119 | product_variables: { |
Evgenii Stepanov | 5a73e03 | 2020-04-29 14:59:44 -0700 | [diff] [blame] | 120 | malloc_zero_contents: { |
| 121 | cflags: ["-DSCUDO_ZERO_CONTENTS"], |
| 122 | }, |
| 123 | malloc_pattern_fill_contents: { |
| 124 | cflags: ["-DSCUDO_PATTERN_FILL_CONTENTS"], |
| 125 | }, |
Steven Moreland | fb65ee4 | 2020-07-31 00:18:38 +0000 | [diff] [blame] | 126 | malloc_not_svelte: { |
| 127 | cflags: ["-DUSE_SCUDO"], |
| 128 | }, |
Peter Collingbourne | e99912f | 2019-11-01 15:37:00 -0700 | [diff] [blame] | 129 | }, |
Yi Kong | 9e33b76 | 2021-10-29 02:43:22 +0800 | [diff] [blame] | 130 | |
| 131 | lto: { |
| 132 | never: true, |
| 133 | }, |
Elliott Hughes | c204334 | 2023-07-20 20:24:09 +0000 | [diff] [blame] | 134 | |
| 135 | apex_available: ["com.android.runtime"], |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 136 | |
| 137 | tidy_disabled_srcs: ["upstream-*/**/*.c"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 138 | } |
| 139 | |
Christopher Ferris | 4df29ed | 2020-01-24 18:06:42 -0800 | [diff] [blame] | 140 | libc_scudo_product_variables = { |
| 141 | malloc_not_svelte: { |
| 142 | cflags: ["-DUSE_SCUDO"], |
| 143 | whole_static_libs: ["libscudo"], |
| 144 | exclude_static_libs: [ |
| 145 | "libjemalloc5", |
| 146 | "libc_jemalloc_wrapper", |
| 147 | ], |
| 148 | }, |
| 149 | } |
| 150 | |
Christopher Ferris | e55e5ee | 2019-10-01 17:54:42 -0700 | [diff] [blame] | 151 | // Defaults for native allocator libs/includes to make it |
| 152 | // easier to change. |
Christopher Ferris | 062eba2 | 2020-01-31 22:40:45 -0800 | [diff] [blame] | 153 | // To disable scudo for the non-svelte config remove the line: |
Christopher Ferris | 4df29ed | 2020-01-24 18:06:42 -0800 | [diff] [blame] | 154 | // product_variables: libc_scudo_product_variables, |
Christopher Ferris | 062eba2 | 2020-01-31 22:40:45 -0800 | [diff] [blame] | 155 | // in the cc_defaults below. |
Christopher Ferris | e55e5ee | 2019-10-01 17:54:42 -0700 | [diff] [blame] | 156 | // ======================================================== |
| 157 | cc_defaults { |
| 158 | name: "libc_native_allocator_defaults", |
| 159 | |
Christopher Ferris | e55e5ee | 2019-10-01 17:54:42 -0700 | [diff] [blame] | 160 | whole_static_libs: [ |
| 161 | "libjemalloc5", |
| 162 | "libc_jemalloc_wrapper", |
| 163 | ], |
Mitch Phillips | f3968e8 | 2020-01-31 19:57:04 -0800 | [diff] [blame] | 164 | header_libs: ["gwp_asan_headers"], |
Christopher Ferris | 062eba2 | 2020-01-31 22:40:45 -0800 | [diff] [blame] | 165 | product_variables: libc_scudo_product_variables, |
Christopher Ferris | e55e5ee | 2019-10-01 17:54:42 -0700 | [diff] [blame] | 166 | } |
| 167 | |
| 168 | // Functions not implemented by jemalloc directly, or that need to |
| 169 | // be modified for Android. |
| 170 | cc_library_static { |
| 171 | name: "libc_jemalloc_wrapper", |
| 172 | defaults: ["libc_defaults"], |
| 173 | srcs: ["bionic/jemalloc_wrapper.cpp"], |
| 174 | cflags: ["-fvisibility=hidden"], |
| 175 | |
Christopher Ferris | 4df29ed | 2020-01-24 18:06:42 -0800 | [diff] [blame] | 176 | // Used to pull in the jemalloc include directory so that if the |
| 177 | // library is removed, the include directory is also removed. |
| 178 | static_libs: ["libjemalloc5"], |
Christopher Ferris | e55e5ee | 2019-10-01 17:54:42 -0700 | [diff] [blame] | 179 | } |
| 180 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 181 | // ======================================================== |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 182 | // libc_bootstrap.a - -fno-stack-protector and -ffreestanding |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 183 | // ======================================================== |
| 184 | // |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 185 | // Code that implements the stack protector (or that runs before TLS has been set up) needs to be |
| 186 | // compiled with -fno-stack-protector, since it accesses the stack canary TLS slot. In the linker, |
| 187 | // some of this code runs before ifunc resolvers have made string.h functions work, so compile with |
| 188 | // -ffreestanding. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 189 | |
| 190 | cc_library_static { |
| 191 | |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 192 | srcs: [ |
| 193 | "bionic/__libc_init_main_thread.cpp", |
| 194 | "bionic/__stack_chk_fail.cpp", |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 195 | "bionic/bionic_call_ifunc_resolver.cpp", |
| 196 | "bionic/getauxval.cpp", |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 197 | ], |
| 198 | arch: { |
| 199 | arm64: { |
| 200 | srcs: ["arch-arm64/bionic/__set_tls.c"], |
| 201 | }, |
Elliott Hughes | ebc19a9 | 2022-10-14 23:25:36 +0000 | [diff] [blame] | 202 | riscv64: { |
| 203 | srcs: ["arch-riscv64/bionic/__set_tls.c"], |
| 204 | }, |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 205 | x86: { |
Ryan Prichard | 27475b5 | 2018-05-17 17:14:18 -0700 | [diff] [blame] | 206 | srcs: [ |
| 207 | "arch-x86/bionic/__libc_init_sysinfo.cpp", |
Pirama Arumuga Nainar | 7b89be7 | 2021-02-12 15:09:49 -0800 | [diff] [blame] | 208 | "arch-x86/bionic/__libc_int0x80.S", |
Ryan Prichard | 27475b5 | 2018-05-17 17:14:18 -0700 | [diff] [blame] | 209 | "arch-x86/bionic/__set_tls.cpp", |
| 210 | ], |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 211 | }, |
| 212 | x86_64: { |
| 213 | srcs: ["arch-x86_64/bionic/__set_tls.c"], |
| 214 | }, |
| 215 | }, |
| 216 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 217 | defaults: ["libc_defaults"], |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 218 | cflags: [ |
| 219 | "-fno-stack-protector", |
| 220 | "-ffreestanding", |
| 221 | ], |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 222 | name: "libc_bootstrap", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 223 | } |
| 224 | |
Kalesh Singh | f0050fb | 2023-12-15 10:02:01 -0800 | [diff] [blame] | 225 | filegroup { |
| 226 | name: "elf_note_sources", |
| 227 | srcs: ["bionic/elf_note.cpp"], |
| 228 | } |
| 229 | |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 230 | // libc_init_static.cpp and libc_init_dynamic.cpp need to be built without stack protector. |
| 231 | // libc_init_static.cpp sets up TLS for static executables, and libc_init_dynamic.cpp initializes |
| 232 | // the stack protector global variable. |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 233 | |
| 234 | cc_library_static { |
| 235 | name: "libc_init_static", |
| 236 | defaults: ["libc_defaults"], |
Kalesh Singh | f0050fb | 2023-12-15 10:02:01 -0800 | [diff] [blame] | 237 | srcs: [ |
| 238 | "bionic/libc_init_static.cpp", |
| 239 | ":elf_note_sources", |
| 240 | ], |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 241 | cflags: [ |
| 242 | "-fno-stack-protector", |
| 243 | |
| 244 | // Compile libc_init_static.cpp with -ffreestanding, because some of its code is called |
| 245 | // from the linker before ifunc resolvers have made string.h functions available. |
| 246 | "-ffreestanding", |
| 247 | ], |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 248 | } |
| 249 | |
Stephen Crane | f4b1cbd | 2017-05-09 14:27:43 -0700 | [diff] [blame] | 250 | cc_library_static { |
| 251 | name: "libc_init_dynamic", |
| 252 | defaults: ["libc_defaults"], |
| 253 | srcs: ["bionic/libc_init_dynamic.cpp"], |
| 254 | cflags: ["-fno-stack-protector"], |
| 255 | } |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 256 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 257 | // ======================================================== |
| 258 | // libc_tzcode.a - upstream 'tzcode' code |
| 259 | // ======================================================== |
| 260 | |
| 261 | cc_library_static { |
| 262 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 263 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 264 | srcs: [ |
Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 265 | "tzcode/**/*.c", |
Elliott Hughes | 0e8616a | 2017-04-11 14:44:51 -0700 | [diff] [blame] | 266 | "tzcode/bionic.cpp", |
Elliott Hughes | 2bd4316 | 2023-06-15 13:17:08 -0700 | [diff] [blame] | 267 | // tzcode doesn't include strptime, so we use a fork of the |
| 268 | // OpenBSD code which needs this global data. |
Elliott Hughes | d3627a4 | 2022-12-06 22:24:27 +0000 | [diff] [blame] | 269 | "upstream-openbsd/lib/libc/locale/_def_time.c", |
Elliott Hughes | 2bd4316 | 2023-06-15 13:17:08 -0700 | [diff] [blame] | 270 | // tzcode doesn't include wcsftime, so we use the FreeBSD code. |
| 271 | "upstream-freebsd/lib/libc/locale/wcsftime.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 272 | ], |
| 273 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 274 | cflags: [ |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 275 | "-Wno-unused-parameter", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 276 | // Don't use ridiculous amounts of stack. |
| 277 | "-DALL_STATE", |
| 278 | // Include tzsetwall, timelocal, timegm, time2posix, and posix2time. |
| 279 | "-DSTD_INSPIRED", |
Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 280 | // Obviously, we want to be thread-safe. |
Almaz Mingaleev | 5411aff | 2022-02-11 12:27:12 +0000 | [diff] [blame] | 281 | "-DTHREAD_SAFE=1", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 282 | // The name of the tm_gmtoff field in our struct tm. |
| 283 | "-DTM_GMTOFF=tm_gmtoff", |
Elliott Hughes | 31fc69f | 2023-06-20 15:36:11 -0700 | [diff] [blame] | 284 | // Android uses a system property instead of /etc/localtime, so make callers crash. |
Almaz Mingaleev | a52a0da | 2022-02-28 16:55:50 +0000 | [diff] [blame] | 285 | "-DTZDEFAULT=NULL", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 286 | // Where we store our tzdata. |
Colin Cross | 7b29495 | 2016-09-29 14:08:13 -0700 | [diff] [blame] | 287 | "-DTZDIR=\"/system/usr/share/zoneinfo\"", |
Elliott Hughes | 0a610d0 | 2016-07-29 14:04:17 -0700 | [diff] [blame] | 288 | // Include `tzname`, `timezone`, and `daylight` globals. |
| 289 | "-DHAVE_POSIX_DECLS=0", |
Almaz Mingaleev | 5411aff | 2022-02-11 12:27:12 +0000 | [diff] [blame] | 290 | "-DUSG_COMPAT=2", |
| 291 | "-DHAVE_TZNAME=2", |
| 292 | // stdbool.h is available |
| 293 | "-DHAVE_STDBOOL_H", |
Colin Cross | a35d23d | 2015-11-19 13:32:49 -0800 | [diff] [blame] | 294 | // Use the empty string (instead of " ") as the timezone abbreviation |
| 295 | // fallback. |
Colin Cross | 7b29495 | 2016-09-29 14:08:13 -0700 | [diff] [blame] | 296 | "-DWILDABBR=\"\"", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 297 | "-Dlint", |
| 298 | ], |
| 299 | |
Elliott Hughes | 2bd4316 | 2023-06-15 13:17:08 -0700 | [diff] [blame] | 300 | local_include_dirs: [ |
| 301 | "tzcode/", |
| 302 | "upstream-freebsd/android/include", |
| 303 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 304 | name: "libc_tzcode", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 305 | } |
| 306 | |
| 307 | // ======================================================== |
| 308 | // libc_dns.a - modified NetBSD DNS code |
| 309 | // ======================================================== |
| 310 | |
| 311 | cc_library_static { |
| 312 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 313 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 314 | srcs: [ |
Elliott Hughes | d0bbfa8 | 2021-04-08 11:58:51 -0700 | [diff] [blame] | 315 | "dns/**/*.c*", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 316 | |
| 317 | "upstream-netbsd/lib/libc/isc/ev_streams.c", |
| 318 | "upstream-netbsd/lib/libc/isc/ev_timers.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 319 | ], |
| 320 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 321 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 322 | "-DANDROID_CHANGES", |
| 323 | "-DINET6", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 324 | "-Wno-unused-parameter", |
| 325 | "-include netbsd-compat.h", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 326 | "-Wframe-larger-than=66000", |
Elliott Hughes | e1dc4f6 | 2021-01-11 11:51:29 -0800 | [diff] [blame] | 327 | "-include private/bsd_sys_param.h", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 328 | ], |
| 329 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 330 | local_include_dirs: [ |
| 331 | "dns/include", |
| 332 | "private", |
| 333 | "upstream-netbsd/lib/libc/include", |
| 334 | "upstream-netbsd/android/include", |
| 335 | ], |
| 336 | |
| 337 | name: "libc_dns", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 338 | } |
| 339 | |
| 340 | // ======================================================== |
| 341 | // libc_freebsd.a - upstream FreeBSD C library code |
| 342 | // ======================================================== |
| 343 | // |
| 344 | // These files are built with the freebsd-compat.h header file |
| 345 | // automatically included. |
| 346 | |
| 347 | cc_library_static { |
Elliott Hughes | c204334 | 2023-07-20 20:24:09 +0000 | [diff] [blame] | 348 | name: "libc_freebsd_ldexp", |
| 349 | defaults: ["libc_defaults"], |
| 350 | cflags: ["-Dscalbn=ldexp"], |
| 351 | srcs: [":libc_ldexp_srcs"], |
| 352 | } |
| 353 | |
| 354 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 355 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 356 | srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 357 | "upstream-freebsd/lib/libc/stdlib/getopt_long.c", |
Elliott Hughes | 5702c6f | 2017-08-31 17:27:05 -0700 | [diff] [blame] | 358 | "upstream-freebsd/lib/libc/stdlib/hcreate.c", |
| 359 | "upstream-freebsd/lib/libc/stdlib/hcreate_r.c", |
| 360 | "upstream-freebsd/lib/libc/stdlib/hdestroy_r.c", |
| 361 | "upstream-freebsd/lib/libc/stdlib/hsearch_r.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 362 | "upstream-freebsd/lib/libc/stdlib/qsort.c", |
| 363 | "upstream-freebsd/lib/libc/stdlib/quick_exit.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 364 | "upstream-freebsd/lib/libc/string/wcpcpy.c", |
| 365 | "upstream-freebsd/lib/libc/string/wcpncpy.c", |
| 366 | "upstream-freebsd/lib/libc/string/wcscasecmp.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 367 | "upstream-freebsd/lib/libc/string/wcscat.c", |
| 368 | "upstream-freebsd/lib/libc/string/wcschr.c", |
| 369 | "upstream-freebsd/lib/libc/string/wcscmp.c", |
| 370 | "upstream-freebsd/lib/libc/string/wcscpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 371 | "upstream-freebsd/lib/libc/string/wcscspn.c", |
| 372 | "upstream-freebsd/lib/libc/string/wcsdup.c", |
| 373 | "upstream-freebsd/lib/libc/string/wcslcat.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 374 | "upstream-freebsd/lib/libc/string/wcslen.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 375 | "upstream-freebsd/lib/libc/string/wcsncasecmp.c", |
| 376 | "upstream-freebsd/lib/libc/string/wcsncat.c", |
| 377 | "upstream-freebsd/lib/libc/string/wcsncmp.c", |
| 378 | "upstream-freebsd/lib/libc/string/wcsncpy.c", |
| 379 | "upstream-freebsd/lib/libc/string/wcsnlen.c", |
| 380 | "upstream-freebsd/lib/libc/string/wcspbrk.c", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 381 | "upstream-freebsd/lib/libc/string/wcsrchr.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 382 | "upstream-freebsd/lib/libc/string/wcsspn.c", |
Elliott Hughes | 20f3399 | 2017-07-13 09:45:00 -0700 | [diff] [blame] | 383 | "upstream-freebsd/lib/libc/string/wcsstr.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 384 | "upstream-freebsd/lib/libc/string/wcstok.c", |
| 385 | "upstream-freebsd/lib/libc/string/wmemchr.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 386 | "upstream-freebsd/lib/libc/string/wmemcmp.c", |
Elliott Hughes | 20f3399 | 2017-07-13 09:45:00 -0700 | [diff] [blame] | 387 | "upstream-freebsd/lib/libc/string/wmemcpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 388 | "upstream-freebsd/lib/libc/string/wmemmove.c", |
Dan Willemsen | 9c9aa74 | 2016-01-15 16:00:57 -0800 | [diff] [blame] | 389 | "upstream-freebsd/lib/libc/string/wmemset.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 390 | ], |
| 391 | arch: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 392 | x86: { |
| 393 | exclude_srcs: [ |
| 394 | "upstream-freebsd/lib/libc/string/wcschr.c", |
| 395 | "upstream-freebsd/lib/libc/string/wcscmp.c", |
| 396 | "upstream-freebsd/lib/libc/string/wcslen.c", |
| 397 | "upstream-freebsd/lib/libc/string/wcsrchr.c", |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 398 | "upstream-freebsd/lib/libc/string/wmemcmp.c", |
| 399 | "upstream-freebsd/lib/libc/string/wcscat.c", |
| 400 | "upstream-freebsd/lib/libc/string/wcscpy.c", |
| 401 | "upstream-freebsd/lib/libc/string/wmemcmp.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 402 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 403 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 404 | }, |
| 405 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 406 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 407 | "-Wno-sign-compare", |
Elliott Hughes | 5702c6f | 2017-08-31 17:27:05 -0700 | [diff] [blame] | 408 | "-Wno-unused-parameter", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 409 | "-include freebsd-compat.h", |
| 410 | ], |
| 411 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 412 | local_include_dirs: [ |
| 413 | "upstream-freebsd/android/include", |
| 414 | ], |
| 415 | |
| 416 | name: "libc_freebsd", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 417 | } |
| 418 | |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 419 | cc_library_static { |
| 420 | defaults: ["libc_defaults"], |
| 421 | srcs: [ |
Elliott Hughes | f1c568d | 2017-09-26 17:09:07 -0700 | [diff] [blame] | 422 | "upstream-freebsd/lib/libc/gen/glob.c", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 423 | ], |
| 424 | |
| 425 | cflags: [ |
| 426 | "-Wno-sign-compare", |
| 427 | "-include freebsd-compat.h", |
Elliott Hughes | f1c568d | 2017-09-26 17:09:07 -0700 | [diff] [blame] | 428 | "-Wframe-larger-than=66000", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 429 | ], |
| 430 | |
| 431 | local_include_dirs: [ |
| 432 | "upstream-freebsd/android/include", |
| 433 | ], |
| 434 | |
| 435 | name: "libc_freebsd_large_stack", |
| 436 | } |
| 437 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 438 | // ======================================================== |
| 439 | // libc_netbsd.a - upstream NetBSD C library code |
| 440 | // ======================================================== |
| 441 | // |
| 442 | // These files are built with the netbsd-compat.h header file |
| 443 | // automatically included. |
| 444 | |
| 445 | cc_library_static { |
| 446 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 447 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 448 | srcs: [ |
| 449 | "upstream-netbsd/common/lib/libc/stdlib/random.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 450 | "upstream-netbsd/lib/libc/gen/nice.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 451 | "upstream-netbsd/lib/libc/gen/psignal.c", |
| 452 | "upstream-netbsd/lib/libc/gen/utime.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 453 | "upstream-netbsd/lib/libc/inet/nsap_addr.c", |
| 454 | "upstream-netbsd/lib/libc/regex/regcomp.c", |
| 455 | "upstream-netbsd/lib/libc/regex/regerror.c", |
| 456 | "upstream-netbsd/lib/libc/regex/regexec.c", |
| 457 | "upstream-netbsd/lib/libc/regex/regfree.c", |
| 458 | "upstream-netbsd/lib/libc/stdlib/bsearch.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 459 | "upstream-netbsd/lib/libc/stdlib/drand48.c", |
| 460 | "upstream-netbsd/lib/libc/stdlib/erand48.c", |
| 461 | "upstream-netbsd/lib/libc/stdlib/jrand48.c", |
| 462 | "upstream-netbsd/lib/libc/stdlib/lcong48.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 463 | "upstream-netbsd/lib/libc/stdlib/lrand48.c", |
| 464 | "upstream-netbsd/lib/libc/stdlib/mrand48.c", |
| 465 | "upstream-netbsd/lib/libc/stdlib/nrand48.c", |
| 466 | "upstream-netbsd/lib/libc/stdlib/_rand48.c", |
| 467 | "upstream-netbsd/lib/libc/stdlib/rand_r.c", |
| 468 | "upstream-netbsd/lib/libc/stdlib/reallocarr.c", |
| 469 | "upstream-netbsd/lib/libc/stdlib/seed48.c", |
| 470 | "upstream-netbsd/lib/libc/stdlib/srand48.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 471 | ], |
| 472 | multilib: { |
| 473 | lib32: { |
| 474 | // LP32 cruft |
| 475 | srcs: ["upstream-netbsd/common/lib/libc/hash/sha1/sha1.c"], |
| 476 | }, |
| 477 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 478 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 479 | "-Wno-sign-compare", |
Dan Willemsen | 879cec2 | 2016-02-29 10:37:56 -0800 | [diff] [blame] | 480 | "-Wno-unused-parameter", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 481 | "-DPOSIX_MISTAKE", |
| 482 | "-include netbsd-compat.h", |
| 483 | ], |
| 484 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 485 | local_include_dirs: [ |
| 486 | "upstream-netbsd/android/include", |
| 487 | "upstream-netbsd/lib/libc/include", |
| 488 | ], |
| 489 | |
| 490 | name: "libc_netbsd", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 491 | } |
| 492 | |
| 493 | // ======================================================== |
| 494 | // libc_openbsd_ndk.a - upstream OpenBSD C library code |
| 495 | // that can be safely included in the libc_ndk.a (doesn't |
| 496 | // contain any troublesome global data or constructors). |
| 497 | // ======================================================== |
| 498 | // |
| 499 | // These files are built with the openbsd-compat.h header file |
| 500 | // automatically included. |
| 501 | |
| 502 | cc_library_static { |
| 503 | name: "libc_openbsd_ndk", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 504 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 505 | srcs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 506 | "upstream-openbsd/lib/libc/gen/alarm.c", |
| 507 | "upstream-openbsd/lib/libc/gen/ctype_.c", |
| 508 | "upstream-openbsd/lib/libc/gen/daemon.c", |
| 509 | "upstream-openbsd/lib/libc/gen/err.c", |
| 510 | "upstream-openbsd/lib/libc/gen/errx.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 511 | "upstream-openbsd/lib/libc/gen/fnmatch.c", |
| 512 | "upstream-openbsd/lib/libc/gen/ftok.c", |
| 513 | "upstream-openbsd/lib/libc/gen/getprogname.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 514 | "upstream-openbsd/lib/libc/gen/setprogname.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 515 | "upstream-openbsd/lib/libc/gen/verr.c", |
| 516 | "upstream-openbsd/lib/libc/gen/verrx.c", |
| 517 | "upstream-openbsd/lib/libc/gen/vwarn.c", |
| 518 | "upstream-openbsd/lib/libc/gen/vwarnx.c", |
| 519 | "upstream-openbsd/lib/libc/gen/warn.c", |
| 520 | "upstream-openbsd/lib/libc/gen/warnx.c", |
| 521 | "upstream-openbsd/lib/libc/locale/btowc.c", |
| 522 | "upstream-openbsd/lib/libc/locale/mbrlen.c", |
| 523 | "upstream-openbsd/lib/libc/locale/mbstowcs.c", |
| 524 | "upstream-openbsd/lib/libc/locale/mbtowc.c", |
| 525 | "upstream-openbsd/lib/libc/locale/wcscoll.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 526 | "upstream-openbsd/lib/libc/locale/wcstombs.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 527 | "upstream-openbsd/lib/libc/locale/wcsxfrm.c", |
| 528 | "upstream-openbsd/lib/libc/locale/wctob.c", |
| 529 | "upstream-openbsd/lib/libc/locale/wctomb.c", |
Elliott Hughes | 26fda77 | 2016-04-06 11:56:41 -0700 | [diff] [blame] | 530 | "upstream-openbsd/lib/libc/net/base64.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 531 | "upstream-openbsd/lib/libc/net/htonl.c", |
| 532 | "upstream-openbsd/lib/libc/net/htons.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 533 | "upstream-openbsd/lib/libc/net/inet_lnaof.c", |
| 534 | "upstream-openbsd/lib/libc/net/inet_makeaddr.c", |
| 535 | "upstream-openbsd/lib/libc/net/inet_netof.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 536 | "upstream-openbsd/lib/libc/net/inet_ntoa.c", |
| 537 | "upstream-openbsd/lib/libc/net/inet_ntop.c", |
| 538 | "upstream-openbsd/lib/libc/net/inet_pton.c", |
| 539 | "upstream-openbsd/lib/libc/net/ntohl.c", |
| 540 | "upstream-openbsd/lib/libc/net/ntohs.c", |
Colin Cross | 8ce38af | 2016-01-19 12:50:20 -0800 | [diff] [blame] | 541 | "upstream-openbsd/lib/libc/net/res_random.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 542 | "upstream-openbsd/lib/libc/stdio/fgetln.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 543 | "upstream-openbsd/lib/libc/stdio/fgetwc.c", |
| 544 | "upstream-openbsd/lib/libc/stdio/fgetws.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 545 | "upstream-openbsd/lib/libc/stdio/flags.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 546 | "upstream-openbsd/lib/libc/stdio/fpurge.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 547 | "upstream-openbsd/lib/libc/stdio/fputwc.c", |
| 548 | "upstream-openbsd/lib/libc/stdio/fputws.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 549 | "upstream-openbsd/lib/libc/stdio/fvwrite.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 550 | "upstream-openbsd/lib/libc/stdio/fwide.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 551 | "upstream-openbsd/lib/libc/stdio/getdelim.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 552 | "upstream-openbsd/lib/libc/stdio/gets.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 553 | "upstream-openbsd/lib/libc/stdio/makebuf.c", |
| 554 | "upstream-openbsd/lib/libc/stdio/mktemp.c", |
| 555 | "upstream-openbsd/lib/libc/stdio/open_memstream.c", |
| 556 | "upstream-openbsd/lib/libc/stdio/open_wmemstream.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 557 | "upstream-openbsd/lib/libc/stdio/rget.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 558 | "upstream-openbsd/lib/libc/stdio/setvbuf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 559 | "upstream-openbsd/lib/libc/stdio/ungetc.c", |
| 560 | "upstream-openbsd/lib/libc/stdio/ungetwc.c", |
| 561 | "upstream-openbsd/lib/libc/stdio/vasprintf.c", |
| 562 | "upstream-openbsd/lib/libc/stdio/vdprintf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 563 | "upstream-openbsd/lib/libc/stdio/vsscanf.c", |
| 564 | "upstream-openbsd/lib/libc/stdio/vswprintf.c", |
| 565 | "upstream-openbsd/lib/libc/stdio/vswscanf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 566 | "upstream-openbsd/lib/libc/stdio/wbuf.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 567 | "upstream-openbsd/lib/libc/stdio/wsetup.c", |
| 568 | "upstream-openbsd/lib/libc/stdlib/abs.c", |
Elliott Hughes | 01809e1 | 2019-02-05 16:48:22 -0800 | [diff] [blame] | 569 | "upstream-openbsd/lib/libc/stdlib/div.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 570 | "upstream-openbsd/lib/libc/stdlib/getenv.c", |
Colin Cross | b839610 | 2016-04-07 13:24:50 -0700 | [diff] [blame] | 571 | "upstream-openbsd/lib/libc/stdlib/getsubopt.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 572 | "upstream-openbsd/lib/libc/stdlib/insque.c", |
| 573 | "upstream-openbsd/lib/libc/stdlib/imaxabs.c", |
| 574 | "upstream-openbsd/lib/libc/stdlib/imaxdiv.c", |
| 575 | "upstream-openbsd/lib/libc/stdlib/labs.c", |
Elliott Hughes | 01809e1 | 2019-02-05 16:48:22 -0800 | [diff] [blame] | 576 | "upstream-openbsd/lib/libc/stdlib/ldiv.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 577 | "upstream-openbsd/lib/libc/stdlib/llabs.c", |
Elliott Hughes | 01809e1 | 2019-02-05 16:48:22 -0800 | [diff] [blame] | 578 | "upstream-openbsd/lib/libc/stdlib/lldiv.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 579 | "upstream-openbsd/lib/libc/stdlib/lsearch.c", |
Elliott Hughes | 26b0607 | 2020-07-31 11:00:10 -0700 | [diff] [blame] | 580 | "upstream-openbsd/lib/libc/stdlib/recallocarray.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 581 | "upstream-openbsd/lib/libc/stdlib/remque.c", |
| 582 | "upstream-openbsd/lib/libc/stdlib/setenv.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 583 | "upstream-openbsd/lib/libc/stdlib/tfind.c", |
| 584 | "upstream-openbsd/lib/libc/stdlib/tsearch.c", |
Elliott Hughes | fbac97a | 2019-02-04 16:46:24 -0800 | [diff] [blame] | 585 | "upstream-openbsd/lib/libc/string/memccpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 586 | "upstream-openbsd/lib/libc/string/strcasecmp.c", |
Elliott Hughes | fbac97a | 2019-02-04 16:46:24 -0800 | [diff] [blame] | 587 | "upstream-openbsd/lib/libc/string/strcasestr.c", |
| 588 | "upstream-openbsd/lib/libc/string/strcoll.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 589 | "upstream-openbsd/lib/libc/string/strcspn.c", |
| 590 | "upstream-openbsd/lib/libc/string/strdup.c", |
| 591 | "upstream-openbsd/lib/libc/string/strndup.c", |
| 592 | "upstream-openbsd/lib/libc/string/strpbrk.c", |
| 593 | "upstream-openbsd/lib/libc/string/strsep.c", |
| 594 | "upstream-openbsd/lib/libc/string/strspn.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 595 | "upstream-openbsd/lib/libc/string/strtok.c", |
Elliott Hughes | fbac97a | 2019-02-04 16:46:24 -0800 | [diff] [blame] | 596 | "upstream-openbsd/lib/libc/string/strxfrm.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 597 | "upstream-openbsd/lib/libc/string/wcslcpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 598 | "upstream-openbsd/lib/libc/string/wcswidth.c", |
Colin Cross | 69bcb8b | 2021-09-08 13:24:16 -0700 | [diff] [blame] | 599 | |
| 600 | // This file is originally from OpenBSD, and benefits from |
| 601 | // being compiled with openbsd-compat.h. |
| 602 | "bionic/fts.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 603 | ], |
| 604 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 605 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 606 | "-Wno-sign-compare", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 607 | "-Wno-unused-parameter", |
| 608 | "-include openbsd-compat.h", |
| 609 | ], |
| 610 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 611 | local_include_dirs: [ |
| 612 | "private", |
| 613 | "stdio", |
| 614 | "upstream-openbsd/android/include", |
| 615 | "upstream-openbsd/lib/libc/include", |
| 616 | "upstream-openbsd/lib/libc/gdtoa/", |
| 617 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 618 | } |
| 619 | |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 620 | cc_library_static { |
| 621 | name: "libc_openbsd_large_stack", |
| 622 | defaults: ["libc_defaults"], |
| 623 | srcs: [ |
Elliott Hughes | 2f9c8ce | 2017-11-01 13:54:47 -0700 | [diff] [blame] | 624 | "stdio/vfprintf.cpp", |
| 625 | "stdio/vfwprintf.cpp", |
Elliott Hughes | 5633caa | 2020-08-06 14:32:43 -0700 | [diff] [blame] | 626 | "upstream-openbsd/lib/libc/string/memmem.c", |
Elliott Hughes | c6b38ae | 2019-11-22 11:15:42 -0800 | [diff] [blame] | 627 | "upstream-openbsd/lib/libc/string/strstr.c", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 628 | ], |
| 629 | cflags: [ |
| 630 | "-include openbsd-compat.h", |
| 631 | "-Wno-sign-compare", |
| 632 | "-Wframe-larger-than=5000", |
| 633 | ], |
| 634 | |
| 635 | local_include_dirs: [ |
Elliott Hughes | e1dc4f6 | 2021-01-11 11:51:29 -0800 | [diff] [blame] | 636 | "private", |
Elliott Hughes | 3a589c2 | 2017-10-30 11:43:58 -0700 | [diff] [blame] | 637 | "upstream-openbsd/android/include/", |
| 638 | "upstream-openbsd/lib/libc/include/", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 639 | "upstream-openbsd/lib/libc/gdtoa/", |
Elliott Hughes | 3a589c2 | 2017-10-30 11:43:58 -0700 | [diff] [blame] | 640 | "upstream-openbsd/lib/libc/stdio/", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 641 | ], |
| 642 | } |
| 643 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 644 | // ======================================================== |
| 645 | // libc_openbsd.a - upstream OpenBSD C library code |
| 646 | // ======================================================== |
| 647 | // |
| 648 | // These files are built with the openbsd-compat.h header file |
| 649 | // automatically included. |
| 650 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 651 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 652 | srcs: [ |
Elliott Hughes | 211c4d3 | 2018-02-02 15:10:32 -0800 | [diff] [blame] | 653 | // These two depend on getentropy, which isn't in libc_ndk.a. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 654 | "upstream-openbsd/lib/libc/crypt/arc4random.c", |
| 655 | "upstream-openbsd/lib/libc/crypt/arc4random_uniform.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 656 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 657 | |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 658 | // Each architecture has optimized versions of some routines, |
| 659 | // and only includes the portable C versions of ones it's missing. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 660 | arch: { |
| 661 | arm: { |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 662 | srcs: [ |
| 663 | "upstream-openbsd/lib/libc/string/memchr.c", |
| 664 | "upstream-openbsd/lib/libc/string/memrchr.c", |
| 665 | "upstream-openbsd/lib/libc/string/stpncpy.c", |
| 666 | "upstream-openbsd/lib/libc/string/strlcat.c", |
| 667 | "upstream-openbsd/lib/libc/string/strlcpy.c", |
| 668 | "upstream-openbsd/lib/libc/string/strncat.c", |
| 669 | "upstream-openbsd/lib/libc/string/strncmp.c", |
| 670 | "upstream-openbsd/lib/libc/string/strncpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 671 | ], |
| 672 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 673 | arm64: { |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 674 | srcs: [ |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 675 | "upstream-openbsd/lib/libc/string/strcat.c", |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 676 | "upstream-openbsd/lib/libc/string/stpncpy.c", |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 677 | "upstream-openbsd/lib/libc/string/strlcat.c", |
| 678 | "upstream-openbsd/lib/libc/string/strlcpy.c", |
| 679 | "upstream-openbsd/lib/libc/string/strncat.c", |
| 680 | "upstream-openbsd/lib/libc/string/strncpy.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 681 | ], |
| 682 | }, |
Elliott Hughes | ebc19a9 | 2022-10-14 23:25:36 +0000 | [diff] [blame] | 683 | riscv64: { |
| 684 | srcs: [ |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 685 | "upstream-openbsd/lib/libc/string/memrchr.c", |
| 686 | "upstream-openbsd/lib/libc/string/stpncpy.c", |
| 687 | "upstream-openbsd/lib/libc/string/strlcat.c", |
| 688 | "upstream-openbsd/lib/libc/string/strlcpy.c", |
Elliott Hughes | ebc19a9 | 2022-10-14 23:25:36 +0000 | [diff] [blame] | 689 | ], |
| 690 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 691 | x86: { |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 692 | srcs: [ |
| 693 | // x86 has custom implementations of all of these. |
| 694 | ], |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 695 | }, |
| 696 | x86_64: { |
| 697 | srcs: [ |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 698 | "upstream-openbsd/lib/libc/string/memchr.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 699 | "upstream-openbsd/lib/libc/string/memrchr.c", |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 700 | "upstream-openbsd/lib/libc/string/strlcat.c", |
| 701 | "upstream-openbsd/lib/libc/string/strlcpy.c", |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 702 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 703 | }, |
| 704 | }, |
| 705 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 706 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 707 | "-Wno-sign-compare", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 708 | "-Wno-unused-parameter", |
| 709 | "-include openbsd-compat.h", |
| 710 | ], |
| 711 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 712 | local_include_dirs: [ |
| 713 | "private", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 714 | "upstream-openbsd/android/include", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 715 | ], |
| 716 | |
| 717 | name: "libc_openbsd", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 718 | } |
| 719 | |
| 720 | // ======================================================== |
| 721 | // libc_gdtoa.a - upstream OpenBSD C library gdtoa code |
| 722 | // ======================================================== |
| 723 | // |
| 724 | // These files are built with the openbsd-compat.h header file |
| 725 | // automatically included. |
| 726 | |
| 727 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 728 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 729 | srcs: [ |
| 730 | "upstream-openbsd/android/gdtoa_support.cpp", |
| 731 | "upstream-openbsd/lib/libc/gdtoa/dmisc.c", |
| 732 | "upstream-openbsd/lib/libc/gdtoa/dtoa.c", |
| 733 | "upstream-openbsd/lib/libc/gdtoa/gdtoa.c", |
| 734 | "upstream-openbsd/lib/libc/gdtoa/gethex.c", |
| 735 | "upstream-openbsd/lib/libc/gdtoa/gmisc.c", |
| 736 | "upstream-openbsd/lib/libc/gdtoa/hd_init.c", |
| 737 | "upstream-openbsd/lib/libc/gdtoa/hdtoa.c", |
| 738 | "upstream-openbsd/lib/libc/gdtoa/hexnan.c", |
| 739 | "upstream-openbsd/lib/libc/gdtoa/ldtoa.c", |
| 740 | "upstream-openbsd/lib/libc/gdtoa/misc.c", |
| 741 | "upstream-openbsd/lib/libc/gdtoa/smisc.c", |
| 742 | "upstream-openbsd/lib/libc/gdtoa/strtod.c", |
| 743 | "upstream-openbsd/lib/libc/gdtoa/strtodg.c", |
| 744 | "upstream-openbsd/lib/libc/gdtoa/strtof.c", |
| 745 | "upstream-openbsd/lib/libc/gdtoa/strtord.c", |
| 746 | "upstream-openbsd/lib/libc/gdtoa/sum.c", |
| 747 | "upstream-openbsd/lib/libc/gdtoa/ulp.c", |
| 748 | ], |
| 749 | multilib: { |
| 750 | lib64: { |
Colin Cross | 6ab8f89 | 2015-11-23 14:12:15 -0800 | [diff] [blame] | 751 | srcs: ["upstream-openbsd/lib/libc/gdtoa/strtorQ.c"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 752 | }, |
| 753 | }, |
| 754 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 755 | cflags: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 756 | "-Wno-sign-compare", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 757 | "-include openbsd-compat.h", |
| 758 | ], |
| 759 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 760 | local_include_dirs: [ |
| 761 | "private", |
| 762 | "upstream-openbsd/android/include", |
| 763 | "upstream-openbsd/lib/libc/include", |
| 764 | ], |
| 765 | |
| 766 | name: "libc_gdtoa", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 767 | } |
| 768 | |
| 769 | // ======================================================== |
Pierre-Clément Tosi | 467e58e | 2023-02-01 13:44:43 +0000 | [diff] [blame] | 770 | // libc_fortify.a - container for our FORTIFY |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 771 | // implementation details |
| 772 | // ======================================================== |
| 773 | cc_library_static { |
| 774 | defaults: ["libc_defaults"], |
George Burgess IV | d34b0a9 | 2017-07-25 11:43:39 -0700 | [diff] [blame] | 775 | srcs: ["bionic/fortify.cpp"], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 776 | |
| 777 | name: "libc_fortify", |
| 778 | |
| 779 | // Disable FORTIFY for the compilation of these, so we don't end up having |
| 780 | // FORTIFY silently call itself. |
Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 781 | cflags: [ |
| 782 | "-U_FORTIFY_SOURCE", |
| 783 | "-D__BIONIC_DECLARE_FORTIFY_HELPERS", |
| 784 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 785 | |
| 786 | arch: { |
| 787 | arm: { |
Haibo Huang | f1c8d1a | 2018-11-27 15:38:47 -0800 | [diff] [blame] | 788 | cflags: [ |
Haibo Huang | f1c8d1a | 2018-11-27 15:38:47 -0800 | [diff] [blame] | 789 | "-DRENAME___STRCAT_CHK", |
| 790 | "-DRENAME___STRCPY_CHK", |
| 791 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 792 | srcs: [ |
| 793 | "arch-arm/generic/bionic/__memcpy_chk.S", |
Haibo Huang | f1c8d1a | 2018-11-27 15:38:47 -0800 | [diff] [blame] | 794 | |
| 795 | "arch-arm/cortex-a15/bionic/__strcat_chk.S", |
| 796 | "arch-arm/cortex-a15/bionic/__strcpy_chk.S", |
| 797 | |
| 798 | "arch-arm/cortex-a7/bionic/__strcat_chk.S", |
| 799 | "arch-arm/cortex-a7/bionic/__strcpy_chk.S", |
| 800 | |
| 801 | "arch-arm/cortex-a9/bionic/__strcat_chk.S", |
| 802 | "arch-arm/cortex-a9/bionic/__strcpy_chk.S", |
| 803 | |
| 804 | "arch-arm/krait/bionic/__strcat_chk.S", |
| 805 | "arch-arm/krait/bionic/__strcpy_chk.S", |
| 806 | |
| 807 | "arch-arm/cortex-a53/bionic/__strcat_chk.S", |
| 808 | "arch-arm/cortex-a53/bionic/__strcpy_chk.S", |
| 809 | |
Haibo Huang | 01bfd89 | 2018-12-03 15:05:16 -0800 | [diff] [blame] | 810 | "arch-arm/cortex-a55/bionic/__strcat_chk.S", |
| 811 | "arch-arm/cortex-a55/bionic/__strcpy_chk.S", |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 812 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 813 | }, |
| 814 | arm64: { |
| 815 | srcs: [ |
Elliott Hughes | 023e4e7 | 2022-11-17 19:27:02 +0000 | [diff] [blame] | 816 | "arch-arm64/string/__memcpy_chk.S", |
| 817 | "arch-arm64/string/__memset_chk.S", |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 818 | ], |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 819 | }, |
caowencheng | ab457f9 | 2023-03-06 14:57:55 +0800 | [diff] [blame] | 820 | riscv64: { |
| 821 | srcs: [ |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 822 | "arch-riscv64/string/__memset_chk.S", |
| 823 | "arch-riscv64/string/__memcpy_chk.S", |
caowencheng | ab457f9 | 2023-03-06 14:57:55 +0800 | [diff] [blame] | 824 | ], |
| 825 | }, |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 826 | }, |
| 827 | } |
| 828 | |
| 829 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 830 | // libc_bionic.a - home-grown C library code |
| 831 | // ======================================================== |
| 832 | |
| 833 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 834 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 835 | srcs: [ |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 836 | "bionic/NetdClientDispatch.cpp", |
| 837 | "bionic/__bionic_get_shell_path.cpp", |
| 838 | "bionic/__cmsg_nxthdr.cpp", |
| 839 | "bionic/__cxa_thread_atexit_impl.cpp", |
| 840 | "bionic/__errno.cpp", |
| 841 | "bionic/__gnu_basename.cpp", |
| 842 | "bionic/__libc_current_sigrtmax.cpp", |
| 843 | "bionic/__libc_current_sigrtmin.cpp", |
| 844 | "bionic/abort.cpp", |
| 845 | "bionic/accept.cpp", |
| 846 | "bionic/access.cpp", |
Josh Gao | 10ec928 | 2017-04-03 15:13:29 -0700 | [diff] [blame] | 847 | "bionic/android_set_abort_message.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 848 | "bionic/android_unsafe_frame_pointer_chase.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 849 | "bionic/arpa_inet.cpp", |
| 850 | "bionic/assert.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 851 | "bionic/atexit.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 852 | "bionic/atof.cpp", |
| 853 | "bionic/bionic_allocator.cpp", |
| 854 | "bionic/bionic_arc4random.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 855 | "bionic/bionic_elf_tls.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 856 | "bionic/bionic_futex.cpp", |
| 857 | "bionic/bionic_netlink.cpp", |
| 858 | "bionic/bionic_systrace.cpp", |
| 859 | "bionic/bionic_time_conversions.cpp", |
| 860 | "bionic/brk.cpp", |
| 861 | "bionic/c16rtomb.cpp", |
| 862 | "bionic/c32rtomb.cpp", |
| 863 | "bionic/chmod.cpp", |
| 864 | "bionic/chown.cpp", |
| 865 | "bionic/clearenv.cpp", |
| 866 | "bionic/clock.cpp", |
| 867 | "bionic/clock_getcpuclockid.cpp", |
| 868 | "bionic/clock_nanosleep.cpp", |
| 869 | "bionic/clone.cpp", |
| 870 | "bionic/ctype.cpp", |
| 871 | "bionic/dirent.cpp", |
| 872 | "bionic/dup.cpp", |
| 873 | "bionic/environ.cpp", |
| 874 | "bionic/error.cpp", |
| 875 | "bionic/eventfd.cpp", |
| 876 | "bionic/exec.cpp", |
| 877 | "bionic/execinfo.cpp", |
| 878 | "bionic/faccessat.cpp", |
| 879 | "bionic/fchmod.cpp", |
| 880 | "bionic/fchmodat.cpp", |
| 881 | "bionic/fcntl.cpp", |
| 882 | "bionic/fdsan.cpp", |
| 883 | "bionic/fdtrack.cpp", |
| 884 | "bionic/ffs.cpp", |
| 885 | "bionic/fgetxattr.cpp", |
| 886 | "bionic/flistxattr.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 887 | "bionic/fork.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 888 | "bionic/fpclassify.cpp", |
| 889 | "bionic/fsetxattr.cpp", |
| 890 | "bionic/ftruncate.cpp", |
| 891 | "bionic/ftw.cpp", |
| 892 | "bionic/futimens.cpp", |
| 893 | "bionic/getcwd.cpp", |
| 894 | "bionic/getdomainname.cpp", |
| 895 | "bionic/getentropy.cpp", |
| 896 | "bionic/gethostname.cpp", |
| 897 | "bionic/getloadavg.cpp", |
| 898 | "bionic/getpagesize.cpp", |
| 899 | "bionic/getpgrp.cpp", |
| 900 | "bionic/getpid.cpp", |
| 901 | "bionic/getpriority.cpp", |
| 902 | "bionic/gettid.cpp", |
| 903 | "bionic/get_device_api_level.cpp", |
| 904 | "bionic/grp_pwd.cpp", |
| 905 | "bionic/grp_pwd_file.cpp", |
| 906 | "bionic/heap_zero_init.cpp", |
| 907 | "bionic/iconv.cpp", |
| 908 | "bionic/icu_wrappers.cpp", |
| 909 | "bionic/ifaddrs.cpp", |
| 910 | "bionic/inotify_init.cpp", |
| 911 | "bionic/ioctl.cpp", |
| 912 | "bionic/killpg.cpp", |
| 913 | "bionic/langinfo.cpp", |
| 914 | "bionic/lchown.cpp", |
| 915 | "bionic/lfs64_support.cpp", |
| 916 | "bionic/libc_init_common.cpp", |
| 917 | "bionic/libgen.cpp", |
| 918 | "bionic/link.cpp", |
| 919 | "bionic/locale.cpp", |
| 920 | "bionic/lockf.cpp", |
| 921 | "bionic/lstat.cpp", |
| 922 | "bionic/mblen.cpp", |
| 923 | "bionic/mbrtoc16.cpp", |
| 924 | "bionic/mbrtoc32.cpp", |
| 925 | "bionic/mempcpy.cpp", |
| 926 | "bionic/memset_explicit.cpp", |
| 927 | "bionic/mkdir.cpp", |
| 928 | "bionic/mkfifo.cpp", |
| 929 | "bionic/mknod.cpp", |
| 930 | "bionic/mntent.cpp", |
| 931 | "bionic/mremap.cpp", |
| 932 | "bionic/net_if.cpp", |
| 933 | "bionic/netdb.cpp", |
| 934 | "bionic/netinet_in.cpp", |
| 935 | "bionic/nl_types.cpp", |
| 936 | "bionic/open.cpp", |
| 937 | "bionic/pathconf.cpp", |
| 938 | "bionic/pause.cpp", |
| 939 | "bionic/pidfd.cpp", |
| 940 | "bionic/pipe.cpp", |
| 941 | "bionic/poll.cpp", |
| 942 | "bionic/posix_fadvise.cpp", |
| 943 | "bionic/posix_fallocate.cpp", |
| 944 | "bionic/posix_madvise.cpp", |
| 945 | "bionic/posix_timers.cpp", |
| 946 | "bionic/preadv_pwritev.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 947 | "bionic/pthread_atfork.cpp", |
| 948 | "bionic/pthread_attr.cpp", |
| 949 | "bionic/pthread_barrier.cpp", |
| 950 | "bionic/pthread_cond.cpp", |
| 951 | "bionic/pthread_create.cpp", |
| 952 | "bionic/pthread_detach.cpp", |
| 953 | "bionic/pthread_equal.cpp", |
| 954 | "bionic/pthread_exit.cpp", |
| 955 | "bionic/pthread_getcpuclockid.cpp", |
| 956 | "bionic/pthread_getschedparam.cpp", |
| 957 | "bionic/pthread_gettid_np.cpp", |
| 958 | "bionic/pthread_internal.cpp", |
| 959 | "bionic/pthread_join.cpp", |
| 960 | "bionic/pthread_key.cpp", |
| 961 | "bionic/pthread_kill.cpp", |
| 962 | "bionic/pthread_mutex.cpp", |
| 963 | "bionic/pthread_once.cpp", |
| 964 | "bionic/pthread_rwlock.cpp", |
| 965 | "bionic/pthread_sigqueue.cpp", |
| 966 | "bionic/pthread_self.cpp", |
| 967 | "bionic/pthread_setname_np.cpp", |
| 968 | "bionic/pthread_setschedparam.cpp", |
| 969 | "bionic/pthread_spinlock.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 970 | "bionic/ptrace.cpp", |
| 971 | "bionic/pty.cpp", |
| 972 | "bionic/raise.cpp", |
| 973 | "bionic/rand.cpp", |
| 974 | "bionic/readlink.cpp", |
| 975 | "bionic/realpath.cpp", |
| 976 | "bionic/reboot.cpp", |
| 977 | "bionic/recv.cpp", |
| 978 | "bionic/recvmsg.cpp", |
| 979 | "bionic/rename.cpp", |
| 980 | "bionic/rmdir.cpp", |
| 981 | "bionic/scandir.cpp", |
| 982 | "bionic/sched_getaffinity.cpp", |
| 983 | "bionic/sched_getcpu.cpp", |
| 984 | "bionic/semaphore.cpp", |
| 985 | "bionic/send.cpp", |
| 986 | "bionic/setegid.cpp", |
| 987 | "bionic/seteuid.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 988 | "bionic/setjmp_cookie.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 989 | "bionic/setpgrp.cpp", |
| 990 | "bionic/sigaction.cpp", |
| 991 | "bionic/signal.cpp", |
| 992 | "bionic/sigprocmask.cpp", |
| 993 | "bionic/sleep.cpp", |
| 994 | "bionic/socketpair.cpp", |
| 995 | "bionic/spawn.cpp", |
| 996 | "bionic/stat.cpp", |
| 997 | "bionic/stdlib_l.cpp", |
| 998 | "bionic/strerror.cpp", |
| 999 | "bionic/string_l.cpp", |
| 1000 | "bionic/strings_l.cpp", |
| 1001 | "bionic/strsignal.cpp", |
| 1002 | "bionic/strtol.cpp", |
| 1003 | "bionic/strtold.cpp", |
| 1004 | "bionic/swab.cpp", |
| 1005 | "bionic/symlink.cpp", |
| 1006 | "bionic/sync_file_range.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 1007 | "bionic/sysconf.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 1008 | "bionic/sys_epoll.cpp", |
| 1009 | "bionic/sys_msg.cpp", |
| 1010 | "bionic/sys_sem.cpp", |
| 1011 | "bionic/sys_shm.cpp", |
| 1012 | "bionic/sys_signalfd.cpp", |
| 1013 | "bionic/sys_statfs.cpp", |
| 1014 | "bionic/sys_statvfs.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 1015 | "bionic/sys_thread_properties.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 1016 | "bionic/sys_time.cpp", |
| 1017 | "bionic/sysinfo.cpp", |
| 1018 | "bionic/syslog.cpp", |
| 1019 | "bionic/system.cpp", |
| 1020 | "bionic/system_property_api.cpp", |
| 1021 | "bionic/system_property_set.cpp", |
| 1022 | "bionic/tdestroy.cpp", |
| 1023 | "bionic/termios.cpp", |
| 1024 | "bionic/thread_private.cpp", |
| 1025 | "bionic/threads.cpp", |
| 1026 | "bionic/time.cpp", |
| 1027 | "bionic/time_l.cpp", |
| 1028 | "bionic/tmpfile.cpp", |
| 1029 | "bionic/umount.cpp", |
| 1030 | "bionic/unlink.cpp", |
| 1031 | "bionic/usleep.cpp", |
| 1032 | "bionic/utmp.cpp", |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 1033 | "bionic/vdso.cpp", |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 1034 | "bionic/wait.cpp", |
| 1035 | "bionic/wchar.cpp", |
| 1036 | "bionic/wchar_l.cpp", |
| 1037 | "bionic/wcstod.cpp", |
| 1038 | "bionic/wctype.cpp", |
| 1039 | "bionic/wcwidth.cpp", |
| 1040 | "bionic/wmempcpy.cpp", |
| 1041 | |
| 1042 | // TODO: why isn't this in a static-libc-only module? |
| 1043 | // This contains a weak stub implementation of __find_icu_symbol for wctype.cpp, |
| 1044 | // which will be overridden by the actual one in libc.so. |
| 1045 | "bionic/icu_static.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1046 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1047 | |
| 1048 | arch: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1049 | arm: { |
Elliott Hughes | 1b61d78 | 2019-06-04 10:38:34 -0700 | [diff] [blame] | 1050 | asflags: libc_common_flags + ["-mno-restrict-it"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1051 | srcs: [ |
Ryan Prichard | 45024fe | 2018-12-30 21:10:26 -0800 | [diff] [blame] | 1052 | "arch-arm/bionic/__aeabi_read_tp.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1053 | "arch-arm/bionic/__bionic_clone.S", |
Yi Kong | b410d0e | 2019-04-22 16:00:46 -0700 | [diff] [blame] | 1054 | "arch-arm/bionic/__restore.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1055 | "arch-arm/bionic/_exit_with_stack_teardown.S", |
Yi Kong | b410d0e | 2019-04-22 16:00:46 -0700 | [diff] [blame] | 1056 | "arch-arm/bionic/atomics_arm.c", |
| 1057 | "arch-arm/bionic/bpabi.c", |
Yi Kong | 165b1cf | 2019-02-13 14:10:10 -0800 | [diff] [blame] | 1058 | "arch-arm/bionic/libcrt_compat.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1059 | "arch-arm/bionic/popcount_tab.c", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1060 | "arch-arm/bionic/setjmp.S", |
| 1061 | "arch-arm/bionic/syscall.S", |
| 1062 | "arch-arm/bionic/vfork.S", |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1063 | |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1064 | "arch-arm/cortex-a7/bionic/memcpy.S", |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1065 | "arch-arm/cortex-a7/bionic/memset.S", |
| 1066 | |
| 1067 | "arch-arm/cortex-a9/bionic/memcpy.S", |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1068 | "arch-arm/cortex-a9/bionic/memset.S", |
| 1069 | "arch-arm/cortex-a9/bionic/stpcpy.S", |
| 1070 | "arch-arm/cortex-a9/bionic/strcat.S", |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1071 | "arch-arm/cortex-a9/bionic/strcpy.S", |
| 1072 | "arch-arm/cortex-a9/bionic/strlen.S", |
| 1073 | |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1074 | "arch-arm/cortex-a15/bionic/memcpy.S", |
| 1075 | "arch-arm/cortex-a15/bionic/memmove.S", |
| 1076 | "arch-arm/cortex-a15/bionic/memset.S", |
| 1077 | "arch-arm/cortex-a15/bionic/stpcpy.S", |
| 1078 | "arch-arm/cortex-a15/bionic/strcat.S", |
| 1079 | "arch-arm/cortex-a15/bionic/strcmp.S", |
| 1080 | "arch-arm/cortex-a15/bionic/strcpy.S", |
| 1081 | "arch-arm/cortex-a15/bionic/strlen.S", |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1082 | |
| 1083 | "arch-arm/cortex-a53/bionic/memcpy.S", |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1084 | |
Haibo Huang | 01bfd89 | 2018-12-03 15:05:16 -0800 | [diff] [blame] | 1085 | "arch-arm/cortex-a55/bionic/memcpy.S", |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1086 | |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1087 | "arch-arm/generic/bionic/memcmp.S", |
| 1088 | "arch-arm/generic/bionic/memmove.S", |
| 1089 | "arch-arm/generic/bionic/memset.S", |
| 1090 | "arch-arm/generic/bionic/stpcpy.c", |
| 1091 | "arch-arm/generic/bionic/strcat.c", |
| 1092 | "arch-arm/generic/bionic/strcmp.S", |
| 1093 | "arch-arm/generic/bionic/strcpy.S", |
| 1094 | "arch-arm/generic/bionic/strlen.c", |
| 1095 | |
| 1096 | "arch-arm/krait/bionic/memcpy.S", |
| 1097 | "arch-arm/krait/bionic/memset.S", |
| 1098 | |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1099 | "arch-arm/kryo/bionic/memcpy.S", |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1100 | |
| 1101 | "bionic/strchr.cpp", |
| 1102 | "bionic/strchrnul.cpp", |
| 1103 | "bionic/strnlen.cpp", |
| 1104 | "bionic/strrchr.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1105 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1106 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1107 | arm64: { |
| 1108 | srcs: [ |
Dan Willemsen | 3e62171 | 2016-02-03 21:48:08 -0800 | [diff] [blame] | 1109 | "arch-arm64/bionic/__bionic_clone.S", |
| 1110 | "arch-arm64/bionic/_exit_with_stack_teardown.S", |
| 1111 | "arch-arm64/bionic/setjmp.S", |
| 1112 | "arch-arm64/bionic/syscall.S", |
| 1113 | "arch-arm64/bionic/vfork.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1114 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1115 | }, |
| 1116 | |
Elliott Hughes | ebc19a9 | 2022-10-14 23:25:36 +0000 | [diff] [blame] | 1117 | riscv64: { |
| 1118 | srcs: [ |
| 1119 | "arch-riscv64/bionic/__bionic_clone.S", |
| 1120 | "arch-riscv64/bionic/_exit_with_stack_teardown.S", |
Elliott Hughes | e1905ed | 2022-10-17 23:23:36 +0000 | [diff] [blame] | 1121 | "arch-riscv64/bionic/setjmp.S", |
Elliott Hughes | ebc19a9 | 2022-10-14 23:25:36 +0000 | [diff] [blame] | 1122 | "arch-riscv64/bionic/syscall.S", |
| 1123 | "arch-riscv64/bionic/vfork.S", |
Yun Hsiang | 40a82d0 | 2023-05-26 10:10:40 +0800 | [diff] [blame] | 1124 | |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1125 | "arch-riscv64/string/memchr_v.S", |
| 1126 | "arch-riscv64/string/memcmp_v.S", |
| 1127 | "arch-riscv64/string/memcpy_v.S", |
| 1128 | "arch-riscv64/string/memmove_v.S", |
| 1129 | "arch-riscv64/string/memset_v.S", |
| 1130 | "arch-riscv64/string/stpcpy_v.S", |
| 1131 | "arch-riscv64/string/strcat_v.S", |
| 1132 | "arch-riscv64/string/strchr_v.S", |
| 1133 | "arch-riscv64/string/strcmp_v.S", |
| 1134 | "arch-riscv64/string/strcpy_v.S", |
| 1135 | "arch-riscv64/string/strlen_v.S", |
| 1136 | "arch-riscv64/string/strncat_v.S", |
| 1137 | "arch-riscv64/string/strncmp_v.S", |
| 1138 | "arch-riscv64/string/strncpy_v.S", |
| 1139 | "arch-riscv64/string/strnlen_v.S", |
| 1140 | |
| 1141 | "arch-riscv64/string/memchr.c", |
| 1142 | "arch-riscv64/string/memcmp.c", |
| 1143 | "arch-riscv64/string/memcpy.c", |
| 1144 | "arch-riscv64/string/memmove.c", |
| 1145 | "arch-riscv64/string/memset.c", |
| 1146 | "arch-riscv64/string/stpcpy.c", |
| 1147 | "arch-riscv64/string/strcat.c", |
| 1148 | "arch-riscv64/string/strchr.c", |
| 1149 | "arch-riscv64/string/strcmp.c", |
| 1150 | "arch-riscv64/string/strcpy.c", |
| 1151 | "arch-riscv64/string/strlen.c", |
| 1152 | "arch-riscv64/string/strncat.c", |
| 1153 | "arch-riscv64/string/strncmp.c", |
| 1154 | "arch-riscv64/string/strncpy.c", |
| 1155 | "arch-riscv64/string/strnlen.c", |
Prashanth Swaminathan | a4d7102 | 2023-10-30 17:35:19 -0700 | [diff] [blame] | 1156 | |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 1157 | "bionic/strchrnul.cpp", |
| 1158 | "bionic/strrchr.cpp", |
Elliott Hughes | ebc19a9 | 2022-10-14 23:25:36 +0000 | [diff] [blame] | 1159 | ], |
| 1160 | }, |
| 1161 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1162 | x86: { |
| 1163 | srcs: [ |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 1164 | "arch-x86/bionic/__bionic_clone.S", |
| 1165 | "arch-x86/bionic/_exit_with_stack_teardown.S", |
| 1166 | "arch-x86/bionic/libcrt_compat.c", |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 1167 | "arch-x86/bionic/setjmp.S", |
| 1168 | "arch-x86/bionic/syscall.S", |
| 1169 | "arch-x86/bionic/vfork.S", |
| 1170 | "arch-x86/bionic/__x86.get_pc_thunk.S", |
| 1171 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1172 | "arch-x86/generic/string/memcmp.S", |
| 1173 | "arch-x86/generic/string/strcmp.S", |
| 1174 | "arch-x86/generic/string/strncmp.S", |
| 1175 | "arch-x86/generic/string/strcat.S", |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1176 | |
| 1177 | "arch-x86/generic/string/strlcat.c", |
| 1178 | "arch-x86/generic/string/strlcpy.c", |
| 1179 | "arch-x86/generic/string/strncat.c", |
| 1180 | "arch-x86/generic/string/wcscat.c", |
| 1181 | "arch-x86/generic/string/wcscpy.c", |
| 1182 | "arch-x86/generic/string/wmemcmp.c", |
| 1183 | |
Elliott Hughes | ed77714 | 2022-07-25 16:25:11 +0000 | [diff] [blame] | 1184 | "arch-x86/string/sse2-memchr-atom.S", |
| 1185 | "arch-x86/string/sse2-memmove-slm.S", |
| 1186 | "arch-x86/string/sse2-memrchr-atom.S", |
| 1187 | "arch-x86/string/sse2-memset-atom.S", |
| 1188 | "arch-x86/string/sse2-memset-slm.S", |
| 1189 | "arch-x86/string/sse2-stpcpy-slm.S", |
| 1190 | "arch-x86/string/sse2-stpncpy-slm.S", |
| 1191 | "arch-x86/string/sse2-strchr-atom.S", |
| 1192 | "arch-x86/string/sse2-strcpy-slm.S", |
| 1193 | "arch-x86/string/sse2-strlen-slm.S", |
| 1194 | "arch-x86/string/sse2-strncpy-slm.S", |
| 1195 | "arch-x86/string/sse2-strnlen-atom.S", |
| 1196 | "arch-x86/string/sse2-strrchr-atom.S", |
| 1197 | "arch-x86/string/sse2-wcschr-atom.S", |
| 1198 | "arch-x86/string/sse2-wcsrchr-atom.S", |
| 1199 | "arch-x86/string/sse2-wcslen-atom.S", |
| 1200 | "arch-x86/string/sse2-wcscmp-atom.S", |
| 1201 | "arch-x86/string/sse2-strlen-atom.S", |
| 1202 | |
| 1203 | "arch-x86/string/ssse3-memcmp-atom.S", |
| 1204 | "arch-x86/string/ssse3-memmove-atom.S", |
| 1205 | "arch-x86/string/ssse3-strcat-atom.S", |
| 1206 | "arch-x86/string/ssse3-strcmp-atom.S", |
| 1207 | "arch-x86/string/ssse3-strcpy-atom.S", |
| 1208 | "arch-x86/string/ssse3-strlcat-atom.S", |
| 1209 | "arch-x86/string/ssse3-strlcpy-atom.S", |
| 1210 | "arch-x86/string/ssse3-strncat-atom.S", |
| 1211 | "arch-x86/string/ssse3-strncmp-atom.S", |
| 1212 | "arch-x86/string/ssse3-strncpy-atom.S", |
| 1213 | "arch-x86/string/ssse3-wcscat-atom.S", |
| 1214 | "arch-x86/string/ssse3-wcscpy-atom.S", |
| 1215 | "arch-x86/string/ssse3-wmemcmp-atom.S", |
| 1216 | |
| 1217 | "arch-x86/string/sse4-memcmp-slm.S", |
| 1218 | "arch-x86/string/sse4-wmemcmp-slm.S", |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1219 | |
| 1220 | "bionic/strchrnul.cpp", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1221 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1222 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1223 | x86_64: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1224 | srcs: [ |
Elliott Hughes | 7d13666 | 2023-10-27 15:40:32 -0700 | [diff] [blame] | 1225 | "arch-x86_64/bionic/__bionic_clone.S", |
| 1226 | "arch-x86_64/bionic/_exit_with_stack_teardown.S", |
| 1227 | "arch-x86_64/bionic/__restore_rt.S", |
| 1228 | "arch-x86_64/bionic/setjmp.S", |
| 1229 | "arch-x86_64/bionic/syscall.S", |
| 1230 | "arch-x86_64/bionic/vfork.S", |
| 1231 | |
ahs | 919fb7f | 2022-06-10 07:11:14 +0530 | [diff] [blame] | 1232 | "arch-x86_64/string/avx2-memset-kbl.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1233 | "arch-x86_64/string/sse2-memmove-slm.S", |
| 1234 | "arch-x86_64/string/sse2-memset-slm.S", |
| 1235 | "arch-x86_64/string/sse2-stpcpy-slm.S", |
| 1236 | "arch-x86_64/string/sse2-stpncpy-slm.S", |
| 1237 | "arch-x86_64/string/sse2-strcat-slm.S", |
| 1238 | "arch-x86_64/string/sse2-strcpy-slm.S", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1239 | "arch-x86_64/string/sse2-strlen-slm.S", |
| 1240 | "arch-x86_64/string/sse2-strncat-slm.S", |
| 1241 | "arch-x86_64/string/sse2-strncpy-slm.S", |
| 1242 | "arch-x86_64/string/sse4-memcmp-slm.S", |
| 1243 | "arch-x86_64/string/ssse3-strcmp-slm.S", |
| 1244 | "arch-x86_64/string/ssse3-strncmp-slm.S", |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1245 | |
| 1246 | "bionic/strchr.cpp", |
| 1247 | "bionic/strchrnul.cpp", |
| 1248 | "bionic/strnlen.cpp", |
| 1249 | "bionic/strrchr.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1250 | ], |
| 1251 | }, |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1252 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1253 | |
Elliott Hughes | 2e2b9bc | 2024-02-07 16:10:23 -0800 | [diff] [blame^] | 1254 | // TODO: move to libc/bionic/legacy_32_bit_support.cpp or #if __LP64__ instead. |
| 1255 | multilib: { |
| 1256 | lib32: { |
| 1257 | srcs: ["bionic/mmap.cpp"], |
| 1258 | }, |
| 1259 | }, |
| 1260 | |
| 1261 | local_include_dirs: ["stdio"], |
| 1262 | generated_headers: ["generated_android_ids"], |
| 1263 | |
| 1264 | whole_static_libs: [ |
| 1265 | "libsystemproperties", |
| 1266 | ], |
| 1267 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1268 | cppflags: ["-Wold-style-cast"], |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1269 | include_dirs: ["bionic/libstdc++/include"], |
| 1270 | name: "libc_bionic", |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1271 | } |
| 1272 | |
Elliott Hughes | 3f6eee9 | 2016-12-13 23:47:25 +0000 | [diff] [blame] | 1273 | genrule { |
| 1274 | name: "generated_android_ids", |
Colin Cross | 35bbed8 | 2017-01-17 18:16:07 -0800 | [diff] [blame] | 1275 | out: ["generated_android_ids.h"], |
| 1276 | srcs: [":android_filesystem_config_header"], |
Cole Faust | b1a0a9d | 2023-11-28 17:51:16 -0800 | [diff] [blame] | 1277 | tools: ["fs_config_generator"], |
| 1278 | cmd: "$(location fs_config_generator) aidarray $(in) > $(out)", |
Elliott Hughes | 3f6eee9 | 2016-12-13 23:47:25 +0000 | [diff] [blame] | 1279 | } |
| 1280 | |
Dan Willemsen | 268a673 | 2015-10-15 14:49:45 -0700 | [diff] [blame] | 1281 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1282 | // libc_syscalls.a |
| 1283 | // ======================================================== |
| 1284 | |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1285 | genrule { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1286 | name: "syscalls-arm", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1287 | out: ["syscalls-arm.S"], |
| 1288 | srcs: ["SYSCALLS.TXT"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1289 | tools: ["gensyscalls"], |
| 1290 | cmd: "$(location gensyscalls) arm $(in) > $(out)", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1291 | } |
| 1292 | |
| 1293 | genrule { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1294 | name: "syscalls-arm64", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1295 | out: ["syscalls-arm64.S"], |
| 1296 | srcs: ["SYSCALLS.TXT"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1297 | tools: ["gensyscalls"], |
| 1298 | cmd: "$(location gensyscalls) arm64 $(in) > $(out)", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1299 | } |
| 1300 | |
| 1301 | genrule { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1302 | name: "syscalls-riscv64", |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 1303 | out: ["syscalls-riscv64.S"], |
| 1304 | srcs: ["SYSCALLS.TXT"], |
| 1305 | tools: ["gensyscalls"], |
| 1306 | cmd: "$(location gensyscalls) riscv64 $(in) > $(out)", |
| 1307 | } |
| 1308 | |
| 1309 | genrule { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1310 | name: "syscalls-x86", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1311 | out: ["syscalls-x86.S"], |
| 1312 | srcs: ["SYSCALLS.TXT"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1313 | tools: ["gensyscalls"], |
| 1314 | cmd: "$(location gensyscalls) x86 $(in) > $(out)", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1315 | } |
| 1316 | |
| 1317 | genrule { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1318 | name: "syscalls-x86_64", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1319 | out: ["syscalls-x86_64.S"], |
| 1320 | srcs: ["SYSCALLS.TXT"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1321 | tools: ["gensyscalls"], |
| 1322 | cmd: "$(location gensyscalls) x86_64 $(in) > $(out)", |
Elliott Hughes | 782c485 | 2019-04-16 12:31:00 -0700 | [diff] [blame] | 1323 | } |
| 1324 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1325 | cc_library_static { |
Colin Cross | 27c43c5 | 2016-04-07 13:27:24 -0700 | [diff] [blame] | 1326 | defaults: ["libc_defaults"], |
Josh Gao | 0e0e370 | 2017-10-12 13:34:42 -0700 | [diff] [blame] | 1327 | srcs: ["bionic/__set_errno.cpp"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1328 | arch: { |
| 1329 | arm: { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1330 | srcs: [":syscalls-arm"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1331 | }, |
| 1332 | arm64: { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1333 | srcs: [":syscalls-arm64"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1334 | }, |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 1335 | riscv64: { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1336 | srcs: [":syscalls-riscv64"], |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 1337 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1338 | x86: { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1339 | srcs: [":syscalls-x86"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1340 | }, |
| 1341 | x86_64: { |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1342 | srcs: [":syscalls-x86_64"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1343 | }, |
| 1344 | }, |
| 1345 | name: "libc_syscalls", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1346 | } |
| 1347 | |
| 1348 | // ======================================================== |
| 1349 | // libc_aeabi.a |
| 1350 | // This is an LP32 ARM-only library that needs to be built with -fno-builtin |
| 1351 | // to avoid infinite recursion. For the other architectures we just build an |
| 1352 | // empty library to keep this makefile simple. |
| 1353 | // ======================================================== |
| 1354 | |
| 1355 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1356 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1357 | arch: { |
| 1358 | arm: { |
| 1359 | srcs: ["arch-arm/bionic/__aeabi.c"], |
| 1360 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1361 | }, |
| 1362 | name: "libc_aeabi", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1363 | cflags: ["-fno-builtin"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1364 | } |
| 1365 | |
| 1366 | // ======================================================== |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 1367 | // libc_common.a |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1368 | // ======================================================== |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 1369 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1370 | cc_library_static { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1371 | defaults: ["libc_defaults"], |
Elliott Hughes | b094892 | 2024-01-26 00:28:12 +0000 | [diff] [blame] | 1372 | name: "libc_common", |
| 1373 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1374 | srcs: libc_common_src_files, |
| 1375 | multilib: { |
| 1376 | lib32: { |
| 1377 | srcs: libc_common_src_files_32, |
| 1378 | }, |
| 1379 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1380 | |
| 1381 | whole_static_libs: [ |
Peter Collingbourne | 337a5b3 | 2020-02-21 12:11:02 -0800 | [diff] [blame] | 1382 | "libarm-optimized-routines-string", |
Rupert Shuttleworth | 78f48a5 | 2021-03-16 06:39:19 +0000 | [diff] [blame] | 1383 | "libasync_safe", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1384 | "libc_bionic", |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1385 | "libc_bootstrap", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1386 | "libc_dns", |
George Burgess IV | 6cb0687 | 2017-07-21 13:28:42 -0700 | [diff] [blame] | 1387 | "libc_fortify", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1388 | "libc_freebsd", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 1389 | "libc_freebsd_large_stack", |
Elliott Hughes | c204334 | 2023-07-20 20:24:09 +0000 | [diff] [blame] | 1390 | "libc_freebsd_ldexp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1391 | "libc_gdtoa", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1392 | "libc_netbsd", |
| 1393 | "libc_openbsd", |
Elliott Hughes | 8e547bd | 2016-08-16 15:57:47 -0700 | [diff] [blame] | 1394 | "libc_openbsd_large_stack", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1395 | "libc_openbsd_ndk", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1396 | "libc_syscalls", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1397 | "libc_tzcode", |
Elliott Hughes | 816fab9 | 2016-05-27 17:57:46 -0700 | [diff] [blame] | 1398 | "libstdc++", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1399 | ], |
| 1400 | |
| 1401 | arch: { |
| 1402 | arm: { |
| 1403 | whole_static_libs: ["libc_aeabi"], |
| 1404 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1405 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1406 | } |
| 1407 | |
| 1408 | // ======================================================== |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1409 | // libc_static_dispatch.a |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1410 | // ======================================================== |
| 1411 | cc_library_static { |
| 1412 | defaults: ["libc_defaults"], |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1413 | name: "libc_static_dispatch", |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1414 | |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1415 | arch: { |
ahs | 919fb7f | 2022-06-10 07:11:14 +0530 | [diff] [blame] | 1416 | x86_64: { |
| 1417 | srcs: ["arch-x86_64/static_function_dispatch.S"], |
| 1418 | }, |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1419 | x86: { |
| 1420 | srcs: ["arch-x86/static_function_dispatch.S"], |
| 1421 | }, |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1422 | arm: { |
| 1423 | srcs: ["arch-arm/static_function_dispatch.S"], |
| 1424 | }, |
Peter Collingbourne | 900d07d | 2019-10-28 13:11:00 -0700 | [diff] [blame] | 1425 | arm64: { |
| 1426 | srcs: ["arch-arm64/static_function_dispatch.S"], |
| 1427 | }, |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1428 | riscv64: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 1429 | srcs: ["arch-riscv64/static_function_dispatch.S"], |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1430 | }, |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1431 | }, |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1432 | } |
| 1433 | |
| 1434 | // ======================================================== |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1435 | // libc_dynamic_dispatch.a |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1436 | // ======================================================== |
| 1437 | cc_library_static { |
| 1438 | defaults: ["libc_defaults"], |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1439 | name: "libc_dynamic_dispatch", |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1440 | |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1441 | cflags: [ |
Peter Collingbourne | 36a5644 | 2019-10-31 17:11:54 -0700 | [diff] [blame] | 1442 | "-ffreestanding", |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1443 | "-fno-stack-protector", |
| 1444 | "-fno-jump-tables", |
| 1445 | ], |
| 1446 | arch: { |
ahs | 919fb7f | 2022-06-10 07:11:14 +0530 | [diff] [blame] | 1447 | x86_64: { |
| 1448 | srcs: ["arch-x86_64/dynamic_function_dispatch.cpp"], |
| 1449 | }, |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1450 | x86: { |
| 1451 | srcs: ["arch-x86/dynamic_function_dispatch.cpp"], |
| 1452 | }, |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1453 | arm: { |
Elliott Hughes | 927fe99 | 2019-01-31 22:29:22 +0000 | [diff] [blame] | 1454 | srcs: ["arch-arm/dynamic_function_dispatch.cpp"], |
Haibo Huang | ea9957a | 2018-11-19 11:00:32 -0800 | [diff] [blame] | 1455 | }, |
Peter Collingbourne | 900d07d | 2019-10-28 13:11:00 -0700 | [diff] [blame] | 1456 | arm64: { |
| 1457 | srcs: ["arch-arm64/dynamic_function_dispatch.cpp"], |
| 1458 | }, |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1459 | riscv64: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 1460 | srcs: ["arch-riscv64/dynamic_function_dispatch.cpp"], |
Elliott Hughes | aefe999 | 2023-11-08 12:04:41 -0800 | [diff] [blame] | 1461 | }, |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1462 | }, |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1463 | } |
| 1464 | |
| 1465 | // ======================================================== |
| 1466 | // libc_common_static.a For static binaries. |
| 1467 | // ======================================================== |
| 1468 | cc_library_static { |
| 1469 | defaults: ["libc_defaults"], |
| 1470 | name: "libc_common_static", |
Haibo Huang | b9244ff | 2018-08-11 10:12:13 -0700 | [diff] [blame] | 1471 | |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1472 | whole_static_libs: [ |
| 1473 | "libc_common", |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1474 | "libc_static_dispatch", |
| 1475 | ], |
| 1476 | } |
| 1477 | |
| 1478 | // ======================================================== |
| 1479 | // libc_common_shared.a For shared libraries. |
| 1480 | // ======================================================== |
| 1481 | cc_library_static { |
| 1482 | defaults: ["libc_defaults"], |
| 1483 | name: "libc_common_shared", |
| 1484 | |
| 1485 | whole_static_libs: [ |
| 1486 | "libc_common", |
| 1487 | "libc_dynamic_dispatch", |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1488 | ], |
| 1489 | } |
| 1490 | |
Ryan Prichard | 22a6a05 | 2019-10-10 23:59:30 -0700 | [diff] [blame] | 1491 | // Versions of dl_iterate_phdr and similar APIs used to lookup unwinding information in a static |
| 1492 | // executable. |
| 1493 | cc_library_static { |
| 1494 | name: "libc_unwind_static", |
| 1495 | defaults: ["libc_defaults"], |
| 1496 | cflags: ["-DLIBC_STATIC"], |
| 1497 | |
| 1498 | srcs: ["bionic/dl_iterate_phdr_static.cpp"], |
| 1499 | arch: { |
| 1500 | // arm32-specific dl_unwind_find_exidx and __gnu_Unwind_Find_exidx APIs |
| 1501 | arm: { |
| 1502 | srcs: ["arch-arm/bionic/exidx_static.c"], |
| 1503 | }, |
| 1504 | }, |
| 1505 | } |
| 1506 | |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1507 | // ======================================================== |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1508 | // libc_nomalloc.a |
| 1509 | // ======================================================== |
| 1510 | // |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1511 | // This is a version of the static C library used by the dynamic linker that exclude malloc. It also |
| 1512 | // excludes functions selected using ifunc's (e.g. for string.h). Link in either |
| 1513 | // libc_static_dispatch or libc_dynamic_dispatch to provide those functions. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1514 | |
| 1515 | cc_library_static { |
Dimitry Ivanov | fc0d480 | 2016-12-06 11:10:09 -0800 | [diff] [blame] | 1516 | name: "libc_nomalloc", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1517 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1518 | |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 1519 | whole_static_libs: [ |
Ryan Prichard | 249757b | 2019-11-01 17:18:28 -0700 | [diff] [blame] | 1520 | "libc_common", |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 1521 | "libc_init_static", |
Ryan Prichard | 22a6a05 | 2019-10-10 23:59:30 -0700 | [diff] [blame] | 1522 | "libc_unwind_static", |
Colin Cross | a3f9fca | 2016-01-11 13:20:55 -0800 | [diff] [blame] | 1523 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1524 | } |
| 1525 | |
dimitry | c0c0ef6 | 2018-12-05 16:33:52 +0100 | [diff] [blame] | 1526 | filegroup { |
| 1527 | name: "libc_sources_shared", |
| 1528 | srcs: [ |
| 1529 | "arch-common/bionic/crtbegin_so.c", |
| 1530 | "arch-common/bionic/crtbrand.S", |
Mitch Phillips | f3968e8 | 2020-01-31 19:57:04 -0800 | [diff] [blame] | 1531 | "bionic/gwp_asan_wrappers.cpp", |
Peter Collingbourne | 1e110fb | 2020-01-09 10:48:22 -0800 | [diff] [blame] | 1532 | "bionic/heap_tagging.cpp", |
dimitry | c0c0ef6 | 2018-12-05 16:33:52 +0100 | [diff] [blame] | 1533 | "bionic/icu.cpp", |
| 1534 | "bionic/malloc_common.cpp", |
Christopher Ferris | e4cdbc4 | 2019-02-08 17:30:58 -0800 | [diff] [blame] | 1535 | "bionic/malloc_common_dynamic.cpp", |
Ryan Savitski | 175c886 | 2020-01-02 19:54:57 +0000 | [diff] [blame] | 1536 | "bionic/android_profiling_dynamic.cpp", |
Christopher Ferris | e4cdbc4 | 2019-02-08 17:30:58 -0800 | [diff] [blame] | 1537 | "bionic/malloc_heapprofd.cpp", |
Christopher Ferris | 1fc5ccf | 2019-02-15 18:06:15 -0800 | [diff] [blame] | 1538 | "bionic/malloc_limit.cpp", |
Peter Collingbourne | 570de33 | 2019-12-11 10:00:58 -0800 | [diff] [blame] | 1539 | "bionic/ndk_cruft.cpp", |
| 1540 | "bionic/ndk_cruft_data.cpp", |
dimitry | c0c0ef6 | 2018-12-05 16:33:52 +0100 | [diff] [blame] | 1541 | "bionic/NetdClient.cpp", |
| 1542 | "arch-common/bionic/crtend_so.S", |
| 1543 | ], |
| 1544 | } |
| 1545 | |
| 1546 | filegroup { |
| 1547 | name: "libc_sources_static", |
| 1548 | srcs: [ |
Mitch Phillips | f3968e8 | 2020-01-31 19:57:04 -0800 | [diff] [blame] | 1549 | "bionic/gwp_asan_wrappers.cpp", |
Peter Collingbourne | 1e110fb | 2020-01-09 10:48:22 -0800 | [diff] [blame] | 1550 | "bionic/heap_tagging.cpp", |
dimitry | c0c0ef6 | 2018-12-05 16:33:52 +0100 | [diff] [blame] | 1551 | "bionic/malloc_common.cpp", |
Christopher Ferris | 1fc5ccf | 2019-02-15 18:06:15 -0800 | [diff] [blame] | 1552 | "bionic/malloc_limit.cpp", |
dimitry | c0c0ef6 | 2018-12-05 16:33:52 +0100 | [diff] [blame] | 1553 | ], |
| 1554 | } |
| 1555 | |
| 1556 | filegroup { |
| 1557 | name: "libc_sources_shared_arm", |
| 1558 | srcs: [ |
| 1559 | "arch-arm/bionic/exidx_dynamic.c", |
| 1560 | "arch-arm/bionic/atexit_legacy.c", |
| 1561 | ], |
| 1562 | } |
| 1563 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1564 | // ======================================================== |
| 1565 | // libc.a + libc.so |
| 1566 | // ======================================================== |
Florian Mayer | c10d064 | 2023-03-22 16:12:49 -0700 | [diff] [blame] | 1567 | cc_defaults { |
Christopher Ferris | e55e5ee | 2019-10-01 17:54:42 -0700 | [diff] [blame] | 1568 | defaults: [ |
| 1569 | "libc_defaults", |
| 1570 | "libc_native_allocator_defaults", |
| 1571 | ], |
Florian Mayer | c10d064 | 2023-03-22 16:12:49 -0700 | [diff] [blame] | 1572 | name: "libc_library_defaults", |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1573 | product_variables: { |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1574 | platform_sdk_version: { |
| 1575 | asflags: ["-DPLATFORM_SDK_VERSION=%d"], |
| 1576 | }, |
| 1577 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1578 | static: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 1579 | srcs: [":libc_sources_static"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1580 | cflags: ["-DLIBC_STATIC"], |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1581 | whole_static_libs: [ |
Mitch Phillips | f3968e8 | 2020-01-31 19:57:04 -0800 | [diff] [blame] | 1582 | "gwp_asan", |
Mitch Phillips | a493fe4 | 2023-01-19 12:47:22 -0800 | [diff] [blame] | 1583 | "gwp_asan_crash_handler", |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1584 | "libc_init_static", |
| 1585 | "libc_common_static", |
Ryan Prichard | 22a6a05 | 2019-10-10 23:59:30 -0700 | [diff] [blame] | 1586 | "libc_unwind_static", |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1587 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1588 | }, |
| 1589 | shared: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 1590 | srcs: [":libc_sources_shared"], |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1591 | whole_static_libs: [ |
Mitch Phillips | f3968e8 | 2020-01-31 19:57:04 -0800 | [diff] [blame] | 1592 | "gwp_asan", |
Mitch Phillips | a493fe4 | 2023-01-19 12:47:22 -0800 | [diff] [blame] | 1593 | "gwp_asan_crash_handler", |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1594 | "libc_init_dynamic", |
| 1595 | "libc_common_shared", |
Ryan Prichard | cdf7175 | 2020-12-16 03:37:22 -0800 | [diff] [blame] | 1596 | "libunwind-exported", |
Haibo Huang | f71edfa | 2018-11-12 10:06:56 -0800 | [diff] [blame] | 1597 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1598 | }, |
| 1599 | |
Neil Fuller | a7db90f | 2019-04-25 09:28:27 +0100 | [diff] [blame] | 1600 | required: [ |
MarkDacek | d88d7ea | 2022-06-28 20:14:58 +0000 | [diff] [blame] | 1601 | "tzdata_prebuilt", |
| 1602 | "tz_version_prebuilt", // Version metadata for tzdata to help debugging. |
Neil Fuller | a7db90f | 2019-04-25 09:28:27 +0100 | [diff] [blame] | 1603 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1604 | |
Colin Cross | 4ce94d2 | 2016-11-15 13:15:43 -0800 | [diff] [blame] | 1605 | // Do not pack libc.so relocations; see http://b/20645321 for details. |
| 1606 | pack_relocations: false, |
| 1607 | |
dimitry | 06016f2 | 2018-01-05 11:39:28 +0100 | [diff] [blame] | 1608 | // WARNING: The only libraries libc.so should depend on are libdl.so and ld-android.so! |
| 1609 | // If you add other libraries, make sure to add -Wl,--exclude-libs=libgcc.a to the |
| 1610 | // LOCAL_LDFLAGS for those libraries. This ensures that symbols that are pulled into |
| 1611 | // those new libraries from libgcc.a are not declared external; if that were the case, |
| 1612 | // then libc would not pull those symbols from libgcc.a as it should, instead relying |
| 1613 | // on the external symbols from the dependent libraries. That would create a "cloaked" |
| 1614 | // dependency on libgcc.a in libc though the libraries, which is not what you wanted! |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1615 | |
dimitry | 06016f2 | 2018-01-05 11:39:28 +0100 | [diff] [blame] | 1616 | shared_libs: [ |
| 1617 | "ld-android", |
| 1618 | "libdl", |
| 1619 | ], |
Jiyong Park | 3ff116a | 2019-04-02 23:04:52 +0900 | [diff] [blame] | 1620 | static_libs: [ |
| 1621 | "libdl_android", |
| 1622 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1623 | |
| 1624 | nocrt: true, |
| 1625 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1626 | arch: { |
| 1627 | arm: { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1628 | // TODO: This is to work around b/24465209. Remove after root cause is fixed. |
Chih-Hung Hsieh | ecbff83 | 2018-05-23 18:45:53 -0700 | [diff] [blame] | 1629 | pack_relocations: false, |
Christopher Ferris | 9d03a16 | 2023-11-10 11:19:11 -0800 | [diff] [blame] | 1630 | ldflags: [ |
| 1631 | "-Wl,--hash-style=both", |
| 1632 | // Since we are preserving the debug_frame, do not compress |
| 1633 | // in this case to make unwinds as fast as possible. |
| 1634 | "-Wl,--compress-debug-sections=none", |
| 1635 | ], |
Ian Pedowitz | b6310c2 | 2018-01-18 16:26:19 -0800 | [diff] [blame] | 1636 | |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1637 | version_script: ":libc.arm.map", |
Ryan Prichard | c22562c | 2021-01-27 17:27:31 -0800 | [diff] [blame] | 1638 | no_libcrt: true, |
Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1639 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1640 | shared: { |
dimitry | c0c0ef6 | 2018-12-05 16:33:52 +0100 | [diff] [blame] | 1641 | srcs: [":libc_sources_shared_arm"], |
Dan Willemsen | 0c65708 | 2016-05-12 01:43:07 -0700 | [diff] [blame] | 1642 | // special for arm |
| 1643 | cflags: ["-DCRT_LEGACY_WORKAROUND"], |
Ryan Prichard | c22562c | 2021-01-27 17:27:31 -0800 | [diff] [blame] | 1644 | // For backwards-compatibility, some arm32 builtins are exported from libc.so. |
Colin Cross | 335e27b | 2022-02-10 11:37:28 -0800 | [diff] [blame] | 1645 | static_libs: ["libclang_rt.builtins-exported"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1646 | }, |
Christopher Ferris | 0c0f6fb | 2019-05-17 16:22:56 -0700 | [diff] [blame] | 1647 | |
| 1648 | // Arm 32 bit does not produce complete exidx unwind information |
| 1649 | // so keep the .debug_frame which is relatively small and does |
| 1650 | // include needed unwind information. |
| 1651 | // See b/132992102 for details. |
| 1652 | strip: { |
| 1653 | keep_symbols_and_debug_frame: true, |
| 1654 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1655 | }, |
Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1656 | arm64: { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1657 | version_script: ":libc.arm64.map", |
Christopher Ferris | 0c0f6fb | 2019-05-17 16:22:56 -0700 | [diff] [blame] | 1658 | |
| 1659 | // Leave the symbols in the shared library so that stack unwinders can produce |
| 1660 | // meaningful name resolution. |
| 1661 | strip: { |
| 1662 | keep_symbols: true, |
| 1663 | }, |
Dan Willemsen | 9e6f98f | 2015-11-03 14:30:57 -0800 | [diff] [blame] | 1664 | }, |
Elliott Hughes | 604ab0f | 2022-10-17 19:58:22 +0000 | [diff] [blame] | 1665 | riscv64: { |
| 1666 | version_script: ":libc.riscv64.map", |
| 1667 | |
| 1668 | // Leave the symbols in the shared library so that stack unwinders can produce |
| 1669 | // meaningful name resolution. |
| 1670 | strip: { |
| 1671 | keep_symbols: true, |
| 1672 | }, |
| 1673 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1674 | x86: { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1675 | // TODO: This is to work around b/24465209. Remove after root cause is fixed. |
Chih-Hung Hsieh | ecbff83 | 2018-05-23 18:45:53 -0700 | [diff] [blame] | 1676 | pack_relocations: false, |
Ian Pedowitz | b6310c2 | 2018-01-18 16:26:19 -0800 | [diff] [blame] | 1677 | ldflags: ["-Wl,--hash-style=both"], |
| 1678 | |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1679 | version_script: ":libc.x86.map", |
Ryan Prichard | c22562c | 2021-01-27 17:27:31 -0800 | [diff] [blame] | 1680 | no_libcrt: true, |
| 1681 | |
| 1682 | shared: { |
| 1683 | // For backwards-compatibility, some x86 builtins are exported from libc.so. |
Colin Cross | 335e27b | 2022-02-10 11:37:28 -0800 | [diff] [blame] | 1684 | static_libs: ["libclang_rt.builtins-exported"], |
Ryan Prichard | c22562c | 2021-01-27 17:27:31 -0800 | [diff] [blame] | 1685 | }, |
Christopher Ferris | 0c0f6fb | 2019-05-17 16:22:56 -0700 | [diff] [blame] | 1686 | |
| 1687 | // Leave the symbols in the shared library so that stack unwinders can produce |
| 1688 | // meaningful name resolution. |
| 1689 | strip: { |
| 1690 | keep_symbols: true, |
| 1691 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1692 | }, |
| 1693 | x86_64: { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1694 | version_script: ":libc.x86_64.map", |
Christopher Ferris | 0c0f6fb | 2019-05-17 16:22:56 -0700 | [diff] [blame] | 1695 | |
| 1696 | // Leave the symbols in the shared library so that stack unwinders can produce |
| 1697 | // meaningful name resolution. |
| 1698 | strip: { |
| 1699 | keep_symbols: true, |
| 1700 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1701 | }, |
| 1702 | }, |
Jiyong Park | c45fe9f | 2018-12-13 18:26:48 +0900 | [diff] [blame] | 1703 | |
Jiyong Park | e87e0dc | 2019-10-02 17:09:33 +0900 | [diff] [blame] | 1704 | apex_available: [ |
| 1705 | "//apex_available:platform", |
| 1706 | "com.android.runtime", |
| 1707 | ], |
| 1708 | |
Colin Cross | 7edd008 | 2021-10-28 13:20:35 -0700 | [diff] [blame] | 1709 | target: { |
| 1710 | native_bridge: { |
| 1711 | shared: { |
| 1712 | installable: false, |
| 1713 | }, |
| 1714 | }, |
| 1715 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1716 | } |
| 1717 | |
Florian Mayer | c10d064 | 2023-03-22 16:12:49 -0700 | [diff] [blame] | 1718 | cc_library { |
| 1719 | name: "libc", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 1720 | defaults: [ |
Florian Mayer | c10d064 | 2023-03-22 16:12:49 -0700 | [diff] [blame] | 1721 | "libc_library_defaults", |
| 1722 | ], |
| 1723 | stubs: { |
| 1724 | symbol_file: "libc.map.txt", |
| 1725 | versions: [ |
| 1726 | "29", |
| 1727 | "R", |
| 1728 | "current", |
| 1729 | ], |
| 1730 | }, |
| 1731 | static_ndk_lib: true, |
| 1732 | llndk: { |
| 1733 | symbol_file: "libc.map.txt", |
| 1734 | export_headers_as_system: true, |
| 1735 | export_preprocessed_headers: ["include"], |
| 1736 | export_llndk_headers: ["libc_llndk_headers"], |
| 1737 | }, |
| 1738 | } |
| 1739 | |
| 1740 | cc_library { |
| 1741 | name: "libc_hwasan", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 1742 | defaults: [ |
Florian Mayer | c10d064 | 2023-03-22 16:12:49 -0700 | [diff] [blame] | 1743 | "libc_library_defaults", |
| 1744 | ], |
| 1745 | sanitize: { |
| 1746 | hwaddress: true, |
| 1747 | }, |
| 1748 | enabled: false, |
Florian Mayer | ff116ed | 2023-04-14 17:38:53 -0700 | [diff] [blame] | 1749 | target: { |
| 1750 | android_arm64: { |
Florian Mayer | c10d064 | 2023-03-22 16:12:49 -0700 | [diff] [blame] | 1751 | enabled: true, |
| 1752 | }, |
| 1753 | }, |
| 1754 | stem: "libc", |
| 1755 | relative_install_path: "hwasan", |
| 1756 | // We don't really need the stubs, but this needs to stay to trigger the |
| 1757 | // symlink logic in soong. |
| 1758 | stubs: { |
| 1759 | symbol_file: "libc.map.txt", |
| 1760 | }, |
| 1761 | native_bridge_supported: false, |
| 1762 | // It is never correct to depend on this directly. This is only |
| 1763 | // needed for the runtime apex, and in base_system.mk. |
| 1764 | visibility: ["//bionic/apex"], |
| 1765 | } |
| 1766 | |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1767 | genrule { |
| 1768 | name: "libc.arm.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1769 | out: ["libc.arm.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1770 | srcs: ["libc.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1771 | tools: ["generate-version-script"], |
| 1772 | cmd: "$(location generate-version-script) arm $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1773 | } |
| 1774 | |
| 1775 | genrule { |
| 1776 | name: "libc.arm64.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1777 | out: ["libc.arm64.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1778 | srcs: ["libc.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1779 | tools: ["generate-version-script"], |
| 1780 | cmd: "$(location generate-version-script) arm64 $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1781 | } |
| 1782 | |
| 1783 | genrule { |
Elliott Hughes | 604ab0f | 2022-10-17 19:58:22 +0000 | [diff] [blame] | 1784 | name: "libc.riscv64.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1785 | out: ["libc.riscv64.map.txt"], |
Elliott Hughes | 604ab0f | 2022-10-17 19:58:22 +0000 | [diff] [blame] | 1786 | srcs: ["libc.map.txt"], |
| 1787 | tools: ["generate-version-script"], |
| 1788 | cmd: "$(location generate-version-script) riscv64 $(in) $(out)", |
| 1789 | } |
| 1790 | |
| 1791 | genrule { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1792 | name: "libc.x86.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1793 | out: ["libc.x86.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1794 | srcs: ["libc.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1795 | tools: ["generate-version-script"], |
| 1796 | cmd: "$(location generate-version-script) x86 $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1797 | } |
| 1798 | |
| 1799 | genrule { |
| 1800 | name: "libc.x86_64.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 1801 | out: ["libc.x86_64.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1802 | srcs: ["libc.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 1803 | tools: ["generate-version-script"], |
| 1804 | cmd: "$(location generate-version-script) x86_64 $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1805 | } |
| 1806 | |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 1807 | // Headers that only other parts of the platform can include. |
| 1808 | cc_library_headers { |
| 1809 | name: "bionic_libc_platform_headers", |
Martin Stjernholm | a276343 | 2020-04-23 16:47:19 +0100 | [diff] [blame] | 1810 | defaults: ["linux_bionic_supported"], |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 1811 | visibility: [ |
Christopher Ferris | c5d3a43 | 2019-09-25 17:50:36 -0700 | [diff] [blame] | 1812 | "//art:__subpackages__", |
Josh Gao | 9727192 | 2019-11-06 13:15:00 -0800 | [diff] [blame] | 1813 | "//bionic:__subpackages__", |
Christopher Ferris | c5d3a43 | 2019-09-25 17:50:36 -0700 | [diff] [blame] | 1814 | "//frameworks:__subpackages__", |
Roman Kiryanov | 067f518 | 2020-05-07 14:58:30 -0700 | [diff] [blame] | 1815 | "//device/generic/goldfish-opengl:__subpackages__", |
Mitch Phillips | 3309b3d | 2020-03-25 15:05:48 -0700 | [diff] [blame] | 1816 | "//external/gwp_asan:__subpackages__", |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 1817 | "//external/perfetto:__subpackages__", |
Christopher Ferris | c5d3a43 | 2019-09-25 17:50:36 -0700 | [diff] [blame] | 1818 | "//external/scudo:__subpackages__", |
Josh Gao | 5074e7d | 2019-12-13 13:55:53 -0800 | [diff] [blame] | 1819 | "//system/core/debuggerd:__subpackages__", |
Florian Mayer | f5d70ce | 2022-09-13 13:58:30 -0700 | [diff] [blame] | 1820 | "//system/core/init:__subpackages__", |
Steven Moreland | 0cdf132 | 2020-10-05 21:55:26 +0000 | [diff] [blame] | 1821 | "//system/core/libcutils:__subpackages__", |
Peter Collingbourne | 6a363f7 | 2020-01-13 10:39:33 -0800 | [diff] [blame] | 1822 | "//system/memory/libmemunreachable:__subpackages__", |
Baligh Uddin | db0c6de | 2020-10-15 04:49:00 +0000 | [diff] [blame] | 1823 | "//system/unwinding/libunwindstack:__subpackages__", |
Peter Collingbourne | 1541800 | 2020-05-12 16:02:50 -0700 | [diff] [blame] | 1824 | "//tools/security/sanitizer-status:__subpackages__", |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 1825 | ], |
Peter Collingbourne | 6a363f7 | 2020-01-13 10:39:33 -0800 | [diff] [blame] | 1826 | vendor_available: true, |
Justin Yun | 869a0fa | 2020-11-11 15:16:11 +0900 | [diff] [blame] | 1827 | product_available: true, |
Yifan Hong | 5a39cee | 2020-01-21 16:43:56 -0800 | [diff] [blame] | 1828 | ramdisk_available: true, |
Yifan Hong | b04490d | 2020-10-21 18:36:36 -0700 | [diff] [blame] | 1829 | vendor_ramdisk_available: true, |
Christopher Ferris | c5d3a43 | 2019-09-25 17:50:36 -0700 | [diff] [blame] | 1830 | recovery_available: true, |
| 1831 | native_bridge_supported: true, |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 1832 | export_include_dirs: [ |
| 1833 | "platform", |
| 1834 | ], |
Christopher Ferris | e55e5ee | 2019-10-01 17:54:42 -0700 | [diff] [blame] | 1835 | system_shared_libs: [], |
| 1836 | stl: "none", |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 1837 | sdk_version: "current", |
Jiyong Park | 4ede160 | 2020-04-28 18:21:08 +0900 | [diff] [blame] | 1838 | |
Steven Moreland | 0cdf132 | 2020-10-05 21:55:26 +0000 | [diff] [blame] | 1839 | min_sdk_version: "29", |
Jiyong Park | 4ede160 | 2020-04-28 18:21:08 +0900 | [diff] [blame] | 1840 | apex_available: [ |
| 1841 | "//apex_available:platform", |
Steven Moreland | 0cdf132 | 2020-10-05 21:55:26 +0000 | [diff] [blame] | 1842 | "//apex_available:anyapex", |
Jiyong Park | 4ede160 | 2020-04-28 18:21:08 +0900 | [diff] [blame] | 1843 | ], |
Christopher Ferris | 2b0638e | 2019-09-11 19:05:29 -0700 | [diff] [blame] | 1844 | } |
| 1845 | |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1846 | cc_library_headers { |
Colin Cross | a0a4a6c | 2021-03-02 10:23:04 -0800 | [diff] [blame] | 1847 | name: "libc_llndk_headers", |
Colin Cross | 5d50dbb | 2021-06-29 11:35:29 -0700 | [diff] [blame] | 1848 | visibility: [ |
| 1849 | "//external/musl", |
| 1850 | ], |
Colin Cross | a0a4a6c | 2021-03-02 10:23:04 -0800 | [diff] [blame] | 1851 | llndk: { |
| 1852 | llndk_headers: true, |
| 1853 | }, |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1854 | host_supported: true, |
| 1855 | vendor_available: true, |
Justin Yun | 869a0fa | 2020-11-11 15:16:11 +0900 | [diff] [blame] | 1856 | product_available: true, |
Yifan Hong | 5a39cee | 2020-01-21 16:43:56 -0800 | [diff] [blame] | 1857 | ramdisk_available: true, |
Yifan Hong | b04490d | 2020-10-21 18:36:36 -0700 | [diff] [blame] | 1858 | vendor_ramdisk_available: true, |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1859 | recovery_available: true, |
dimitry | 7f04880 | 2019-05-03 15:57:34 +0200 | [diff] [blame] | 1860 | native_bridge_supported: true, |
Jiyong Park | 922a5c7 | 2020-03-07 17:35:02 +0900 | [diff] [blame] | 1861 | apex_available: [ |
| 1862 | "//apex_available:platform", |
Jiyong Park | ad9946c | 2020-03-30 18:36:07 +0900 | [diff] [blame] | 1863 | "//apex_available:anyapex", |
| 1864 | ], |
Jooyung Han | 15c32a8 | 2020-04-16 18:26:45 +0900 | [diff] [blame] | 1865 | // used by most APEXes indirectly via libunwind_llvm |
| 1866 | min_sdk_version: "apex_inherit", |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1867 | |
| 1868 | no_libcrt: true, |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1869 | stl: "none", |
| 1870 | system_shared_libs: [], |
| 1871 | |
Peter Collingbourne | f2b1e03 | 2019-12-10 17:41:16 -0800 | [diff] [blame] | 1872 | // The build system generally requires that any dependencies of a target |
| 1873 | // with an sdk_version must have a lower sdk_version. By setting sdk_version |
| 1874 | // to 1 we let targets with an sdk_version that need to depend on the libc |
| 1875 | // headers but cannot depend on libc itself due to circular dependencies |
| 1876 | // (such as libunwind_llvm) depend on the headers. Setting sdk_version to 1 |
| 1877 | // is correct because the headers can support any sdk_version. |
| 1878 | sdk_version: "1", |
| 1879 | |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1880 | export_system_include_dirs: [ |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1881 | "kernel/uapi", |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1882 | "kernel/android/scsi", |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1883 | "kernel/android/uapi", |
| 1884 | ], |
| 1885 | |
| 1886 | arch: { |
| 1887 | arm: { |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1888 | export_system_include_dirs: ["kernel/uapi/asm-arm"], |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1889 | }, |
| 1890 | arm64: { |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1891 | export_system_include_dirs: ["kernel/uapi/asm-arm64"], |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1892 | }, |
Elliott Hughes | 48e5333 | 2022-10-07 20:39:25 +0000 | [diff] [blame] | 1893 | riscv64: { |
| 1894 | export_system_include_dirs: ["kernel/uapi/asm-riscv"], |
| 1895 | }, |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1896 | x86: { |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1897 | export_system_include_dirs: ["kernel/uapi/asm-x86"], |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1898 | }, |
| 1899 | x86_64: { |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1900 | export_system_include_dirs: ["kernel/uapi/asm-x86"], |
Logan Chien | 17af91b | 2019-01-15 21:19:56 +0800 | [diff] [blame] | 1901 | }, |
| 1902 | }, |
| 1903 | } |
| 1904 | |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1905 | cc_library_headers { |
| 1906 | name: "libc_headers", |
| 1907 | host_supported: true, |
| 1908 | native_bridge_supported: true, |
| 1909 | vendor_available: true, |
Justin Yun | 869a0fa | 2020-11-11 15:16:11 +0900 | [diff] [blame] | 1910 | product_available: true, |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1911 | ramdisk_available: true, |
Yifan Hong | b04490d | 2020-10-21 18:36:36 -0700 | [diff] [blame] | 1912 | vendor_ramdisk_available: true, |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1913 | recovery_available: true, |
| 1914 | sdk_version: "1", |
| 1915 | |
| 1916 | apex_available: [ |
| 1917 | "//apex_available:platform", |
| 1918 | "//apex_available:anyapex", |
| 1919 | ], |
| 1920 | // used by most APEXes indirectly via libunwind_llvm |
| 1921 | min_sdk_version: "apex_inherit", |
| 1922 | visibility: [ |
| 1923 | "//bionic:__subpackages__", // visible to bionic |
| 1924 | // ... and only to these places (b/152668052) |
| 1925 | "//external/arm-optimized-routines", |
| 1926 | "//external/gwp_asan", |
| 1927 | "//external/jemalloc_new", |
| 1928 | "//external/libunwind_llvm", |
| 1929 | "//external/scudo", |
| 1930 | "//system/core/property_service/libpropertyinfoparser", |
| 1931 | "//system/extras/toolchain-extras", |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1932 | ], |
| 1933 | |
| 1934 | stl: "none", |
| 1935 | no_libcrt: true, |
| 1936 | system_shared_libs: [], |
| 1937 | |
| 1938 | target: { |
| 1939 | android: { |
Colin Cross | a0a4a6c | 2021-03-02 10:23:04 -0800 | [diff] [blame] | 1940 | export_system_include_dirs: ["include"], |
| 1941 | header_libs: ["libc_llndk_headers"], |
| 1942 | export_header_lib_headers: ["libc_llndk_headers"], |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1943 | }, |
| 1944 | linux_bionic: { |
Colin Cross | a0a4a6c | 2021-03-02 10:23:04 -0800 | [diff] [blame] | 1945 | export_system_include_dirs: ["include"], |
| 1946 | header_libs: ["libc_llndk_headers"], |
| 1947 | export_header_lib_headers: ["libc_llndk_headers"], |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1948 | }, |
Rupert Shuttleworth | fd64868 | 2021-02-16 03:27:05 +0000 | [diff] [blame] | 1949 | }, |
Martin Stjernholm | 82d84bc | 2020-04-06 20:32:09 +0100 | [diff] [blame] | 1950 | } |
| 1951 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1952 | // ======================================================== |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1953 | // libstdc++.so and libstdc++.a. |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1954 | // ======================================================== |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1955 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1956 | cc_library { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 1957 | defaults: ["libc_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1958 | include_dirs: ["bionic/libstdc++/include"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1959 | srcs: [ |
| 1960 | "bionic/__cxa_guard.cpp", |
| 1961 | "bionic/__cxa_pure_virtual.cpp", |
| 1962 | "bionic/new.cpp", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1963 | ], |
| 1964 | name: "libstdc++", |
Dan Albert | 40f15ec | 2017-10-27 11:21:20 -0700 | [diff] [blame] | 1965 | static_ndk_lib: true, |
Isaac Chen | 5e7c90b | 2017-09-20 14:44:42 +0800 | [diff] [blame] | 1966 | static_libs: ["libasync_safe"], |
Elliott Hughes | c204334 | 2023-07-20 20:24:09 +0000 | [diff] [blame] | 1967 | apex_available: [ |
| 1968 | "//apex_available:platform", |
| 1969 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1970 | |
Dan Willemsen | 6b3be17 | 2018-12-03 13:57:20 -0800 | [diff] [blame] | 1971 | static: { |
| 1972 | system_shared_libs: [], |
| 1973 | }, |
Colin Cross | b5bfe0b | 2021-07-13 16:26:28 -0700 | [diff] [blame] | 1974 | target: { |
| 1975 | bionic: { |
| 1976 | shared: { |
| 1977 | system_shared_libs: ["libc"], |
| 1978 | }, |
| 1979 | }, |
Dan Willemsen | 6b3be17 | 2018-12-03 13:57:20 -0800 | [diff] [blame] | 1980 | }, |
| 1981 | |
Ian Pedowitz | b6310c2 | 2018-01-18 16:26:19 -0800 | [diff] [blame] | 1982 | //TODO (dimitry): This is to work around b/24465209. Remove after root cause is fixed |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1983 | arch: { |
| 1984 | arm: { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1985 | // TODO: This is to work around b/24465209. Remove after root cause is fixed. |
Chih-Hung Hsieh | ecbff83 | 2018-05-23 18:45:53 -0700 | [diff] [blame] | 1986 | pack_relocations: false, |
Ian Pedowitz | b6310c2 | 2018-01-18 16:26:19 -0800 | [diff] [blame] | 1987 | ldflags: ["-Wl,--hash-style=both"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1988 | version_script: ":libstdc++.arm.map", |
Dimitry Ivanov | 6cc8d47 | 2016-07-28 13:52:17 -0700 | [diff] [blame] | 1989 | }, |
| 1990 | arm64: { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1991 | version_script: ":libstdc++.arm64.map", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1992 | }, |
Elliott Hughes | 604ab0f | 2022-10-17 19:58:22 +0000 | [diff] [blame] | 1993 | riscv64: { |
| 1994 | version_script: ":libstdc++.riscv64.map", |
| 1995 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 1996 | x86: { |
Chih-Hung Hsieh | ecbff83 | 2018-05-23 18:45:53 -0700 | [diff] [blame] | 1997 | pack_relocations: false, |
Ian Pedowitz | b6310c2 | 2018-01-18 16:26:19 -0800 | [diff] [blame] | 1998 | ldflags: ["-Wl,--hash-style=both"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 1999 | version_script: ":libstdc++.x86.map", |
Dimitry Ivanov | 6cc8d47 | 2016-07-28 13:52:17 -0700 | [diff] [blame] | 2000 | }, |
| 2001 | x86_64: { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2002 | version_script: ":libstdc++.x86_64.map", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2003 | }, |
| 2004 | }, |
| 2005 | } |
| 2006 | |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2007 | genrule { |
| 2008 | name: "libstdc++.arm.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 2009 | out: ["libstdc++.arm.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2010 | srcs: ["libstdc++.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 2011 | tools: ["generate-version-script"], |
| 2012 | cmd: "$(location generate-version-script) arm $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2013 | } |
| 2014 | |
| 2015 | genrule { |
| 2016 | name: "libstdc++.arm64.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 2017 | out: ["libstdc++.arm64.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2018 | srcs: ["libstdc++.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 2019 | tools: ["generate-version-script"], |
| 2020 | cmd: "$(location generate-version-script) arm64 $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2021 | } |
| 2022 | |
| 2023 | genrule { |
Elliott Hughes | 604ab0f | 2022-10-17 19:58:22 +0000 | [diff] [blame] | 2024 | name: "libstdc++.riscv64.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 2025 | out: ["libstdc++.riscv64.map.txt"], |
Elliott Hughes | 604ab0f | 2022-10-17 19:58:22 +0000 | [diff] [blame] | 2026 | srcs: ["libstdc++.map.txt"], |
| 2027 | tools: ["generate-version-script"], |
| 2028 | cmd: "$(location generate-version-script) riscv64 $(in) $(out)", |
| 2029 | } |
| 2030 | |
| 2031 | genrule { |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2032 | name: "libstdc++.x86.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 2033 | out: ["libstdc++.x86.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2034 | srcs: ["libstdc++.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 2035 | tools: ["generate-version-script"], |
| 2036 | cmd: "$(location generate-version-script) x86 $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2037 | } |
| 2038 | |
| 2039 | genrule { |
| 2040 | name: "libstdc++.x86_64.map", |
Cole Faust | f5968d8 | 2023-04-11 15:20:19 -0700 | [diff] [blame] | 2041 | out: ["libstdc++.x86_64.map.txt"], |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2042 | srcs: ["libstdc++.map.txt"], |
Elliott Hughes | 291f98a | 2022-06-30 23:35:11 +0000 | [diff] [blame] | 2043 | tools: ["generate-version-script"], |
| 2044 | cmd: "$(location generate-version-script) x86_64 $(in) $(out)", |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2045 | } |
| 2046 | |
| 2047 | // ======================================================== |
| 2048 | // crt object files. |
| 2049 | // ======================================================== |
| 2050 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2051 | cc_defaults { |
Colin Cross | 10d9268 | 2021-06-22 13:25:46 -0700 | [diff] [blame] | 2052 | name: "crt_and_memtag_defaults", |
Dan Willemsen | 7ec52b1 | 2016-11-28 17:02:25 -0800 | [diff] [blame] | 2053 | defaults: ["linux_bionic_supported"], |
Dan Willemsen | 230a7a4 | 2017-04-07 14:09:05 -0700 | [diff] [blame] | 2054 | vendor_available: true, |
Justin Yun | 869a0fa | 2020-11-11 15:16:11 +0900 | [diff] [blame] | 2055 | product_available: true, |
Yifan Hong | 5a39cee | 2020-01-21 16:43:56 -0800 | [diff] [blame] | 2056 | ramdisk_available: true, |
Yifan Hong | b04490d | 2020-10-21 18:36:36 -0700 | [diff] [blame] | 2057 | vendor_ramdisk_available: true, |
Jiyong Park | 5603c6e | 2018-04-27 21:53:11 +0900 | [diff] [blame] | 2058 | recovery_available: true, |
dimitry | 7f04880 | 2019-05-03 15:57:34 +0200 | [diff] [blame] | 2059 | native_bridge_supported: true, |
Jiyong Park | 922a5c7 | 2020-03-07 17:35:02 +0900 | [diff] [blame] | 2060 | apex_available: [ |
| 2061 | "//apex_available:platform", |
| 2062 | "//apex_available:anyapex", |
| 2063 | ], |
Dan Albert | dc503f6 | 2020-07-15 17:22:18 -0700 | [diff] [blame] | 2064 | // Generate NDK variants of the CRT objects for every supported API level. |
| 2065 | min_sdk_version: "16", |
| 2066 | stl: "none", |
| 2067 | crt: true, |
Elliott Hughes | d50a1de | 2018-02-05 17:30:57 -0800 | [diff] [blame] | 2068 | cflags: [ |
| 2069 | "-Wno-gcc-compat", |
| 2070 | "-Wall", |
| 2071 | "-Werror", |
| 2072 | ], |
Peter Collingbourne | 7eb851c | 2019-09-26 12:16:06 -0700 | [diff] [blame] | 2073 | sanitize: { |
| 2074 | never: true, |
| 2075 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2076 | } |
| 2077 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2078 | cc_defaults { |
Colin Cross | 10d9268 | 2021-06-22 13:25:46 -0700 | [diff] [blame] | 2079 | name: "crt_defaults", |
| 2080 | defaults: ["crt_and_memtag_defaults"], |
Colin Cross | 02f8137 | 2021-07-22 12:02:10 -0700 | [diff] [blame] | 2081 | system_shared_libs: [], |
Colin Cross | 10d9268 | 2021-06-22 13:25:46 -0700 | [diff] [blame] | 2082 | } |
| 2083 | |
| 2084 | cc_defaults { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2085 | name: "crt_so_defaults", |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2086 | defaults: ["crt_defaults"], |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2087 | |
| 2088 | arch: { |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2089 | x86: { |
| 2090 | cflags: ["-fPIC"], |
| 2091 | }, |
| 2092 | x86_64: { |
| 2093 | cflags: ["-fPIC"], |
| 2094 | }, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2095 | }, |
Colin Cross | ab17944 | 2018-09-27 11:03:22 -0700 | [diff] [blame] | 2096 | stl: "none", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2097 | } |
| 2098 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2099 | cc_object { |
| 2100 | name: "crtbrand", |
Dan Willemsen | a3ed901 | 2017-04-04 15:51:26 -0700 | [diff] [blame] | 2101 | // crtbrand.c needs <stdint.h> and a #define for the platform SDK version. |
Jingwen Chen | 7e13cf2 | 2021-02-23 00:43:01 -0500 | [diff] [blame] | 2102 | local_include_dirs: [ |
| 2103 | "include", |
| 2104 | "private", // crtbrand.S depends on private/bionic_asm_note.h |
| 2105 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2106 | product_variables: { |
| 2107 | platform_sdk_version: { |
| 2108 | asflags: ["-DPLATFORM_SDK_VERSION=%d"], |
| 2109 | }, |
| 2110 | }, |
| 2111 | srcs: ["arch-common/bionic/crtbrand.S"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2112 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2113 | defaults: ["crt_so_defaults"], |
Dan Albert | eee46dc | 2023-04-04 23:27:52 +0000 | [diff] [blame] | 2114 | // crtbrand is an intermediate artifact, not a final CRT object. |
| 2115 | exclude_from_ndk_sysroot: true, |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2116 | } |
| 2117 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2118 | cc_object { |
Liz Kammer | e718dd7 | 2021-03-09 15:00:06 -0500 | [diff] [blame] | 2119 | name: "crtbegin_so", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2120 | local_include_dirs: ["include"], |
| 2121 | srcs: ["arch-common/bionic/crtbegin_so.c"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2122 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2123 | defaults: ["crt_so_defaults"], |
Colin Cross | 77d57bf | 2016-04-11 14:34:18 -0700 | [diff] [blame] | 2124 | objs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2125 | "crtbrand", |
| 2126 | ], |
| 2127 | } |
| 2128 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2129 | cc_object { |
| 2130 | name: "crtend_so", |
Liz Kammer | aab2ad7 | 2021-03-15 18:03:24 -0400 | [diff] [blame] | 2131 | local_include_dirs: [ |
| 2132 | "include", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2133 | "private", // crtend_so.S depends on private/bionic_asm_arm64.h |
Liz Kammer | aab2ad7 | 2021-03-15 18:03:24 -0400 | [diff] [blame] | 2134 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2135 | srcs: ["arch-common/bionic/crtend_so.S"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2136 | |
Colin Cross | 7d7b368 | 2017-11-03 13:38:40 -0700 | [diff] [blame] | 2137 | defaults: ["crt_so_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2138 | } |
| 2139 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2140 | cc_object { |
Liz Kammer | e718dd7 | 2021-03-09 15:00:06 -0500 | [diff] [blame] | 2141 | name: "crtbegin_static", |
| 2142 | |
Jingwen Chen | 0b1611e | 2021-02-18 23:22:03 -0500 | [diff] [blame] | 2143 | local_include_dirs: [ |
| 2144 | "include", |
| 2145 | "bionic", // crtbegin.c includes bionic/libc_init_common.h |
| 2146 | ], |
Liz Kammer | e718dd7 | 2021-03-09 15:00:06 -0500 | [diff] [blame] | 2147 | |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2148 | cflags: ["-DCRTBEGIN_STATIC"], |
Yabin Cui | 744cfd3 | 2023-08-24 13:20:23 -0700 | [diff] [blame] | 2149 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2150 | srcs: ["arch-common/bionic/crtbegin.c"], |
Colin Cross | 77d57bf | 2016-04-11 14:34:18 -0700 | [diff] [blame] | 2151 | objs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2152 | "crtbrand", |
| 2153 | ], |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2154 | defaults: ["crt_defaults"], |
Jiyong Park | 268a600 | 2021-01-12 23:14:37 +0900 | [diff] [blame] | 2155 | // When using libc.a, we're using the latest library regardless of target API level. |
| 2156 | min_sdk_version: "current", |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2157 | } |
| 2158 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2159 | cc_object { |
Liz Kammer | e718dd7 | 2021-03-09 15:00:06 -0500 | [diff] [blame] | 2160 | name: "crtbegin_dynamic", |
| 2161 | |
Jingwen Chen | 0b1611e | 2021-02-18 23:22:03 -0500 | [diff] [blame] | 2162 | local_include_dirs: [ |
| 2163 | "include", |
| 2164 | "bionic", // crtbegin.c includes bionic/libc_init_common.h |
| 2165 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2166 | srcs: ["arch-common/bionic/crtbegin.c"], |
Colin Cross | 77d57bf | 2016-04-11 14:34:18 -0700 | [diff] [blame] | 2167 | objs: [ |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2168 | "crtbrand", |
| 2169 | ], |
Dan Willemsen | 7ccc50d | 2017-09-18 21:28:14 -0700 | [diff] [blame] | 2170 | target: { |
| 2171 | linux_bionic: { |
| 2172 | generated_sources: ["host_bionic_linker_asm"], |
| 2173 | objs: [ |
| 2174 | "linker_wrapper", |
| 2175 | ], |
| 2176 | }, |
| 2177 | }, |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2178 | defaults: ["crt_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2179 | } |
| 2180 | |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2181 | cc_object { |
| 2182 | // We rename crtend.o to crtend_android.o to avoid a |
| 2183 | // name clash between gcc and bionic. |
| 2184 | name: "crtend_android", |
Liz Kammer | aab2ad7 | 2021-03-15 18:03:24 -0400 | [diff] [blame] | 2185 | local_include_dirs: [ |
| 2186 | "include", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2187 | "private", // crtend.S depends on private/bionic_asm_arm64.h |
Liz Kammer | aab2ad7 | 2021-03-15 18:03:24 -0400 | [diff] [blame] | 2188 | ], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2189 | srcs: ["arch-common/bionic/crtend.S"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2190 | |
Colin Cross | 50c21ab | 2015-10-31 23:03:05 -0700 | [diff] [blame] | 2191 | defaults: ["crt_defaults"], |
Dan Willemsen | 208ae17 | 2015-09-16 16:33:27 -0700 | [diff] [blame] | 2192 | } |
Colin Cross | baa4899 | 2016-07-13 11:15:21 -0700 | [diff] [blame] | 2193 | |
Kalesh Singh | 862a23d | 2024-01-09 13:13:50 -0800 | [diff] [blame] | 2194 | cc_object { |
| 2195 | name: "crt_pad_segment", |
| 2196 | local_include_dirs: [ |
| 2197 | "include", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2198 | "private", // crt_pad_segment.S depends on private/bionic_asm_note.h |
Kalesh Singh | 862a23d | 2024-01-09 13:13:50 -0800 | [diff] [blame] | 2199 | ], |
| 2200 | srcs: ["arch-common/bionic/crt_pad_segment.S"], |
| 2201 | |
| 2202 | defaults: ["crt_defaults"], |
| 2203 | } |
| 2204 | |
Evgenii Stepanov | 8564b8d | 2020-12-15 13:55:32 -0800 | [diff] [blame] | 2205 | cc_library_static { |
| 2206 | name: "note_memtag_heap_async", |
| 2207 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2208 | arm64: { |
| 2209 | srcs: ["arch-arm64/bionic/note_memtag_heap_async.S"], |
| 2210 | }, |
Evgenii Stepanov | 8564b8d | 2020-12-15 13:55:32 -0800 | [diff] [blame] | 2211 | }, |
Mitch Phillips | 22c9075 | 2021-03-03 15:39:57 -0800 | [diff] [blame] | 2212 | sdk_version: "minimum", |
Evgenii Stepanov | 8564b8d | 2020-12-15 13:55:32 -0800 | [diff] [blame] | 2213 | |
Colin Cross | 10d9268 | 2021-06-22 13:25:46 -0700 | [diff] [blame] | 2214 | defaults: ["crt_and_memtag_defaults"], |
Evgenii Stepanov | 8564b8d | 2020-12-15 13:55:32 -0800 | [diff] [blame] | 2215 | } |
| 2216 | |
| 2217 | cc_library_static { |
| 2218 | name: "note_memtag_heap_sync", |
| 2219 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2220 | arm64: { |
| 2221 | srcs: ["arch-arm64/bionic/note_memtag_heap_sync.S"], |
| 2222 | }, |
Evgenii Stepanov | 8564b8d | 2020-12-15 13:55:32 -0800 | [diff] [blame] | 2223 | }, |
Mitch Phillips | 22c9075 | 2021-03-03 15:39:57 -0800 | [diff] [blame] | 2224 | sdk_version: "minimum", |
Evgenii Stepanov | 8564b8d | 2020-12-15 13:55:32 -0800 | [diff] [blame] | 2225 | |
Colin Cross | 10d9268 | 2021-06-22 13:25:46 -0700 | [diff] [blame] | 2226 | defaults: ["crt_and_memtag_defaults"], |
Evgenii Stepanov | 8564b8d | 2020-12-15 13:55:32 -0800 | [diff] [blame] | 2227 | } |
| 2228 | |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2229 | // ======================================================== |
Pierre-Clément Tosi | 74a1458 | 2022-12-09 18:49:29 +0000 | [diff] [blame] | 2230 | // libc dependencies for baremetal Rust projects. |
| 2231 | // ======================================================== |
| 2232 | |
Pierre-Clément Tosi | 199a62e | 2022-12-09 19:00:44 +0000 | [diff] [blame] | 2233 | // This library contains the following unresolved symbols: |
| 2234 | // __errno |
| 2235 | // abort |
| 2236 | // async_safe_fatal_va_list |
Pierre-Clément Tosi | 3af5799 | 2023-01-03 17:57:42 +0000 | [diff] [blame] | 2237 | cc_library_static { |
| 2238 | name: "librust_baremetal", |
Pierre-Clément Tosi | 74a1458 | 2022-12-09 18:49:29 +0000 | [diff] [blame] | 2239 | header_libs: ["libc_headers"], |
| 2240 | include_dirs: [ |
| 2241 | "bionic/libc/async_safe/include", |
| 2242 | "bionic/libc/platform", |
| 2243 | ], |
| 2244 | cflags: [ |
| 2245 | "-Wall", |
| 2246 | "-Werror", |
| 2247 | ], |
Pierre-Clément Tosi | 199a62e | 2022-12-09 19:00:44 +0000 | [diff] [blame] | 2248 | srcs: [ |
| 2249 | "bionic/fortify.cpp", |
Pierre-Clément Tosi | 816176c | 2022-11-30 14:33:41 +0000 | [diff] [blame] | 2250 | "bionic/strtol.cpp", |
Pierre-Clément Tosi | 199a62e | 2022-12-09 19:00:44 +0000 | [diff] [blame] | 2251 | ], |
| 2252 | arch: { |
| 2253 | arm64: { |
Pierre-Clément Tosi | 199a62e | 2022-12-09 19:00:44 +0000 | [diff] [blame] | 2254 | srcs: [ |
| 2255 | "arch-arm64/string/__memcpy_chk.S", |
| 2256 | ], |
| 2257 | }, |
caowencheng | 9a39eb3 | 2023-03-20 16:24:41 +0800 | [diff] [blame] | 2258 | riscv64: { |
| 2259 | srcs: [ |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2260 | "arch-riscv64/string/__memcpy_chk.S", |
caowencheng | 9a39eb3 | 2023-03-20 16:24:41 +0800 | [diff] [blame] | 2261 | ], |
| 2262 | }, |
Pierre-Clément Tosi | 199a62e | 2022-12-09 19:00:44 +0000 | [diff] [blame] | 2263 | }, |
Pierre-Clément Tosi | 74a1458 | 2022-12-09 18:49:29 +0000 | [diff] [blame] | 2264 | whole_static_libs: [ |
| 2265 | "libarm-optimized-routines-mem", |
Pierre-Clément Tosi | eb46ac9 | 2023-02-01 13:44:57 +0000 | [diff] [blame] | 2266 | "libc_netbsd", |
Pierre-Clément Tosi | 74a1458 | 2022-12-09 18:49:29 +0000 | [diff] [blame] | 2267 | ], |
Pierre-Clément Tosi | 3af5799 | 2023-01-03 17:57:42 +0000 | [diff] [blame] | 2268 | system_shared_libs: [], |
| 2269 | nocrt: true, |
| 2270 | stl: "none", |
Pierre-Clément Tosi | 74a1458 | 2022-12-09 18:49:29 +0000 | [diff] [blame] | 2271 | visibility: [ |
| 2272 | "//packages/modules/Virtualization/vmbase", |
| 2273 | ], |
| 2274 | } |
| 2275 | |
| 2276 | // ======================================================== |
Elliott Hughes | d19b3c5 | 2018-09-06 16:04:08 -0700 | [diff] [blame] | 2277 | // NDK headers. |
| 2278 | // ======================================================== |
| 2279 | |
Dan Albert | 26e1c41 | 2018-05-24 14:56:46 -0700 | [diff] [blame] | 2280 | versioned_ndk_headers { |
Dan Albert | 22805ea | 2017-03-22 15:28:05 -0700 | [diff] [blame] | 2281 | name: "common_libc", |
| 2282 | from: "include", |
| 2283 | to: "", |
| 2284 | license: "NOTICE", |
| 2285 | } |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2286 | |
| 2287 | ndk_headers { |
Dan Albert | 063e86a | 2016-11-29 11:09:12 -0800 | [diff] [blame] | 2288 | name: "libc_uapi", |
| 2289 | from: "kernel/uapi", |
| 2290 | to: "", |
| 2291 | srcs: [ |
| 2292 | "kernel/uapi/asm-generic/**/*.h", |
| 2293 | "kernel/uapi/drm/**/*.h", |
| 2294 | "kernel/uapi/linux/**/*.h", |
| 2295 | "kernel/uapi/misc/**/*.h", |
| 2296 | "kernel/uapi/mtd/**/*.h", |
| 2297 | "kernel/uapi/rdma/**/*.h", |
| 2298 | "kernel/uapi/scsi/**/*.h", |
| 2299 | "kernel/uapi/sound/**/*.h", |
| 2300 | "kernel/uapi/video/**/*.h", |
| 2301 | "kernel/uapi/xen/**/*.h", |
| 2302 | ], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2303 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2304 | } |
| 2305 | |
| 2306 | ndk_headers { |
Elliott Hughes | 2fad0d5 | 2017-04-27 16:26:55 -0700 | [diff] [blame] | 2307 | name: "libc_kernel_android_uapi_linux", |
Dan Albert | bae16ef | 2016-09-14 17:15:48 -0700 | [diff] [blame] | 2308 | from: "kernel/android/uapi/linux", |
| 2309 | to: "linux", |
| 2310 | srcs: ["kernel/android/uapi/linux/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2311 | license: "NOTICE", |
Dan Albert | bae16ef | 2016-09-14 17:15:48 -0700 | [diff] [blame] | 2312 | } |
| 2313 | |
| 2314 | ndk_headers { |
Elliott Hughes | 2fad0d5 | 2017-04-27 16:26:55 -0700 | [diff] [blame] | 2315 | name: "libc_kernel_android_scsi", |
Elliott Hughes | 5059939 | 2017-05-25 17:13:32 -0700 | [diff] [blame] | 2316 | from: "kernel/android/scsi/scsi", |
Elliott Hughes | 2fad0d5 | 2017-04-27 16:26:55 -0700 | [diff] [blame] | 2317 | to: "scsi", |
| 2318 | srcs: ["kernel/android/scsi/**/*.h"], |
| 2319 | license: "NOTICE", |
| 2320 | } |
| 2321 | |
| 2322 | ndk_headers { |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2323 | name: "libc_asm_arm", |
| 2324 | from: "kernel/uapi/asm-arm", |
| 2325 | to: "arm-linux-androideabi", |
| 2326 | srcs: ["kernel/uapi/asm-arm/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2327 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2328 | } |
| 2329 | |
| 2330 | ndk_headers { |
| 2331 | name: "libc_asm_arm64", |
| 2332 | from: "kernel/uapi/asm-arm64", |
| 2333 | to: "aarch64-linux-android", |
| 2334 | srcs: ["kernel/uapi/asm-arm64/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2335 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2336 | } |
| 2337 | |
Lazar Trsic | 790d2f7 | 2017-11-27 11:54:11 +0100 | [diff] [blame] | 2338 | ndk_headers { |
Colin Cross | bd26e0f | 2022-10-19 15:03:14 -0700 | [diff] [blame] | 2339 | name: "libc_asm_riscv64", |
| 2340 | from: "kernel/uapi/asm-riscv", |
| 2341 | to: "riscv64-linux-android", |
| 2342 | srcs: ["kernel/uapi/asm-riscv/**/*.h"], |
| 2343 | license: "NOTICE", |
| 2344 | } |
| 2345 | |
| 2346 | ndk_headers { |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2347 | name: "libc_asm_x86", |
| 2348 | from: "kernel/uapi/asm-x86", |
| 2349 | to: "i686-linux-android", |
| 2350 | srcs: ["kernel/uapi/asm-x86/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2351 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2352 | } |
| 2353 | |
| 2354 | ndk_headers { |
| 2355 | name: "libc_asm_x86_64", |
| 2356 | from: "kernel/uapi/asm-x86", |
| 2357 | to: "x86_64-linux-android", |
| 2358 | srcs: ["kernel/uapi/asm-x86/**/*.h"], |
Dan Albert | 9259265 | 2016-10-20 01:42:54 -0700 | [diff] [blame] | 2359 | license: "NOTICE", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2360 | } |
| 2361 | |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2362 | ndk_library { |
Dan Willemsen | 51a9bf1 | 2017-04-07 14:09:18 -0700 | [diff] [blame] | 2363 | name: "libc", |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2364 | symbol_file: "libc.map.txt", |
| 2365 | first_version: "9", |
Spandan Das | 6feb2cc | 2022-09-08 23:41:42 +0000 | [diff] [blame] | 2366 | export_header_libs: [ |
| 2367 | "common_libc", |
| 2368 | "libc_uapi", |
| 2369 | "libc_kernel_android_uapi_linux", |
| 2370 | "libc_kernel_android_scsi", |
| 2371 | "libc_asm_arm", |
| 2372 | "libc_asm_arm64", |
Colin Cross | bd26e0f | 2022-10-19 15:03:14 -0700 | [diff] [blame] | 2373 | "libc_asm_riscv64", |
Spandan Das | 6feb2cc | 2022-09-08 23:41:42 +0000 | [diff] [blame] | 2374 | "libc_asm_x86", |
| 2375 | "libc_asm_x86_64", |
| 2376 | ], |
Dan Albert | 4238a35 | 2016-06-28 11:18:05 -0700 | [diff] [blame] | 2377 | } |
| 2378 | |
Dan Albert | df31aff | 2016-10-06 15:50:41 -0700 | [diff] [blame] | 2379 | ndk_library { |
Dan Willemsen | 51a9bf1 | 2017-04-07 14:09:18 -0700 | [diff] [blame] | 2380 | name: "libstdc++", |
Dan Albert | df31aff | 2016-10-06 15:50:41 -0700 | [diff] [blame] | 2381 | symbol_file: "libstdc++.map.txt", |
| 2382 | first_version: "9", |
| 2383 | } |
| 2384 | |
Dan Willemsen | ca056d7 | 2018-01-08 14:00:24 -0800 | [diff] [blame] | 2385 | // Export these headers for toolbox to process |
| 2386 | filegroup { |
| 2387 | name: "kernel_input_headers", |
| 2388 | srcs: [ |
| 2389 | "kernel/uapi/linux/input.h", |
| 2390 | "kernel/uapi/linux/input-event-codes.h", |
| 2391 | ], |
| 2392 | } |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2393 | |
| 2394 | // Generate a syscall name / number mapping. These objects are text files |
| 2395 | // (thanks to the -dD -E flags) and not binary files. They will then be |
| 2396 | // consumed by the genseccomp.py script and converted into C++ code. |
| 2397 | cc_defaults { |
| 2398 | name: "libseccomp_gen_syscall_nrs_defaults", |
| 2399 | recovery_available: true, |
| 2400 | srcs: ["seccomp/gen_syscall_nrs.cpp"], |
| 2401 | cflags: [ |
| 2402 | "-dD", |
| 2403 | "-E", |
| 2404 | "-Wall", |
| 2405 | "-Werror", |
| 2406 | "-nostdinc", |
| 2407 | ], |
| 2408 | } |
| 2409 | |
| 2410 | cc_object { |
| 2411 | name: "libseccomp_gen_syscall_nrs_arm", |
| 2412 | defaults: ["libseccomp_gen_syscall_nrs_defaults"], |
| 2413 | local_include_dirs: [ |
| 2414 | "kernel/uapi/asm-arm", |
| 2415 | "kernel/uapi", |
| 2416 | ], |
| 2417 | } |
| 2418 | |
| 2419 | cc_object { |
| 2420 | name: "libseccomp_gen_syscall_nrs_arm64", |
| 2421 | defaults: ["libseccomp_gen_syscall_nrs_defaults"], |
| 2422 | local_include_dirs: [ |
| 2423 | "kernel/uapi/asm-arm64", |
| 2424 | "kernel/uapi", |
| 2425 | ], |
| 2426 | } |
| 2427 | |
| 2428 | cc_object { |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 2429 | name: "libseccomp_gen_syscall_nrs_riscv64", |
| 2430 | defaults: ["libseccomp_gen_syscall_nrs_defaults"], |
| 2431 | local_include_dirs: [ |
| 2432 | "kernel/uapi/asm-riscv", |
| 2433 | "kernel/uapi", |
| 2434 | ], |
| 2435 | } |
| 2436 | |
| 2437 | cc_object { |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2438 | name: "libseccomp_gen_syscall_nrs_x86", |
| 2439 | defaults: ["libseccomp_gen_syscall_nrs_defaults"], |
| 2440 | srcs: ["seccomp/gen_syscall_nrs_x86.cpp"], |
| 2441 | exclude_srcs: ["seccomp/gen_syscall_nrs.cpp"], |
| 2442 | local_include_dirs: [ |
| 2443 | "kernel/uapi/asm-x86", |
| 2444 | "kernel/uapi", |
| 2445 | ], |
| 2446 | } |
| 2447 | |
| 2448 | cc_object { |
| 2449 | name: "libseccomp_gen_syscall_nrs_x86_64", |
| 2450 | defaults: ["libseccomp_gen_syscall_nrs_defaults"], |
| 2451 | srcs: ["seccomp/gen_syscall_nrs_x86_64.cpp"], |
| 2452 | exclude_srcs: ["seccomp/gen_syscall_nrs.cpp"], |
| 2453 | local_include_dirs: [ |
| 2454 | "kernel/uapi/asm-x86", |
| 2455 | "kernel/uapi", |
| 2456 | ], |
| 2457 | } |
| 2458 | |
Jingwen Chen | ca36633 | 2021-01-29 05:16:32 -0500 | [diff] [blame] | 2459 | filegroup { |
| 2460 | name: "all_kernel_uapi_headers", |
| 2461 | srcs: ["kernel/uapi/**/*.h"], |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2462 | } |
| 2463 | |
Martijn Coenen | 0c6de75 | 2019-01-02 12:52:51 +0100 | [diff] [blame] | 2464 | cc_genrule { |
| 2465 | name: "func_to_syscall_nrs", |
| 2466 | recovery_available: true, |
| 2467 | cmd: "$(location genfunctosyscallnrs) --out-dir=$(genDir) $(in)", |
| 2468 | |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2469 | tools: ["genfunctosyscallnrs"], |
Martijn Coenen | 0c6de75 | 2019-01-02 12:52:51 +0100 | [diff] [blame] | 2470 | |
| 2471 | srcs: [ |
| 2472 | "SYSCALLS.TXT", |
Martijn Coenen | 0c6de75 | 2019-01-02 12:52:51 +0100 | [diff] [blame] | 2473 | ], |
| 2474 | |
Elliott Hughes | 704772b | 2022-10-10 17:06:43 +0000 | [diff] [blame] | 2475 | arch: { |
| 2476 | arm: { |
| 2477 | srcs: [ |
| 2478 | ":libseccomp_gen_syscall_nrs_arm", |
| 2479 | ":libseccomp_gen_syscall_nrs_arm64", |
| 2480 | ], |
| 2481 | }, |
| 2482 | arm64: { |
| 2483 | srcs: [ |
| 2484 | ":libseccomp_gen_syscall_nrs_arm", |
| 2485 | ":libseccomp_gen_syscall_nrs_arm64", |
| 2486 | ], |
| 2487 | }, |
| 2488 | riscv64: { |
| 2489 | srcs: [":libseccomp_gen_syscall_nrs_riscv64"], |
| 2490 | }, |
| 2491 | x86: { |
| 2492 | srcs: [ |
| 2493 | ":libseccomp_gen_syscall_nrs_x86", |
| 2494 | ":libseccomp_gen_syscall_nrs_x86_64", |
| 2495 | ], |
| 2496 | }, |
| 2497 | x86_64: { |
| 2498 | srcs: [ |
| 2499 | ":libseccomp_gen_syscall_nrs_x86", |
| 2500 | ":libseccomp_gen_syscall_nrs_x86_64", |
| 2501 | ], |
| 2502 | }, |
| 2503 | }, |
| 2504 | |
Martijn Coenen | 0c6de75 | 2019-01-02 12:52:51 +0100 | [diff] [blame] | 2505 | out: [ |
| 2506 | "func_to_syscall_nrs.h", |
| 2507 | ], |
| 2508 | } |
| 2509 | |
Victor Hsieh | dbb8670 | 2020-06-15 09:29:07 -0700 | [diff] [blame] | 2510 | // SECCOMP_BLOCKLIST_APP_ZYGOTE.TXT = SECCOMP_BLOCKLIST_APP.txt - setresgid* |
Martijn Coenen | c3752be | 2019-01-09 16:19:57 +0100 | [diff] [blame] | 2511 | genrule { |
Victor Hsieh | dbb8670 | 2020-06-15 09:29:07 -0700 | [diff] [blame] | 2512 | name: "generate_app_zygote_blocklist", |
| 2513 | out: ["SECCOMP_BLOCKLIST_APP_ZYGOTE.TXT"], |
| 2514 | srcs: ["SECCOMP_BLOCKLIST_APP.TXT"], |
Martijn Coenen | c3752be | 2019-01-09 16:19:57 +0100 | [diff] [blame] | 2515 | cmd: "grep -v '^int[ \t]*setresgid' $(in) > $(out)", |
| 2516 | } |
| 2517 | |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2518 | filegroup { |
| 2519 | name: "seccomp_syscalls_sources_zygote", |
Martijn Coenen | c3752be | 2019-01-09 16:19:57 +0100 | [diff] [blame] | 2520 | srcs: [ |
| 2521 | "SYSCALLS.TXT", |
Victor Hsieh | dbb8670 | 2020-06-15 09:29:07 -0700 | [diff] [blame] | 2522 | "SECCOMP_ALLOWLIST_COMMON.TXT", |
| 2523 | "SECCOMP_ALLOWLIST_APP.TXT", |
| 2524 | "SECCOMP_BLOCKLIST_COMMON.TXT", |
Bram Bonné | acadd09 | 2020-05-06 13:49:55 +0200 | [diff] [blame] | 2525 | "SECCOMP_PRIORITY.TXT", |
Victor Hsieh | dbb8670 | 2020-06-15 09:29:07 -0700 | [diff] [blame] | 2526 | ":generate_app_zygote_blocklist", |
Martijn Coenen | c3752be | 2019-01-09 16:19:57 +0100 | [diff] [blame] | 2527 | ], |
Martijn Coenen | c3752be | 2019-01-09 16:19:57 +0100 | [diff] [blame] | 2528 | } |
| 2529 | |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2530 | filegroup { |
| 2531 | name: "seccomp_syscalls_sources_app", |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2532 | srcs: [ |
| 2533 | "SYSCALLS.TXT", |
Victor Hsieh | dbb8670 | 2020-06-15 09:29:07 -0700 | [diff] [blame] | 2534 | "SECCOMP_ALLOWLIST_COMMON.TXT", |
| 2535 | "SECCOMP_ALLOWLIST_APP.TXT", |
| 2536 | "SECCOMP_BLOCKLIST_COMMON.TXT", |
| 2537 | "SECCOMP_BLOCKLIST_APP.TXT", |
Bram Bonné | acadd09 | 2020-05-06 13:49:55 +0200 | [diff] [blame] | 2538 | "SECCOMP_PRIORITY.TXT", |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2539 | ], |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2540 | } |
| 2541 | |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2542 | filegroup { |
| 2543 | name: "seccomp_syscalls_sources_system", |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2544 | srcs: [ |
| 2545 | "SYSCALLS.TXT", |
Victor Hsieh | dbb8670 | 2020-06-15 09:29:07 -0700 | [diff] [blame] | 2546 | "SECCOMP_ALLOWLIST_COMMON.TXT", |
| 2547 | "SECCOMP_ALLOWLIST_SYSTEM.TXT", |
| 2548 | "SECCOMP_BLOCKLIST_COMMON.TXT", |
Bram Bonné | acadd09 | 2020-05-06 13:49:55 +0200 | [diff] [blame] | 2549 | "SECCOMP_PRIORITY.TXT", |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2550 | ], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2551 | } |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2552 | |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2553 | cc_genrule { |
| 2554 | name: "libseccomp_policy_app_zygote_sources_x86", |
| 2555 | recovery_available: true, |
| 2556 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=app_zygote $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2557 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2558 | srcs: [ |
| 2559 | ":seccomp_syscalls_sources_zygote", |
| 2560 | ":libseccomp_gen_syscall_nrs_x86", |
| 2561 | ":libseccomp_gen_syscall_nrs_x86_64", |
| 2562 | ], |
| 2563 | out: [ |
| 2564 | "x86_app_zygote_policy.cpp", |
| 2565 | "x86_64_app_zygote_policy.cpp", |
| 2566 | ], |
| 2567 | enabled: false, |
Yu Liu | 3a57969 | 2022-10-18 03:02:32 +0000 | [diff] [blame] | 2568 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2569 | x86: { |
| 2570 | enabled: true, |
| 2571 | }, |
| 2572 | x86_64: { |
| 2573 | enabled: true, |
| 2574 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2575 | }, |
| 2576 | } |
| 2577 | |
| 2578 | cc_genrule { |
| 2579 | name: "libseccomp_policy_app_zygote_sources_arm", |
| 2580 | recovery_available: true, |
| 2581 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=app_zygote $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2582 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2583 | srcs: [ |
| 2584 | ":seccomp_syscalls_sources_zygote", |
| 2585 | ":libseccomp_gen_syscall_nrs_arm", |
| 2586 | ":libseccomp_gen_syscall_nrs_arm64", |
| 2587 | ], |
| 2588 | out: [ |
| 2589 | "arm_app_zygote_policy.cpp", |
| 2590 | "arm64_app_zygote_policy.cpp", |
| 2591 | ], |
| 2592 | enabled: false, |
| 2593 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2594 | arm: { |
| 2595 | enabled: true, |
| 2596 | }, |
| 2597 | arm64: { |
| 2598 | enabled: true, |
| 2599 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2600 | }, |
| 2601 | } |
| 2602 | |
| 2603 | cc_genrule { |
| 2604 | name: "libseccomp_policy_app_zygote_sources_riscv64", |
| 2605 | recovery_available: true, |
| 2606 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=app_zygote $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2607 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2608 | srcs: [ |
| 2609 | ":seccomp_syscalls_sources_zygote", |
| 2610 | ":libseccomp_gen_syscall_nrs_riscv64", |
| 2611 | ], |
| 2612 | out: [ |
| 2613 | "riscv64_app_zygote_policy.cpp", |
| 2614 | ], |
| 2615 | enabled: false, |
| 2616 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2617 | riscv64: { |
| 2618 | enabled: true, |
| 2619 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2620 | }, |
| 2621 | } |
| 2622 | |
| 2623 | cc_genrule { |
| 2624 | name: "libseccomp_policy_app_sources_x86", |
| 2625 | recovery_available: true, |
| 2626 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=app $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2627 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2628 | srcs: [ |
| 2629 | ":seccomp_syscalls_sources_app", |
| 2630 | ":libseccomp_gen_syscall_nrs_x86", |
| 2631 | ":libseccomp_gen_syscall_nrs_x86_64", |
| 2632 | ], |
| 2633 | out: [ |
| 2634 | "x86_app_policy.cpp", |
| 2635 | "x86_64_app_policy.cpp", |
| 2636 | ], |
| 2637 | enabled: false, |
| 2638 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2639 | x86: { |
| 2640 | enabled: true, |
| 2641 | }, |
| 2642 | x86_64: { |
| 2643 | enabled: true, |
| 2644 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2645 | }, |
| 2646 | } |
| 2647 | |
| 2648 | cc_genrule { |
| 2649 | name: "libseccomp_policy_app_sources_arm", |
| 2650 | recovery_available: true, |
| 2651 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=app $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2652 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2653 | srcs: [ |
| 2654 | ":seccomp_syscalls_sources_app", |
| 2655 | ":libseccomp_gen_syscall_nrs_arm", |
| 2656 | ":libseccomp_gen_syscall_nrs_arm64", |
| 2657 | ], |
| 2658 | out: [ |
| 2659 | "arm_app_policy.cpp", |
| 2660 | "arm64_app_policy.cpp", |
| 2661 | ], |
| 2662 | enabled: false, |
| 2663 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2664 | arm: { |
| 2665 | enabled: true, |
| 2666 | }, |
| 2667 | arm64: { |
| 2668 | enabled: true, |
| 2669 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2670 | }, |
| 2671 | } |
| 2672 | |
| 2673 | cc_genrule { |
| 2674 | name: "libseccomp_policy_app_sources_riscv64", |
| 2675 | recovery_available: true, |
| 2676 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=app $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2677 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2678 | srcs: [ |
| 2679 | ":seccomp_syscalls_sources_app", |
| 2680 | ":libseccomp_gen_syscall_nrs_riscv64", |
| 2681 | ], |
| 2682 | out: [ |
| 2683 | "riscv64_app_policy.cpp", |
| 2684 | ], |
| 2685 | enabled: false, |
| 2686 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2687 | riscv64: { |
| 2688 | enabled: true, |
| 2689 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2690 | }, |
| 2691 | } |
| 2692 | |
| 2693 | cc_genrule { |
| 2694 | name: "libseccomp_policy_system_sources_x86", |
| 2695 | recovery_available: true, |
| 2696 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=system $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2697 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2698 | srcs: [ |
| 2699 | ":seccomp_syscalls_sources_system", |
| 2700 | ":libseccomp_gen_syscall_nrs_x86", |
| 2701 | ":libseccomp_gen_syscall_nrs_x86_64", |
| 2702 | ], |
| 2703 | out: [ |
| 2704 | "x86_system_policy.cpp", |
| 2705 | "x86_64_system_policy.cpp", |
| 2706 | ], |
| 2707 | enabled: false, |
| 2708 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2709 | x86: { |
| 2710 | enabled: true, |
| 2711 | }, |
| 2712 | x86_64: { |
| 2713 | enabled: true, |
| 2714 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2715 | }, |
| 2716 | } |
| 2717 | |
| 2718 | cc_genrule { |
| 2719 | name: "libseccomp_policy_system_sources_arm", |
| 2720 | recovery_available: true, |
| 2721 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=system $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2722 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2723 | srcs: [ |
| 2724 | ":seccomp_syscalls_sources_system", |
| 2725 | ":libseccomp_gen_syscall_nrs_arm", |
| 2726 | ":libseccomp_gen_syscall_nrs_arm64", |
| 2727 | ], |
| 2728 | out: [ |
| 2729 | "arm_system_policy.cpp", |
| 2730 | "arm64_system_policy.cpp", |
| 2731 | ], |
| 2732 | enabled: false, |
| 2733 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2734 | arm: { |
| 2735 | enabled: true, |
| 2736 | }, |
| 2737 | arm64: { |
| 2738 | enabled: true, |
| 2739 | }, |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2740 | }, |
| 2741 | } |
| 2742 | |
| 2743 | cc_genrule { |
| 2744 | name: "libseccomp_policy_system_sources_riscv64", |
| 2745 | recovery_available: true, |
| 2746 | cmd: "$(location genseccomp) --out-dir=$(genDir) --name-modifier=system $(in)", |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2747 | tools: ["genseccomp"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2748 | srcs: [ |
| 2749 | ":seccomp_syscalls_sources_system", |
| 2750 | ":libseccomp_gen_syscall_nrs_riscv64", |
| 2751 | ], |
| 2752 | out: [ |
| 2753 | "riscv64_system_policy.cpp", |
| 2754 | ], |
| 2755 | enabled: false, |
| 2756 | arch: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2757 | riscv64: { |
| 2758 | enabled: true, |
| 2759 | }, |
Yu Liu | 3a57969 | 2022-10-18 03:02:32 +0000 | [diff] [blame] | 2760 | }, |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2761 | } |
| 2762 | |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2763 | cc_library { |
| 2764 | name: "libseccomp_policy", |
| 2765 | recovery_available: true, |
Martijn Coenen | d269d9b | 2018-11-08 16:41:42 +0100 | [diff] [blame] | 2766 | generated_headers: ["func_to_syscall_nrs"], |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2767 | |
| 2768 | arch: { |
| 2769 | arm: { |
| 2770 | generated_sources: [ |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2771 | "libseccomp_policy_app_sources_arm", |
| 2772 | "libseccomp_policy_app_zygote_sources_arm", |
| 2773 | "libseccomp_policy_system_sources_arm", |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2774 | ], |
| 2775 | }, |
| 2776 | arm64: { |
| 2777 | generated_sources: [ |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2778 | "libseccomp_policy_app_sources_arm", |
| 2779 | "libseccomp_policy_app_zygote_sources_arm", |
| 2780 | "libseccomp_policy_system_sources_arm", |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2781 | ], |
| 2782 | }, |
| 2783 | riscv64: { |
| 2784 | generated_sources: [ |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2785 | "libseccomp_policy_app_sources_riscv64", |
| 2786 | "libseccomp_policy_app_zygote_sources_riscv64", |
| 2787 | "libseccomp_policy_system_sources_riscv64", |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2788 | ], |
| 2789 | }, |
| 2790 | x86: { |
| 2791 | generated_sources: [ |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2792 | "libseccomp_policy_app_sources_x86", |
| 2793 | "libseccomp_policy_app_zygote_sources_x86", |
| 2794 | "libseccomp_policy_system_sources_x86", |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2795 | ], |
| 2796 | }, |
| 2797 | x86_64: { |
| 2798 | generated_sources: [ |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 2799 | "libseccomp_policy_app_sources_x86", |
| 2800 | "libseccomp_policy_app_zygote_sources_x86", |
| 2801 | "libseccomp_policy_system_sources_x86", |
Yu Liu | 938ec9b | 2022-10-17 16:36:30 -0700 | [diff] [blame] | 2802 | ], |
| 2803 | }, |
| 2804 | }, |
Luis Hector Chavez | fa09b3c | 2018-08-03 20:53:28 -0700 | [diff] [blame] | 2805 | |
| 2806 | srcs: [ |
| 2807 | "seccomp/seccomp_policy.cpp", |
| 2808 | ], |
| 2809 | |
| 2810 | export_include_dirs: ["seccomp/include"], |
| 2811 | cflags: [ |
| 2812 | "-Wall", |
| 2813 | "-Werror", |
| 2814 | ], |
| 2815 | shared: { |
| 2816 | shared_libs: ["libbase"], |
| 2817 | }, |
| 2818 | static: { |
| 2819 | static_libs: ["libbase"], |
| 2820 | }, |
| 2821 | } |
Christopher Ferris | fc26d71 | 2019-02-27 18:07:55 -0800 | [diff] [blame] | 2822 | |
Colin Cross | 048f24e | 2021-09-01 17:26:00 -0700 | [diff] [blame] | 2823 | cc_library_host_static { |
| 2824 | name: "libfts", |
| 2825 | srcs: [ |
| 2826 | "bionic/fts.c", |
| 2827 | "upstream-openbsd/lib/libc/stdlib/recallocarray.c", |
| 2828 | ], |
| 2829 | export_include_dirs: ["fts/include"], |
| 2830 | local_include_dirs: [ |
| 2831 | "private", |
| 2832 | "upstream-openbsd/android/include", |
| 2833 | ], |
| 2834 | cflags: [ |
| 2835 | "-include openbsd-compat.h", |
| 2836 | "-Wno-unused-parameter", |
| 2837 | ], |
| 2838 | enabled: false, |
| 2839 | target: { |
| 2840 | musl: { |
| 2841 | enabled: true, |
| 2842 | }, |
| 2843 | }, |
Colin Cross | 2a9843f | 2022-01-13 12:26:30 -0800 | [diff] [blame] | 2844 | stl: "none", |
| 2845 | } |
| 2846 | |
| 2847 | cc_library_host_static { |
| 2848 | name: "libexecinfo", |
| 2849 | visibility: ["//external/musl"], |
| 2850 | srcs: ["bionic/execinfo.cpp"], |
| 2851 | export_include_dirs: ["execinfo/include"], |
| 2852 | local_include_dirs: ["private"], |
| 2853 | enabled: false, |
| 2854 | target: { |
| 2855 | musl: { |
| 2856 | enabled: true, |
| 2857 | system_shared_libs: [], |
| 2858 | header_libs: ["libc_musl_headers"], |
| 2859 | }, |
| 2860 | }, |
| 2861 | stl: "none", |
Colin Cross | 048f24e | 2021-09-01 17:26:00 -0700 | [diff] [blame] | 2862 | } |
| 2863 | |
Colin Cross | 9da85fa | 2022-01-24 18:20:05 -0800 | [diff] [blame] | 2864 | cc_library_host_static { |
| 2865 | name: "libb64", |
| 2866 | visibility: ["//external/musl"], |
| 2867 | srcs: ["upstream-openbsd/lib/libc/net/base64.c"], |
| 2868 | export_include_dirs: ["b64/include"], |
| 2869 | local_include_dirs: [ |
| 2870 | "private", |
| 2871 | "upstream-openbsd/android/include", |
| 2872 | ], |
| 2873 | cflags: [ |
| 2874 | "-include openbsd-compat.h", |
| 2875 | ], |
| 2876 | enabled: false, |
| 2877 | target: { |
| 2878 | musl: { |
| 2879 | enabled: true, |
| 2880 | system_shared_libs: [], |
| 2881 | header_libs: ["libc_musl_headers"], |
| 2882 | }, |
| 2883 | }, |
| 2884 | stl: "none", |
| 2885 | } |
| 2886 | |
Colin Cross | 9d4a56e | 2022-02-03 10:20:32 -0800 | [diff] [blame] | 2887 | // Export kernel uapi headers to be used in the musl sysroot. |
| 2888 | // Also include the execinfo headers for the libexecinfo and the |
| 2889 | // b64 headers for libb64 embedded in musl libc. |
| 2890 | cc_genrule { |
| 2891 | name: "libc_musl_sysroot_bionic_headers", |
| 2892 | visibility: ["//external/musl"], |
| 2893 | host_supported: true, |
| 2894 | device_supported: false, |
| 2895 | enabled: false, |
| 2896 | target: { |
| 2897 | musl: { |
| 2898 | enabled: true, |
| 2899 | }, |
| 2900 | }, |
| 2901 | srcs: [ |
| 2902 | "kernel/uapi/**/*.h", |
| 2903 | "kernel/android/**/*.h", |
Colin Cross | 9d4a56e | 2022-02-03 10:20:32 -0800 | [diff] [blame] | 2904 | "execinfo/include/**/*.h", |
Colin Cross | 9d4a56e | 2022-02-03 10:20:32 -0800 | [diff] [blame] | 2905 | "b64/include/**/*.h", |
Colin Cross | aeef9f0 | 2022-02-07 21:01:26 -0800 | [diff] [blame] | 2906 | |
Colin Cross | aeef9f0 | 2022-02-07 21:01:26 -0800 | [diff] [blame] | 2907 | "NOTICE", |
Colin Cross | 9d4a56e | 2022-02-03 10:20:32 -0800 | [diff] [blame] | 2908 | |
| 2909 | ":libc_musl_sysroot_bionic_arch_headers", |
| 2910 | ], |
| 2911 | out: ["libc_musl_sysroot_bionic_headers.zip"], |
| 2912 | tools: [ |
| 2913 | "soong_zip", |
| 2914 | "merge_zips", |
| 2915 | "zip2zip", |
| 2916 | ], |
Colin Cross | aeef9f0 | 2022-02-07 21:01:26 -0800 | [diff] [blame] | 2917 | cmd: "BIONIC_LIBC_DIR=$$(dirname $(location NOTICE)) && " + |
| 2918 | "$(location soong_zip) -o $(genDir)/sysroot.zip -symlinks=false" + |
Colin Cross | ad33d02 | 2022-02-25 18:27:04 -0800 | [diff] [blame] | 2919 | // NOTICE |
| 2920 | " -j -f $(location NOTICE) " + |
Colin Cross | 9d4a56e | 2022-02-03 10:20:32 -0800 | [diff] [blame] | 2921 | // headers |
| 2922 | " -P include " + |
Colin Cross | aeef9f0 | 2022-02-07 21:01:26 -0800 | [diff] [blame] | 2923 | " -C $${BIONIC_LIBC_DIR}/kernel/uapi " + |
| 2924 | " -D $${BIONIC_LIBC_DIR}/kernel/uapi " + |
| 2925 | " -C $${BIONIC_LIBC_DIR}/kernel/android/scsi " + |
| 2926 | " -D $${BIONIC_LIBC_DIR}/kernel/android/scsi " + |
| 2927 | " -C $${BIONIC_LIBC_DIR}/kernel/android/uapi " + |
| 2928 | " -D $${BIONIC_LIBC_DIR}/kernel/android/uapi " + |
| 2929 | " -C $${BIONIC_LIBC_DIR}/execinfo/include " + |
| 2930 | " -D $${BIONIC_LIBC_DIR}/execinfo/include " + |
| 2931 | " -C $${BIONIC_LIBC_DIR}/b64/include " + |
| 2932 | " -D $${BIONIC_LIBC_DIR}/b64/include " + |
Colin Cross | 9d4a56e | 2022-02-03 10:20:32 -0800 | [diff] [blame] | 2933 | " && " + |
Colin Cross | ad33d02 | 2022-02-25 18:27:04 -0800 | [diff] [blame] | 2934 | "$(location zip2zip) -i $(genDir)/sysroot.zip -o $(genDir)/sysroot-renamed.zip " + |
Colin Cross | 1c0a7a0 | 2022-08-11 12:22:26 -0700 | [diff] [blame] | 2935 | " -x **/BUILD " + |
Colin Cross | ad33d02 | 2022-02-25 18:27:04 -0800 | [diff] [blame] | 2936 | " include/**/*:include/ " + |
| 2937 | " NOTICE:NOTICE.bionic " + |
| 2938 | " && " + |
| 2939 | "$(location merge_zips) $(out) $(location :libc_musl_sysroot_bionic_arch_headers) $(genDir)/sysroot-renamed.zip", |
Colin Cross | 9d4a56e | 2022-02-03 10:20:32 -0800 | [diff] [blame] | 2940 | } |
| 2941 | |
| 2942 | // The architecture-specific bits have to be handled separately because the label varies based |
| 2943 | // on architecture, which prevents using $(locations) to find them and requires using $(in) |
| 2944 | // instead, which would mix in all the other files if this were part of the main libc_musl_sysroot |
| 2945 | // genrule. |
| 2946 | cc_genrule { |
| 2947 | name: "libc_musl_sysroot_bionic_arch_headers", |
| 2948 | visibility: ["//visibility:private"], |
| 2949 | host_supported: true, |
| 2950 | device_supported: false, |
| 2951 | enabled: false, |
| 2952 | target: { |
| 2953 | musl: { |
| 2954 | enabled: true, |
| 2955 | }, |
| 2956 | }, |
| 2957 | arch: { |
| 2958 | arm: { |
| 2959 | srcs: ["kernel/uapi/asm-arm/**/*.h"], |
| 2960 | }, |
| 2961 | arm64: { |
| 2962 | srcs: ["kernel/uapi/asm-arm64/**/*.h"], |
| 2963 | }, |
| 2964 | x86: { |
| 2965 | srcs: ["kernel/uapi/asm-x86/**/*.h"], |
| 2966 | }, |
| 2967 | x86_64: { |
| 2968 | srcs: ["kernel/uapi/asm-x86/**/*.h"], |
| 2969 | }, |
| 2970 | }, |
| 2971 | out: ["libc_musl_sysroot_bionic_arch_headers.zip"], |
| 2972 | tools: ["soong_zip"], |
| 2973 | cmd: "includes=($(in)) && $(location soong_zip) -o $(out) -P include/asm -j -D $$(dirname $${includes[0]})", |
| 2974 | } |
Colin Cross | 290c495 | 2022-10-13 12:51:13 -0700 | [diff] [blame] | 2975 | |
| 2976 | cc_genrule { |
| 2977 | name: "bionic_sysroot_crt_objects", |
| 2978 | visibility: ["//visibility:private"], |
| 2979 | out: ["bionic_sysroot_crt_objects.zip"], |
| 2980 | tools: ["soong_zip"], |
| 2981 | srcs: [ |
| 2982 | ":crtbegin_dynamic", |
| 2983 | ":crtbegin_so", |
| 2984 | ":crtbegin_static", |
| 2985 | ":crtend_android", |
| 2986 | ":crtend_so", |
| 2987 | ], |
| 2988 | cmd: "$(location soong_zip) -o $(out) -j " + |
| 2989 | "-f $(location :crtbegin_dynamic) " + |
| 2990 | "-f $(location :crtbegin_so) " + |
| 2991 | "-f $(location :crtbegin_static) " + |
| 2992 | "-f $(location :crtend_android) " + |
| 2993 | "-f $(location :crtend_so)", |
| 2994 | dist: { |
| 2995 | targets: ["bionic_sysroot_crt_objects"], |
| 2996 | }, |
| 2997 | arch: { |
| 2998 | arm: { |
| 2999 | dist: { |
| 3000 | suffix: "_arm", |
| 3001 | }, |
| 3002 | }, |
| 3003 | arm64: { |
| 3004 | dist: { |
| 3005 | suffix: "_arm64", |
| 3006 | }, |
| 3007 | }, |
| 3008 | riscv64: { |
| 3009 | dist: { |
| 3010 | suffix: "_riscv64", |
| 3011 | }, |
| 3012 | }, |
| 3013 | x86: { |
| 3014 | dist: { |
| 3015 | suffix: "_x86", |
| 3016 | }, |
| 3017 | }, |
| 3018 | x86_64: { |
| 3019 | dist: { |
| 3020 | suffix: "_x86_64", |
| 3021 | }, |
| 3022 | }, |
| 3023 | }, |
| 3024 | } |
Spandan Das | 8fce52a | 2023-09-28 18:00:12 +0000 | [diff] [blame] | 3025 | |
| 3026 | // headers that will be placed on the include path when running versioner in bazel |
| 3027 | // this module should be a no-op in soong |
| 3028 | filegroup { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 3029 | name: "versioner-dependencies", |
| 3030 | srcs: ["versioner-dependencies/**/*"], |
Spandan Das | 8fce52a | 2023-09-28 18:00:12 +0000 | [diff] [blame] | 3031 | } |