diff options
| author | Krzysztof KosiĆski <krzysio@google.com> | 2020-09-11 09:29:05 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2020-09-11 09:29:05 +0000 |
| commit | fedc32dd6988093f3a0536cc14677278b2dc6481 (patch) | |
| tree | fa1eed7a0305f9e914a768ded998cb1e9276bb0f | |
| parent | daca24e319f5a035ab924c87827065675b7c4d30 (diff) | |
| parent | 1c531254a8342c7a9dd9db2715627e7449bc4cf2 (diff) | |
| download | platform_external_google-benchmark-fedc32dd6988093f3a0536cc14677278b2dc6481.tar.gz platform_external_google-benchmark-fedc32dd6988093f3a0536cc14677278b2dc6481.tar.bz2 platform_external_google-benchmark-fedc32dd6988093f3a0536cc14677278b2dc6481.zip | |
| -rw-r--r-- | Android.bp | 24 |
1 files changed, 18 insertions, 6 deletions
@@ -14,8 +14,8 @@ // limitations under the License. // -cc_library_static { - name: "libgoogle-benchmark", +cc_defaults { + name: "libgoogle-benchmark-defaults", host_supported: true, local_include_dirs: ["include"], vendor_available: true, @@ -25,16 +25,28 @@ cc_library_static { "-Werror", "-Wno-deprecated-declarations", ], - - exclude_srcs: [ - "src/benchmark_main.cc", - ], srcs: [ "src/*.cc", ], export_include_dirs: ["include"], } +// For benchmarks that define their own main(). +cc_library_static { + name: "libgoogle-benchmark", + defaults: ["libgoogle-benchmark-defaults"], + exclude_srcs: [ + "src/benchmark_main.cc", + ], +} + +// For benchmarks that want to use the default main(). +// Make sure this dependency is in the whole_static_libs attribute. +cc_library_static { + name: "libgoogle-benchmark-main", + defaults: ["libgoogle-benchmark-defaults"], +} + cc_test { name: "google-benchmark-test", srcs: ["test/basic_test.cc"], |
