1//
2// Copyright (C) 2016 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
17cc_defaults {
18    name: "profman-defaults",
19    host_supported: true,
20    defaults: ["art_defaults"],
21    srcs: [
22        "boot_image_profile.cc",
23        "profman.cc",
24        "profile_assistant.cc",
25    ],
26
27    target: {
28        android: {
29            // Use the 32-bit version of profman on devices.
30            compile_multilib: "prefer32",
31        },
32        darwin: {
33            enabled: true,
34        },
35    },
36
37    shared_libs: [
38        "libbase",
39    ],
40}
41
42art_cc_binary {
43    name: "profman",
44    defaults: ["profman-defaults"],
45    shared_libs: [
46        "libprofile",
47        "libdexfile",
48        "libartbase",
49    ],
50    apex_available: [
51        "com.android.art.release",
52        "com.android.art.debug",
53    ],
54}
55
56art_cc_binary {
57    name: "profmand",
58    defaults: [
59        "art_debug_defaults",
60        "profman-defaults",
61    ],
62    shared_libs: [
63        "libprofiled",
64        "libdexfiled",
65        "libartbased",
66    ],
67    apex_available: [
68        "com.android.art.debug",
69    ],
70}
71
72art_cc_binary {
73    name: "profmans",
74    defaults: [
75        "profman-defaults",
76        "libprofile_static_defaults",
77        "libdexfile_static_defaults",
78        "libartbase_static_defaults",
79    ],
80    host_supported: true,
81    device_supported: false,
82    target: {
83        darwin: {
84            enabled: false,
85        },
86        windows: {
87            enabled: true,
88            cflags: ["-Wno-thread-safety"],
89        },
90    },
91}
92
93art_cc_test {
94    name: "art_profman_tests",
95    defaults: [
96        "art_gtest_defaults",
97    ],
98    shared_libs: [
99        "libprofiled",
100    ],
101    srcs: ["profile_assistant_test.cc"],
102}
103