blob: 52e86e1178e65927369f8da62eb693653053c5d9 [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 Tucci676f0cc2018-12-03 20:03:26 +010023 "health_hal.h",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010024 "incident_service.h",
Esteban Talavera1fecac92019-01-09 16:06:29 +000025 "power_stats_hal.h",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010026 ]
27}
28
Primiano Tuccia6ebe132019-07-24 22:59:23 +010029source_set("lazy_library_loader") {
30 public_deps = [
31 ":headers",
32 ]
33 deps = [
34 "../../gn:default_deps",
35 "../../src/base",
36 ]
37 sources = [
38 "lazy_library_loader.cc",
39 "lazy_library_loader.h",
40 ]
41 libs = [ "dl" ]
42}
43
Primiano Tucci676f0cc2018-12-03 20:03:26 +010044# This target proxies calls to Android internal libraries that are not part of
45# the NDK. See README.md.
46source_set("android_internal") {
47 visibility = [ "//:libperfetto_android_internal" ]
48 deps = [
49 ":headers",
50 "../../gn:default_deps",
51 ]
52 if (perfetto_build_with_android) {
53 sources = [
Isabelle Taylorf3edbfa2019-03-26 11:07:19 +000054 "atrace_hal.cc",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010055 "health_hal.cc",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010056 "incident_service.cc",
Esteban Talavera1fecac92019-01-09 16:06:29 +000057 "power_stats_hal.cc",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010058 ]
59 libs = [
60 "android.hardware.health@2.0",
Esteban Talavera1fecac92019-01-09 16:06:29 +000061 "android.hardware.power.stats@1.0",
Isabelle Taylorf3edbfa2019-03-26 11:07:19 +000062 "android.hardware.atrace@1.0",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010063 "base",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010064 "binder",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010065 "log",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010066 "hidlbase",
Ryan Savitski53ca60b2019-06-03 13:04:40 +010067 "incident",
Primiano Tucci676f0cc2018-12-03 20:03:26 +010068 "utils",
69 ]
70 }
71
72 # This target should never depend on any other perfetto target to avoid ODR
73 # violation by doubly linking code in two .so(s) loaded in the same exe.
74 assert_no_deps = [
75 "//src/base/*",
76 "//src/tracing/*",
77 "//include/*",
78 ]
79}