diff options
Diffstat (limited to 'Android.bp')
| -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"], |
