blob: 57420a96a16171b300fb9124abb0f6f1f4069260 [file] [log] [blame]
Ryan Prichard80e40f02019-10-31 19:54:46 -07001// ========================================================
2// linker_wrapper - Linux Bionic (on the host)
3// ========================================================
Colin Cross97f0aef2016-07-14 16:05:46 -07004
Dan Willemsen7ccc50d2017-09-18 21:28:14 -07005// This is used for bionic on (host) Linux to bootstrap our linker embedded into
6// a binary.
7//
8// Host bionic binaries do not have a PT_INTERP section, instead this gets
9// embedded as the entry point, and the linker is embedded as ELF sections in
10// each binary. There's a linker script that sets all of that up (generated by
11// extract_linker), and defines the extern symbols used in this file.
Bob Badouraa7d8352021-02-19 13:06:22 -080012package {
13 default_applicable_licenses: ["bionic_linker_license"],
14}
15
16license {
17 name: "bionic_linker_license",
18 visibility: [":__subpackages__"],
19 license_kinds: [
20 "SPDX-license-identifier-BSD",
21 ],
22 license_text: [
23 "NOTICE",
24 ],
25}
26
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070027cc_object {
28 name: "linker_wrapper",
29 host_supported: true,
30 device_supported: false,
Colin Crossda446cc2022-03-08 15:07:57 -080031 enabled: false,
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070032 target: {
Elliott Hughesd50a1de2018-02-05 17:30:57 -080033 linux_bionic: {
34 enabled: true,
35 },
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070036 },
37
38 cflags: [
39 "-fno-stack-protector",
40 "-Wstrict-overflow=5",
41 "-fvisibility=hidden",
42 "-Wall",
43 "-Wextra",
44 "-Wno-unused",
45 "-Werror",
46 ],
47
48 srcs: [
49 "linker_wrapper.cpp",
50 ],
51 arch: {
Jiyong Park3b47d602020-09-18 16:15:53 +090052 arm64: {
Colin Crossa0a591a2021-06-11 12:46:45 -070053 srcs: ["arch/arm64/linker_wrapper_begin.S"],
Jiyong Park3b47d602020-09-18 16:15:53 +090054 },
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070055 x86_64: {
Colin Crossa0a591a2021-06-11 12:46:45 -070056 srcs: ["arch/x86_64/linker_wrapper_begin.S"],
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070057 },
58 },
59
Martin Stjernholm82d84bc2020-04-06 20:32:09 +010060 header_libs: ["libc_headers"],
61
Dan Willemsen7ccc50d2017-09-18 21:28:14 -070062 // We need to access Bionic private headers in the linker.
63 include_dirs: ["bionic/libc"],
64}
65
Ryan Prichard80e40f02019-10-31 19:54:46 -070066// ========================================================
67// linker default configuration
68// ========================================================
69
70// Configuration for the linker binary and any of its static libraries.
71cc_defaults {
72 name: "linker_defaults",
73 arch: {
74 arm: {
75 cflags: ["-D__work_around_b_24465209__"],
76 },
77 x86: {
78 cflags: ["-D__work_around_b_24465209__"],
79 },
80 },
81
82 cflags: [
83 "-fno-stack-protector",
84 "-Wstrict-overflow=5",
85 "-fvisibility=hidden",
86 "-Wall",
87 "-Wextra",
88 "-Wunused",
89 "-Werror",
90 ],
91
92 // TODO: split out the asflags.
93 asflags: [
94 "-fno-stack-protector",
95 "-Wstrict-overflow=5",
96 "-fvisibility=hidden",
97 "-Wall",
98 "-Wextra",
99 "-Wunused",
100 "-Werror",
101 ],
102
103 product_variables: {
104 debuggable: {
105 cppflags: ["-DUSE_LD_CONFIG_FILE"],
106 },
107 },
108
109 cppflags: ["-Wold-style-cast"],
110
111 static_libs: [
112 "libziparchive",
113 "libbase",
114 "libz",
115
116 "libasync_safe",
117
Jiyong Park7157dfb2022-08-19 13:09:18 +0900118 "liblog_for_runtime_apex",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700119 ],
120
121 // We need to access Bionic private headers in the linker.
122 include_dirs: ["bionic/libc"],
123}
124
125// ========================================================
126// linker components
127// ========================================================
128
129// Enable a module on all targets the linker runs on (ordinary Android targets, Linux Bionic, and
130// native bridge implementations).
131cc_defaults {
132 name: "linker_all_targets",
133 defaults: ["linux_bionic_supported"],
134 recovery_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -0700135 vendor_ramdisk_available: true,
Ryan Prichard80e40f02019-10-31 19:54:46 -0700136 native_bridge_supported: true,
137}
138
139cc_library_static {
Ryan Prichard249757b2019-11-01 17:18:28 -0700140 name: "liblinker_main",
141 defaults: ["linker_defaults", "linker_all_targets"],
142 srcs: ["linker_main.cpp"],
143
144 // Ensure that the compiler won't insert string function calls before ifuncs are resolved.
145 cflags: ["-ffreestanding"],
146}
147
148cc_library_static {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700149 name: "liblinker_malloc",
150 defaults: ["linker_defaults", "linker_all_targets"],
151 srcs: ["linker_memory.cpp"],
152}
153
154cc_library_static {
155 name: "liblinker_debuggerd_stub",
156 defaults: ["linker_defaults", "linker_all_targets"],
157 srcs: ["linker_debuggerd_stub.cpp"],
158}
159
160// ========================================================
161// template for the linker binary
162// ========================================================
163
dimitryb8b3a762018-09-25 12:31:11 +0200164filegroup {
165 name: "linker_sources",
Colin Cross97f0aef2016-07-14 16:05:46 -0700166 srcs: [
167 "dlfcn.cpp",
168 "linker.cpp",
169 "linker_block_allocator.cpp",
Dimitry Ivanov769b33f2016-07-21 11:33:40 -0700170 "linker_dlwarning.cpp",
Evgenii Stepanov0a3637d2016-07-06 13:20:59 -0700171 "linker_cfi.cpp",
Dimitry Ivanov4cabfaa2017-03-07 11:19:05 -0800172 "linker_config.cpp",
Ryan Prichard551565e2019-12-23 16:03:14 -0800173 "linker_debug.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700174 "linker_gdb_support.cpp",
Dimitry Ivanov48ec2882016-08-04 11:50:36 -0700175 "linker_globals.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700176 "linker_libc_support.c",
Dimitry Ivanov451909d2017-01-26 16:52:59 -0800177 "linker_libcxx_support.cpp",
Dimitry Ivanovb943f302016-08-03 16:00:10 -0700178 "linker_namespaces.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700179 "linker_logger.cpp",
180 "linker_mapped_file_fragment.cpp",
Tamas Petz8d55d182020-02-24 14:15:25 +0100181 "linker_note_gnu_property.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700182 "linker_phdr.cpp",
Ryan Prichard339ecef2020-01-02 16:36:06 -0800183 "linker_relocate.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700184 "linker_sdk_versions.cpp",
Dimitry Ivanov48ec2882016-08-04 11:50:36 -0700185 "linker_soinfo.cpp",
Collin Fijalkovich47d27aa2021-03-24 10:17:39 -0700186 "linker_transparent_hugepage_support.cpp",
Ryan Prichard45d13492019-01-03 02:51:30 -0800187 "linker_tls.cpp",
Colin Cross97f0aef2016-07-14 16:05:46 -0700188 "linker_utils.cpp",
189 "rt.cpp",
190 ],
dimitryb8b3a762018-09-25 12:31:11 +0200191}
Colin Cross97f0aef2016-07-14 16:05:46 -0700192
dimitryb8b3a762018-09-25 12:31:11 +0200193filegroup {
194 name: "linker_sources_arm",
195 srcs: [
196 "arch/arm/begin.S",
Ryan Prichard129f7a12019-12-23 16:45:47 -0800197 "arch/arm_neon/linker_gnu_hash_neon.cpp",
dimitryb8b3a762018-09-25 12:31:11 +0200198 ],
199}
200
201filegroup {
202 name: "linker_sources_arm64",
203 srcs: [
204 "arch/arm64/begin.S",
Ryan Prichardffaae702019-01-23 17:47:10 -0800205 "arch/arm64/tlsdesc_resolver.S",
Ryan Prichard129f7a12019-12-23 16:45:47 -0800206 "arch/arm_neon/linker_gnu_hash_neon.cpp",
dimitryb8b3a762018-09-25 12:31:11 +0200207 ],
208}
209
210filegroup {
211 name: "linker_sources_x86",
212 srcs: [
213 "arch/x86/begin.S",
214 ],
215}
216
217filegroup {
218 name: "linker_sources_x86_64",
219 srcs: [
220 "arch/x86_64/begin.S",
221 ],
222}
223
dimitryb8b3a762018-09-25 12:31:11 +0200224cc_defaults {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700225 name: "linker_version_script_overlay",
226 arch: {
227 arm: { version_script: "linker.arm.map" },
228 arm64: { version_script: "linker.generic.map" },
229 x86: { version_script: "linker.generic.map" },
230 x86_64: { version_script: "linker.generic.map" },
Ryan Prichard80e40f02019-10-31 19:54:46 -0700231 },
232}
233
234// A template for the linker binary. May be inherited by native bridge implementations.
235cc_defaults {
236 name: "linker_bin_template",
237 defaults: ["linker_defaults"],
238
239 srcs: [":linker_sources"],
240
Colin Cross97f0aef2016-07-14 16:05:46 -0700241 arch: {
242 arm: {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700243 srcs: [":linker_sources_arm"],
Christopher Ferrisd37df2b2022-08-11 17:27:50 -0700244
245 // Arm 32 bit does not produce complete exidx unwind information
246 // so keep the .debug_frame which is relatively small and does
247 // include needed unwind information.
248 // See b/242162222 for details.
249 strip: {
250 keep_symbols_and_debug_frame: true,
251 },
Ryan Prichard80e40f02019-10-31 19:54:46 -0700252 },
253 arm64: {
254 srcs: [":linker_sources_arm64"],
Christopher Ferrisd37df2b2022-08-11 17:27:50 -0700255
256 // Leave the symbols in the shared library so that stack unwinders can produce
257 // meaningful name resolution.
258 strip: {
259 keep_symbols: true,
260 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700261 },
262 x86: {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700263 srcs: [":linker_sources_x86"],
Christopher Ferrisd37df2b2022-08-11 17:27:50 -0700264
265 // Leave the symbols in the shared library so that stack unwinders can produce
266 // meaningful name resolution.
267 strip: {
268 keep_symbols: true,
269 },
Ryan Prichard80e40f02019-10-31 19:54:46 -0700270 },
271 x86_64: {
272 srcs: [":linker_sources_x86_64"],
Christopher Ferrisd37df2b2022-08-11 17:27:50 -0700273
274 // Leave the symbols in the shared library so that stack unwinders can produce
275 // meaningful name resolution.
276 strip: {
277 keep_symbols: true,
278 },
Ryan Prichard80e40f02019-10-31 19:54:46 -0700279 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700280 },
281
Ryan Prichard80e40f02019-10-31 19:54:46 -0700282 // -shared is used to overwrite the -Bstatic and -static flags triggered by enabling
283 // static_executable. This dynamic linker is actually a shared object linked with static
284 // libraries.
Colin Cross97f0aef2016-07-14 16:05:46 -0700285 ldflags: [
286 "-shared",
287 "-Wl,-Bsymbolic",
288 "-Wl,--exclude-libs,ALL",
dimitry8e8c2c02018-01-04 12:08:32 +0100289 "-Wl,-soname,ld-android.so",
Colin Cross97f0aef2016-07-14 16:05:46 -0700290 ],
291
Dimitry Ivanovfc0d4802016-12-06 11:10:09 -0800292 // we are going to link libc++_static manually because
293 // when stl is not set to "none" build system adds libdl
294 // to the list of static libraries which needs to be
295 // avoided in the case of building loader.
296 stl: "none",
297
Colin Cross97f0aef2016-07-14 16:05:46 -0700298 // we don't want crtbegin.o (because we have begin.o), so unset it
299 // just for this module
300 nocrt: true,
301
dimitryb8b3a762018-09-25 12:31:11 +0200302 static_executable: true,
303
dimitryb8b3a762018-09-25 12:31:11 +0200304 // Insert an extra objcopy step to add prefix to symbols. This is needed to prevent gdb
305 // looking up symbols in the linker by mistake.
306 prefix_symbols: "__dl_",
307
308 sanitize: {
309 hwaddress: false,
310 },
dimitryb8b3a762018-09-25 12:31:11 +0200311
Colin Cross97f0aef2016-07-14 16:05:46 -0700312 static_libs: [
Ryan Prichard249757b2019-11-01 17:18:28 -0700313 "liblinker_main",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700314 "liblinker_malloc",
315
316 "libc++_static",
Colin Cross97f0aef2016-07-14 16:05:46 -0700317 "libc_nomalloc",
Ryan Prichard249757b2019-11-01 17:18:28 -0700318 "libc_dynamic_dispatch",
Dimitry Ivanov451909d2017-01-26 16:52:59 -0800319 "libm",
Ryan Prichardcdf71752020-12-16 03:37:22 -0800320 "libunwind",
Colin Cross97f0aef2016-07-14 16:05:46 -0700321 ],
Colin Cross97f0aef2016-07-14 16:05:46 -0700322
Ryan Prichardd9a41152019-10-14 16:58:53 -0700323 // Ensure that if the linker needs __gnu_Unwind_Find_exidx, then the linker will have a
324 // definition of the symbol. The linker links against libgcc.a, whose arm32 unwinder has a weak
325 // reference to __gnu_Unwind_Find_exidx, which isn't sufficient to pull in the strong definition
326 // of __gnu_Unwind_Find_exidx from libc. An unresolved weak reference would create a
327 // non-relative dynamic relocation in the linker binary, which complicates linker startup.
328 //
329 // This line should be unnecessary because the linker's dependency on libunwind_llvm.a should
330 // override libgcc.a, but this line provides a simpler guarantee. It can be removed once the
331 // linker stops linking against libgcc.a's arm32 unwinder.
332 whole_static_libs: ["libc_unwind_static"],
333
Ryan Prichard80e40f02019-10-31 19:54:46 -0700334 system_shared_libs: [],
335
336 // Opt out of native_coverage when opting out of system_shared_libs
337 native_coverage: false,
338}
339
340// ========================================================
341// linker[_asan][64] binary
342// ========================================================
343
344cc_binary {
Colin Cross97f0aef2016-07-14 16:05:46 -0700345 name: "linker",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700346 defaults: [
347 "linker_bin_template",
348 "linux_bionic_supported",
349 "linker_version_script_overlay",
350 ],
351
Victor Khimenkod15229d2020-05-14 22:14:45 +0200352 srcs: [
353 "linker_translate_path.cpp",
354 ],
355
Colin Cross10fffb42016-12-08 09:57:35 -0800356 symlinks: ["linker_asan"],
Colin Cross97f0aef2016-07-14 16:05:46 -0700357 multilib: {
Colin Cross97f0aef2016-07-14 16:05:46 -0700358 lib64: {
359 suffix: "64",
Colin Cross10fffb42016-12-08 09:57:35 -0800360 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700361 },
Pirama Arumuga Nainarfcd35382019-02-14 13:48:01 -0800362
Ryan Prichard80e40f02019-10-31 19:54:46 -0700363 compile_multilib: "both",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700364
365 recovery_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -0700366 vendor_ramdisk_available: true,
Ryan Prichard80e40f02019-10-31 19:54:46 -0700367 apex_available: [
368 "//apex_available:platform",
369 "com.android.runtime",
370 ],
Pirama Arumuga Nainarfcd35382019-02-14 13:48:01 -0800371
Colin Cross97f0aef2016-07-14 16:05:46 -0700372 target: {
Dan Willemsen7ec52b12016-11-28 17:02:25 -0800373 android: {
Ryan Prichard80e40f02019-10-31 19:54:46 -0700374 srcs: [
375 "linker_debuggerd_android.cpp",
376 ],
Dan Albert4ea19212019-07-23 13:31:14 -0700377 static_libs: [
378 "libc++demangle",
379 "libdebuggerd_handler_fallback",
380 ],
Dan Willemsen7ec52b12016-11-28 17:02:25 -0800381 },
Ryan Prichard80e40f02019-10-31 19:54:46 -0700382 linux_bionic: {
383 static_libs: [
384 "liblinker_debuggerd_stub",
385 ],
Yi Kong6f6daaa2020-12-10 01:27:44 +0800386 },
Colin Cross97f0aef2016-07-14 16:05:46 -0700387 },
Yi Konga7e363f2020-10-01 04:10:01 +0800388
Yi Konge20a1d92022-01-25 03:19:58 +0800389 afdo: true,
Colin Cross97f0aef2016-07-14 16:05:46 -0700390}
dimitry11da1dc2018-01-05 13:35:43 +0100391
Ryan Prichard80e40f02019-10-31 19:54:46 -0700392// ========================================================
393// assorted modules
394// ========================================================
395
Elliott Hughes90f96b92019-05-09 15:56:39 -0700396sh_binary {
397 name: "ldd",
Rupert Shuttlewortha7e29a82021-02-18 13:35:22 +0000398 src: "ldd.sh",
Elliott Hughes90f96b92019-05-09 15:56:39 -0700399}
400
Collin Fijalkovichc9521e02021-04-29 11:31:50 -0700401// Used to generate binaries that can be backed by transparent hugepages.
402cc_defaults {
403 name: "linker_hugepage_aligned",
404 arch: {
405 arm64: {
406 ldflags: ["-z max-page-size=0x200000"],
407 },
408 x86_64: {
409 ldflags: ["-z max-page-size=0x200000"],
410 },
411 },
412}
413
dimitry11da1dc2018-01-05 13:35:43 +0100414cc_library {
415 // NOTE: --exclude-libs=libgcc.a makes sure that any symbols ld-android.so pulls from
416 // libgcc.a are made static to ld-android.so. This in turn ensures that libraries that
417 // a) pull symbols from libgcc.a and b) depend on ld-android.so will not rely on ld-android.so
418 // to provide those symbols, but will instead pull them from libgcc.a. Specifically,
419 // we use this property to make sure libc.so has its own copy of the code from
420 // libgcc.a it uses.
421 //
422 // DO NOT REMOVE --exclude-libs!
423
Yi Kong7786a342018-08-31 19:01:56 -0700424 ldflags: [
425 "-Wl,--exclude-libs=libgcc.a",
Yi Kong7ac2afb2019-05-06 16:23:10 -0700426 "-Wl,--exclude-libs=libgcc_stripped.a",
Yi Kong7786a342018-08-31 19:01:56 -0700427 "-Wl,--exclude-libs=libclang_rt.builtins-arm-android.a",
428 "-Wl,--exclude-libs=libclang_rt.builtins-aarch64-android.a",
Ryan Prichardef147872021-01-28 14:06:52 -0800429 "-Wl,--exclude-libs=libclang_rt.builtins-i686-android.a",
Yi Kong7786a342018-08-31 19:01:56 -0700430 "-Wl,--exclude-libs=libclang_rt.builtins-x86_64-android.a",
431 ],
dimitry11da1dc2018-01-05 13:35:43 +0100432
433 // for x86, exclude libgcc_eh.a for the same reasons as above
434 arch: {
435 x86: {
436 ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
437 },
438 x86_64: {
439 ldflags: ["-Wl,--exclude-libs=libgcc_eh.a"],
440 },
441 },
dimitry581723e2018-01-05 14:31:44 +0100442
443 srcs: ["ld_android.cpp"],
dimitry11da1dc2018-01-05 13:35:43 +0100444 cflags: [
445 "-Wall",
446 "-Wextra",
447 "-Wunused",
448 "-Werror",
449 ],
450 stl: "none",
451
452 name: "ld-android",
Ryan Prichard80e40f02019-10-31 19:54:46 -0700453 defaults: ["linux_bionic_supported", "linker_version_script_overlay"],
Yifan Hong5a39cee2020-01-21 16:43:56 -0800454 ramdisk_available: true,
Yifan Hongb04490d2020-10-21 18:36:36 -0700455 vendor_ramdisk_available: true,
Jiyong Park5603c6e2018-04-27 21:53:11 +0900456 recovery_available: true,
dimitry7f048802019-05-03 15:57:34 +0200457 native_bridge_supported: true,
dimitry11da1dc2018-01-05 13:35:43 +0100458
Ryan Prichard470b6662018-03-27 22:10:55 -0700459 nocrt: true,
dimitry11da1dc2018-01-05 13:35:43 +0100460 system_shared_libs: [],
Martin Stjernholm82d84bc2020-04-06 20:32:09 +0100461 header_libs: ["libc_headers"],
dimitry11da1dc2018-01-05 13:35:43 +0100462
Pirama Arumuga Nainarfcd35382019-02-14 13:48:01 -0800463 // Opt out of native_coverage when opting out of system_shared_libs
464 native_coverage: false,
465
dimitry11da1dc2018-01-05 13:35:43 +0100466 sanitize: {
467 never: true,
468 },
Jiyong Parke87e0dc2019-10-02 17:09:33 +0900469
470 apex_available: [
471 "//apex_available:platform",
472 "com.android.runtime",
473 ],
Yi Kong15a05a72020-09-22 00:56:13 +0800474
475 lto: {
476 never: true,
477 },
dimitry11da1dc2018-01-05 13:35:43 +0100478}
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800479
480cc_test {
481 name: "linker-unit-tests",
Colin Cross0cc60af2021-09-30 14:04:39 -0700482 test_suites: ["device-tests"],
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800483
484 cflags: [
485 "-g",
486 "-Wall",
487 "-Wextra",
488 "-Wunused",
489 "-Werror",
490 ],
491
492 // We need to access Bionic private headers in the linker.
493 include_dirs: ["bionic/libc"],
494
495 srcs: [
496 // Tests.
497 "linker_block_allocator_test.cpp",
498 "linker_config_test.cpp",
499 "linked_list_test.cpp",
Tamas Petz8d55d182020-02-24 14:15:25 +0100500 "linker_note_gnu_property_test.cpp",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800501 "linker_sleb128_test.cpp",
502 "linker_utils_test.cpp",
Ryan Prichard129f7a12019-12-23 16:45:47 -0800503 "linker_gnu_hash_test.cpp",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800504
505 // Parts of the linker that we're testing.
506 "linker_block_allocator.cpp",
507 "linker_config.cpp",
Ryan Prichard551565e2019-12-23 16:03:14 -0800508 "linker_debug.cpp",
Tamas Petz8d55d182020-02-24 14:15:25 +0100509 "linker_note_gnu_property.cpp",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800510 "linker_test_globals.cpp",
511 "linker_utils.cpp",
512 ],
513
514 static_libs: [
515 "libasync_safe",
516 "libbase",
Jiyong Park7157dfb2022-08-19 13:09:18 +0900517 "liblog_for_runtime_apex",
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800518 ],
Ryan Prichard129f7a12019-12-23 16:45:47 -0800519
520 arch: {
521 arm: {
522 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
523 },
524 arm64: {
525 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
526 },
527 },
528}
529
530cc_benchmark {
531 name: "linker-benchmarks",
532
533 srcs: [
534 "linker_gnu_hash_benchmark.cpp",
535 ],
536
537 arch: {
538 arm: {
539 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
540 },
541 arm64: {
542 srcs: ["arch/arm_neon/linker_gnu_hash_neon.cpp"],
543 },
544 },
Elliott Hughes15a2b7b2019-02-15 13:48:38 -0800545}