Ryan Prichard | 41f1970 | 2019-12-23 13:21:42 -0800 | [diff] [blame] | 1 | // Copyright (C) 2019 The Android Open Source Project |
| 2 | // All rights reserved. |
| 3 | // |
| 4 | // Redistribution and use in source and binary forms, with or without |
| 5 | // modification, are permitted provided that the following conditions |
| 6 | // are met: |
| 7 | // * Redistributions of source code must retain the above copyright |
| 8 | // notice, this list of conditions and the following disclaimer. |
| 9 | // * Redistributions in binary form must reproduce the above copyright |
| 10 | // notice, this list of conditions and the following disclaimer in |
| 11 | // the documentation and/or other materials provided with the |
| 12 | // distribution. |
| 13 | // |
| 14 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 15 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 16 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 17 | // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
| 18 | // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
| 19 | // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| 20 | // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
| 21 | // OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
| 22 | // AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 23 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
| 24 | // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 25 | // SUCH DAMAGE. |
| 26 | |
Bob Badour | aa7d835 | 2021-02-19 13:06:22 -0800 | [diff] [blame] | 27 | package { |
Aditya Choudhary | d9d37c0 | 2024-02-02 13:57:12 +0000 | [diff] [blame] | 28 | default_team: "trendy_team_native_tools_libraries", |
Bob Badour | aa7d835 | 2021-02-19 13:06:22 -0800 | [diff] [blame] | 29 | default_applicable_licenses: ["bionic_benchmarks_license"], |
| 30 | } |
| 31 | |
Ryan Prichard | 41f1970 | 2019-12-23 13:21:42 -0800 | [diff] [blame] | 32 | cc_library_headers { |
| 33 | name: "linker_reloc_bench_headers", |
| 34 | defaults: ["bionic_spawn_benchmark_targets"], |
| 35 | export_include_dirs: ["include"], |
| 36 | } |
| 37 | |
| 38 | // TODO: This benchmark doesn't work with TradeFed/atest because it doesn't copy its test libraries |
| 39 | // into the testcases/linker_reloc_bench directory. The obvious way to do that is to list each |
| 40 | // library in the "data" property, but that doesn't work, because each library is listed as having a |
| 41 | // "link:shared" variant (as opposed to "link:static"), whereas the cc_benchmark has no |
| 42 | // "link:(shared/static)" variation. It appears that Soong needs to be fixed to make this benchmark |
| 43 | // work with TradeFed/atest. |
| 44 | |
| 45 | cc_benchmark { |
| 46 | name: "linker-reloc-bench", |
| 47 | |
| 48 | defaults: [ |
| 49 | "bionic_spawn_benchmark_targets", |
| 50 | "linker_reloc_bench_all_libs", |
| 51 | ], |
| 52 | |
| 53 | data: [":linker_reloc_bench_main"], |
| 54 | srcs: ["linker_reloc_bench.cpp"], |
| 55 | |
| 56 | static_libs: [ |
| 57 | "libbase", |
| 58 | "libbionic_spawn_benchmark", |
Ryan Prichard | f82e39f | 2020-01-15 19:58:27 -0800 | [diff] [blame] | 59 | "liblog", |
Ryan Prichard | 41f1970 | 2019-12-23 13:21:42 -0800 | [diff] [blame] | 60 | ], |
| 61 | } |
| 62 | |
| 63 | cc_defaults { |
| 64 | name: "linker_reloc_bench_binary", |
| 65 | defaults: ["bionic_spawn_benchmark_targets"], |
| 66 | header_libs: ["linker_reloc_bench_headers"], |
| 67 | stl: "none", |
| 68 | gtest: false, |
| 69 | |
| 70 | compile_multilib: "both", |
| 71 | multilib: { |
Elliott Hughes | 1eacc0e | 2024-01-19 19:05:36 +0000 | [diff] [blame] | 72 | lib32: { |
| 73 | suffix: "32", |
| 74 | }, |
| 75 | lib64: { |
| 76 | suffix: "64", |
| 77 | }, |
Ryan Prichard | 41f1970 | 2019-12-23 13:21:42 -0800 | [diff] [blame] | 78 | }, |
| 79 | } |
| 80 | |
| 81 | cc_defaults { |
| 82 | name: "linker_reloc_bench_library", |
| 83 | defaults: ["bionic_spawn_benchmark_targets"], |
| 84 | header_libs: ["linker_reloc_bench_headers"], |
| 85 | stl: "none", |
| 86 | gtest: false, |
| 87 | relative_install_path: "linker-reloc-bench", |
| 88 | |
| 89 | static: { |
| 90 | enabled: false, |
| 91 | }, |
| 92 | } |