aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof KosiƄski <krzysio@google.com>2020-09-11 09:29:05 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-09-11 09:29:05 +0000
commitfedc32dd6988093f3a0536cc14677278b2dc6481 (patch)
treefa1eed7a0305f9e914a768ded998cb1e9276bb0f
parentdaca24e319f5a035ab924c87827065675b7c4d30 (diff)
parent1c531254a8342c7a9dd9db2715627e7449bc4cf2 (diff)
downloadplatform_external_google-benchmark-fedc32dd6988093f3a0536cc14677278b2dc6481.tar.gz
platform_external_google-benchmark-fedc32dd6988093f3a0536cc14677278b2dc6481.tar.bz2
platform_external_google-benchmark-fedc32dd6988093f3a0536cc14677278b2dc6481.zip
Merge "Add libgoogle-benchmark-main module."HEADmaster
-rw-r--r--Android.bp24
1 files changed, 18 insertions, 6 deletions
diff --git a/Android.bp b/Android.bp
index e886e1c..88fe433 100644
--- a/Android.bp
+++ b/Android.bp
@@ -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"],