blob: d1bea0f65a6df58da3507302d9b19502b6af1cc5 [file] [log] [blame]
Primiano Tucci676f0cc2018-12-03 20:03:26 +01001# Copyright (C) 2018 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../../gn/perfetto.gni")
16
17source_set("headers") {
18 deps = [
19 "../../gn:default_deps",
20 ]
21 sources = [
Isabelle Taylorf3edbfa2019-03-26 11:07:19 +000022 "atrace_hal.h",
Primiano Tucciec62e3e2019-07-26 22:18:31 +010023 "dropbox_service.h",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010024 "health_hal.h",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010025 "incident_service.h",
Esteban Talavera1fecac92019-01-09 16:06:29 +000026 "power_stats_hal.h",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010027 ]
28}
29
Primiano Tuccia6ebe132019-07-24 22:59:23 +010030source_set("lazy_library_loader") {
31 public_deps = [
32 ":headers",
33 ]
34 deps = [
35 "../../gn:default_deps",
36 "../../src/base",
37 ]
38 sources = [
39 "lazy_library_loader.cc",
40 "lazy_library_loader.h",
41 ]
42 libs = [ "dl" ]
43}
44
Primiano Tucci676f0cc2018-12-03 20:03:26 +010045# This target proxies calls to Android internal libraries that are not part of
46# the NDK. See README.md.
47source_set("android_internal") {
48 visibility = [ "//:libperfetto_android_internal" ]
49 deps = [
50 ":headers",
51 "../../gn:default_deps",
52 ]
53 if (perfetto_build_with_android) {
54 sources = [
Isabelle Taylorf3edbfa2019-03-26 11:07:19 +000055 "atrace_hal.cc",
Primiano Tucciec62e3e2019-07-26 22:18:31 +010056 "dropbox_service.cc",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010057 "health_hal.cc",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010058 "incident_service.cc",
Esteban Talavera1fecac92019-01-09 16:06:29 +000059 "power_stats_hal.cc",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010060 ]
61 libs = [
62 "android.hardware.health@2.0",
Esteban Talavera1fecac92019-01-09 16:06:29 +000063 "android.hardware.power.stats@1.0",
Isabelle Taylorf3edbfa2019-03-26 11:07:19 +000064 "android.hardware.atrace@1.0",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010065 "base",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010066 "binder",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010067 "log",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010068 "hidlbase",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010069 "incident",
Primiano Tucciec62e3e2019-07-26 22:18:31 +010070 "services",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010071 "utils",
72 ]
73 }
74
75 # This target should never depend on any other perfetto target to avoid ODR
76 # violation by doubly linking code in two .so(s) loaded in the same exe.
77 assert_no_deps = [
78 "//src/base/*",
79 "//src/tracing/*",
80 "//include/*",
81 ]
82}