1# Copyright (C) 2022 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/test.gni") 16 17source_set("intern_map") { 18 deps = [ 19 "../../gn:default_deps", 20 "../../include/perfetto/public", 21 "../base", 22 ] 23 sources = [ 24 "intern_map.cc", 25 "intern_map.h", 26 ] 27} 28 29source_set("shared_lib") { 30 deps = [ 31 ":intern_map", 32 "../../gn:default_deps", 33 "../../include/perfetto/protozero", 34 "../../include/perfetto/public", 35 "../base", 36 "../tracing:client_api", 37 "../tracing:platform_impl", 38 ] 39 sources = [ 40 "data_source.cc", 41 "heap_buffer.cc", 42 "pb_decoder.cc", 43 "producer.cc", 44 "reset_for_testing.h", 45 "stream_writer.cc", 46 "stream_writer.h", 47 "thread_utils.cc", 48 "tracing_session.cc", 49 "track_event.cc", 50 ] 51 defines = [ "PERFETTO_SHLIB_SDK_IMPLEMENTATION" ] 52} 53 54shared_library("libperfetto_c") { 55 deps = [ 56 ":shared_lib", 57 "../../gn:default_deps", 58 ] 59 public_deps = [ "../../include/perfetto/public" ] 60} 61 62perfetto_unittest_source_set("unittests") { 63 testonly = true 64 deps = [ 65 ":intern_map", 66 "../../gn:default_deps", 67 "../../gn:gtest_and_gmock", 68 "../base", 69 "../base:test_support", 70 ] 71 sources = [ "intern_map_unittest.cc" ] 72} 73