1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["system_extras_memory_replay_license"], 19} 20 21// Added automatically by a large-scale-change 22// See: http://go/android-license-faq 23license { 24 name: "system_extras_memory_replay_license", 25 visibility: [":__subpackages__"], 26 license_kinds: [ 27 "SPDX-license-identifier-Apache-2.0", 28 ], 29 license_text: [ 30 "NOTICE", 31 ], 32} 33 34cc_defaults { 35 name: "memory_flag_defaults", 36 host_supported: false, 37 38 cflags: [ 39 "-Wall", 40 "-Wextra", 41 "-Werror", 42 ], 43 44 compile_multilib: "both", 45} 46 47cc_defaults { 48 name: "memory_replay_defaults", 49 defaults: ["memory_flag_defaults"], 50 51 srcs: [ 52 "Alloc.cpp", 53 "File.cpp", 54 "NativeInfo.cpp", 55 "Pointers.cpp", 56 "Thread.cpp", 57 "Threads.cpp", 58 ], 59 60 shared_libs: [ 61 "libbase", 62 "libziparchive", 63 ], 64 65 static_libs: [ 66 "libasync_safe", 67 ], 68} 69 70cc_binary { 71 name: "memory_replay", 72 defaults: ["memory_replay_defaults"], 73 74 srcs: ["main.cpp"], 75 76 multilib: { 77 lib32: { 78 suffix: "32", 79 }, 80 lib64: { 81 suffix: "64", 82 }, 83 }, 84} 85 86cc_test { 87 name: "memory_replay_tests", 88 defaults: ["memory_replay_defaults"], 89 isolated: true, 90 91 srcs: [ 92 "tests/AllocTest.cpp", 93 "tests/FileTest.cpp", 94 "tests/NativeInfoTest.cpp", 95 "tests/PointersTest.cpp", 96 "tests/ThreadTest.cpp", 97 "tests/ThreadsTest.cpp", 98 ], 99 100 local_include_dirs: ["tests"], 101 102 target: { 103 android: { 104 test_suites: ["device-tests"], 105 }, 106 }, 107 108 data: [ 109 "tests/test.txt", 110 "tests/test.zip", 111 ], 112} 113 114cc_benchmark { 115 name: "trace_benchmark", 116 defaults: ["memory_flag_defaults"], 117 118 srcs: [ 119 "Alloc.cpp", 120 "TraceBenchmark.cpp", 121 "File.cpp", 122 ], 123 124 shared_libs: [ 125 "libbase", 126 "libziparchive", 127 ], 128 129 data: [ 130 "traces/*.zip", 131 ], 132} 133