1# 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 = [ 22 "atrace_hal.h", 23 "health_hal.h", 24 "incident_service.h", 25 "power_stats_hal.h", 26 ] 27} 28 29# This target proxies calls to Android internal libraries that are not part of 30# the NDK. See README.md. 31source_set("android_internal") { 32 visibility = [ "//:libperfetto_android_internal" ] 33 deps = [ 34 ":headers", 35 "../../gn:default_deps", 36 ] 37 if (perfetto_build_with_android) { 38 sources = [ 39 "atrace_hal.cc", 40 "health_hal.cc", 41 "incident_service.cc", 42 "power_stats_hal.cc", 43 ] 44 libs = [ 45 "android.hardware.health@2.0", 46 "android.hardware.power.stats@1.0", 47 "android.hardware.atrace@1.0", 48 "base", 49 "binder", 50 "log", 51 "hidlbase", 52 "hidltransport", 53 "hwbinder", 54 "incident", 55 "services", 56 "utils", 57 ] 58 } 59 60 # This target should never depend on any other perfetto target to avoid ODR 61 # violation by doubly linking code in two .so(s) loaded in the same exe. 62 assert_no_deps = [ 63 "//src/base/*", 64 "//src/tracing/*", 65 "//include/*", 66 ] 67} 68