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 15python_defaults { 16 name: "perfprofd_python_default", 17 version: { 18 py2: { 19 enabled: true, 20 embedded_launcher: true, 21 }, 22 py3: { 23 enabled: false, 24 embedded_launcher: false, 25 }, 26 }, 27} 28 29python_binary_host { 30 name: "perf_proto_stack", 31 defaults: ["perfprofd_python_default"], 32 main: "perf_proto_stack.py", 33 srcs: [ 34 "perf_proto_stack.py", 35 "sorted_collection.py", 36 ":quipper_data_proto", 37 ":perfprofd_record_proto", 38 ], 39 libs: [ 40 "python-symbol", 41 // Soong won't add "libprotobuf-python" to the dependencies if 42 // filegroup contains .proto files. So add it here explicitly. 43 "libprotobuf-python", 44 ], 45 proto: { 46 canonical_path_from_root: false, 47 include_dirs: ["external/perf_data_converter/src/quipper"], 48 }, 49 required: [ "unwind_symbols" ], 50} 51 52python_binary_host { 53 name: "perf_proto_json2sqlite", 54 defaults: ["perfprofd_python_default"], 55 main: "perf_proto_json2sqlite.py", 56 srcs: [ 57 "perf_proto_json2sqlite.py", 58 ], 59} 60 61python_binary_host { 62 name: "perf_proto_flames", 63 defaults: ["perfprofd_python_default"], 64 main: "perf_proto_stack_sqlite_flame.py", 65 srcs: [ 66 "perf_proto_stack_sqlite_flame.py", 67 ], 68 libs: [ 69 "simpleperf-inferno", 70 ], 71} 72 73python_binary_host { 74 name: "perf_config_proto", 75 defaults: ["perfprofd_python_default"], 76 main: "perf_config_proto.py", 77 srcs: [ 78 "perf_config_proto.py", 79 ":perfprofd_config_proto", 80 ], 81 libs: [ 82 // Soong won't add "libprotobuf-python" to the dependencies if 83 // filegroup contains .proto files. So add it here explicitly. 84 "libprotobuf-python", 85 ], 86 proto: { 87 canonical_path_from_root: false, 88 }, 89} 90