Fix amalgamated build
Move libperfetto_client_experimental one level up
and point gen_amalgamated to it.
Test: manual. Works, see https://github.com/primiano/perfetto-sdk
Bug: 132678367
Change-Id: If542ffdf9eb303334eddb6f7b4eabca53f7c8459
diff --git a/Android.bp b/Android.bp
index 6e7f7d8..303d83e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -888,6 +888,7 @@
],
static_libs: [
"libgmock",
+ "libperfetto_client_experimental",
"perfetto_src_tracing_ipc",
],
generated_headers: [
diff --git a/BUILD.gn b/BUILD.gn
index 6b8be80..3f5ea70 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -244,6 +244,23 @@
]
}
+ # Client library target for the Android tree.
+ # Still in experimental stage and not API stable yet.
+ # See "libperfetto_client_example" (in Android.bp.extras) for an example
+ # on how to use the Perfetto Client API from the android tree.
+ static_library("libperfetto_client_experimental") {
+ complete_static_lib = true
+ deps = [
+ "gn:default_deps",
+ "src/tracing",
+ "src/tracing:client_api",
+ "src/tracing:platform_posix",
+ ]
+ sources = [
+ "include/perfetto/tracing.h",
+ ]
+ }
+
if (perfetto_build_with_android) {
executable("trace_to_text") {
testonly = true
@@ -268,19 +285,6 @@
"src/android_internal",
]
}
-
- # Client library target for the Android tree.
- # Still in experimental stage and not API stable yet.
- # See "libperfetto_client_example" (in Android.bp.extras) for an example
- # on how to use the Perfetto Client API from the android tree.
- static_library("libperfetto_client_experimental") {
- complete_static_lib = true
- deps = [
- "gn:default_deps",
- "src/tracing:client_api",
- "src/tracing:platform_posix",
- ]
- }
} # if (perfetto_build_with_android)
} # if (perfetto_build_standalone || perfetto_build_with_android)
diff --git a/src/tracing/BUILD.gn b/src/tracing/BUILD.gn
index 9770f56..0e7d670 100644
--- a/src/tracing/BUILD.gn
+++ b/src/tracing/BUILD.gn
@@ -269,20 +269,19 @@
]
}
-if (!perfetto_build_with_embedder) {
+if (perfetto_build_standalone || perfetto_build_with_android) {
source_set("client_api_integrationtests") {
testonly = true
deps = [
":client_api",
":platform_posix",
+ "../../:libperfetto_client_experimental",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
+ "../../include/perfetto/tracing/core",
"../../protos/perfetto/trace:lite",
"../../protos/perfetto/trace:zero",
"../base",
-
- # TODO(primiano): move DataSourceConfig to /include/ and remove this.
- "../../include/perfetto/ext/tracing/core",
]
sources = [
"api_integrationtest.cc",
diff --git a/tools/gen_amalgamated b/tools/gen_amalgamated
index 77bc463..bfc9f97 100755
--- a/tools/gen_amalgamated
+++ b/tools/gen_amalgamated
@@ -31,7 +31,10 @@
# Default targets to include in the result.
default_targets = [
- '//:libperfetto',
+ '//:libperfetto_client_experimental',
+ "//protos/perfetto/trace:zero",
+ "//protos/perfetto/config:zero",
+ "//protos/perfetto/common:zero",
]
# Arguments for the GN output directory (unless overridden from the command