OSDN Git Service

Merge "simpleperf: replace config file with cmdline options." am: e5ad887a62 am:...
[android-x86/system-extras.git] / simpleperf / Android.mk
1 #
2 # Copyright (C) 2015 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 LOCAL_PATH := $(call my-dir)
17
18 simpleperf_version :=  $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)
19
20 simpleperf_common_cppflags := -Wextra -Wunused -Wno-unknown-pragmas \
21                               -DSIMPLEPERF_REVISION='"$(simpleperf_version)"'
22
23 simpleperf_cppflags_target := $(simpleperf_common_cppflags)
24
25 simpleperf_cppflags_host := $(simpleperf_common_cppflags) \
26                             -DUSE_BIONIC_UAPI_HEADERS -I bionic/libc/kernel \
27                             -fvisibility=hidden \
28
29 simpleperf_cppflags_host_darwin := -I $(LOCAL_PATH)/nonlinux_support/include
30 simpleperf_cppflags_host_windows := -I $(LOCAL_PATH)/nonlinux_support/include
31
32
33 LLVM_ROOT_PATH := external/llvm
34 include $(LLVM_ROOT_PATH)/llvm.mk
35
36 simpleperf_static_libraries_target := \
37   libbacktrace_offline \
38   libbacktrace \
39   libunwind \
40   libziparchive \
41   libz \
42   libbase \
43   libcutils \
44   liblog \
45   libprocinfo \
46   libutils \
47   liblzma \
48   libLLVMObject \
49   libLLVMBitReader \
50   libLLVMMC \
51   libLLVMMCParser \
52   libLLVMCore \
53   libLLVMSupport \
54   libprotobuf-cpp-lite \
55   libevent \
56
57 simpleperf_static_libraries_with_libc_target := \
58   $(simpleperf_static_libraries_target) \
59   libc \
60
61 simpleperf_static_libraries_host := \
62   libziparchive \
63   libbase \
64   liblog \
65   liblzma \
66   libz \
67   libutils \
68   libLLVMObject \
69   libLLVMBitReader \
70   libLLVMMC \
71   libLLVMMCParser \
72   libLLVMCore \
73   libLLVMSupport \
74   libprotobuf-cpp-lite \
75
76 simpleperf_static_libraries_host_linux := \
77   libprocinfo \
78   libbacktrace_offline \
79   libbacktrace \
80   libunwind \
81   libcutils \
82   libevent \
83
84 simpleperf_ldlibs_host_linux := -lrt
85
86 # libsimpleperf
87 # =========================================================
88 libsimpleperf_src_files := \
89   cmd_dumprecord.cpp \
90   cmd_help.cpp \
91   cmd_kmem.cpp \
92   cmd_report.cpp \
93   cmd_report_sample.cpp \
94   command.cpp \
95   dso.cpp \
96   event_attr.cpp \
97   event_type.cpp \
98   perf_regs.cpp \
99   read_apk.cpp \
100   read_elf.cpp \
101   record.cpp \
102   record_file_reader.cpp \
103   report_sample.proto \
104   thread_tree.cpp \
105   tracing.cpp \
106   utils.cpp \
107
108 libsimpleperf_src_files_linux := \
109   cmd_list.cpp \
110   cmd_record.cpp \
111   cmd_stat.cpp \
112   dwarf_unwind.cpp \
113   environment.cpp \
114   event_fd.cpp \
115   event_selection_set.cpp \
116   InplaceSamplerClient.cpp \
117   IOEventLoop.cpp \
118   perf_clock.cpp \
119   record_file_writer.cpp \
120   UnixSocket.cpp \
121   workload.cpp \
122
123 libsimpleperf_src_files_darwin := \
124   nonlinux_support/nonlinux_support.cpp \
125
126 libsimpleperf_src_files_windows := \
127   nonlinux_support/nonlinux_support.cpp \
128
129 # libsimpleperf target
130 include $(CLEAR_VARS)
131 LOCAL_CLANG := true
132 LOCAL_MODULE := libsimpleperf
133 LOCAL_MODULE_TAGS := debug
134 LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
135 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
136 LOCAL_SRC_FILES := \
137   $(libsimpleperf_src_files) \
138   $(libsimpleperf_src_files_linux) \
139
140 LOCAL_STATIC_LIBRARIES := $(simpleperf_static_libraries_target)
141 LOCAL_MULTILIB := both
142 LOCAL_PROTOC_OPTIMIZE_TYPE := lite-static
143 include $(LLVM_DEVICE_BUILD_MK)
144 include $(BUILD_STATIC_LIBRARY)
145
146 # libsimpleperf host
147 include $(CLEAR_VARS)
148 #LOCAL_CLANG := true  # Comment it to build on windows.
149 LOCAL_MODULE := libsimpleperf
150 LOCAL_MODULE_HOST_OS := darwin linux windows
151 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
152 LOCAL_CPPFLAGS_darwin := $(simpleperf_cppflags_host_darwin)
153 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
154 LOCAL_CPPFLAGS_windows := $(simpleperf_cppflags_host_windows)
155 LOCAL_SRC_FILES := $(libsimpleperf_src_files)
156 LOCAL_SRC_FILES_darwin := $(libsimpleperf_src_files_darwin)
157 LOCAL_SRC_FILES_linux := $(libsimpleperf_src_files_linux)
158 LOCAL_SRC_FILES_windows := $(libsimpleperf_src_files_windows)
159 LOCAL_STATIC_LIBRARIES := $(simpleperf_static_libraries_host)
160 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
161 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
162 LOCAL_MULTILIB := both
163 LOCAL_PROTOC_OPTIMIZE_TYPE := lite-static
164 LOCAL_CXX_STL := libc++_static
165 include $(LLVM_HOST_BUILD_MK)
166 include $(BUILD_HOST_STATIC_LIBRARY)
167
168
169 # simpleperf
170 # =========================================================
171
172 # simpleperf target
173 include $(CLEAR_VARS)
174 LOCAL_CLANG := true
175 LOCAL_MODULE := simpleperf
176 LOCAL_MODULE_TAGS := debug
177 LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
178 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
179 LOCAL_SRC_FILES := main.cpp
180 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_with_libc_target)
181 ifdef TARGET_2ND_ARCH
182 LOCAL_MULTILIB := both
183 LOCAL_MODULE_STEM_32 := simpleperf32
184 LOCAL_MODULE_STEM_64 := simpleperf
185 endif
186 LOCAL_FORCE_STATIC_EXECUTABLE := true
187 include $(LLVM_DEVICE_BUILD_MK)
188 include $(BUILD_EXECUTABLE)
189
190 $(call dist-for-goals,sdk,$(ALL_MODULES.simpleperf.BUILT))
191 ifdef TARGET_2ND_ARCH
192 $(call dist-for-goals,sdk,$(ALL_MODULES.simpleperf$(TARGET_2ND_ARCH_MODULE_SUFFIX).BUILT))
193 endif
194
195 # simpleperf host
196 include $(CLEAR_VARS)
197 LOCAL_MODULE := simpleperf_host
198 LOCAL_MODULE_HOST_OS := darwin linux windows
199 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
200 LOCAL_CPPFLAGS_darwin := $(simpleperf_cppflags_host_darwin)
201 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
202 LOCAL_CPPFLAGS_windows := $(simpleperf_cppflags_host_windows)
203 LOCAL_SRC_FILES := main.cpp
204 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
205 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
206 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
207 LOCAL_MULTILIB := both
208 LOCAL_MODULE_STEM_32 := simpleperf32
209 LOCAL_MODULE_STEM_64 := simpleperf
210 LOCAL_CXX_STL := libc++_static
211 include $(LLVM_HOST_BUILD_MK)
212 include $(BUILD_HOST_EXECUTABLE)
213
214 $(call dist-for-goals,sdk,$(ALL_MODULES.simpleperf_host.BUILT):simpleperf_host)
215 ifdef HOST_2ND_ARCH
216 $(call dist-for-goals,sdk,$(ALL_MODULES.simpleperf_host$(HOST_2ND_ARCH_MODULE_SUFFIX).BUILT):simpleperf_host32)
217 endif
218 $(call dist-for-goals,win_sdk,$(ALL_MODULES.host_cross_simpleperf_host.BUILT))
219 ifdef HOST_CROSS_2ND_ARCH
220 $(call dist-for-goals,win_sdk,$(ALL_MODULES.host_cross_simpleperf_host$(HOST_CROSS_2ND_ARCH_MODULE_SUFFIX).BUILT))
221 endif
222
223 # libsimpleperf_record.a and libsimpleperf_record.so
224 # They are linked to user's program, to get profile
225 # counters and samples for specified code ranges.
226 # =========================================================
227
228 # libsimpleperf_record.a on target
229 include $(CLEAR_VARS)
230 LOCAL_CLANG := true
231 LOCAL_MODULE := libsimpleperf_record
232 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
233 LOCAL_SRC_FILES := record_lib_interface.cpp
234 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_target)
235 LOCAL_MULTILIB := both
236 LOCAL_CXX_STL := libc++_static
237 LOCAL_LDLIBS := -Wl,--exclude-libs,ALL
238 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
239 include $(LLVM_DEVICE_BUILD_MK)
240 include $(BUILD_STATIC_LIBRARY)
241
242 # libsimpleperf_record.so on target
243 include $(CLEAR_VARS)
244 LOCAL_CLANG := true
245 LOCAL_MODULE := libsimpleperf_record
246 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
247 LOCAL_SRC_FILES := record_lib_interface.cpp
248 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_target)
249 LOCAL_MULTILIB := both
250 LOCAL_CXX_STL := libc++_static
251 LOCAL_LDLIBS := -Wl,--exclude-libs,ALL
252 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
253 include $(LLVM_DEVICE_BUILD_MK)
254 include $(BUILD_SHARED_LIBRARY)
255
256 # libsimpleperf_record.a on host
257 include $(CLEAR_VARS)
258 LOCAL_CLANG := true
259 LOCAL_MODULE := libsimpleperf_record
260 LOCAL_MODULE_HOST_OS := linux
261 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
262 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
263 LOCAL_SRC_FILES := record_lib_interface.cpp
264 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
265 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
266 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux) -Wl,--exclude-libs,ALL
267 LOCAL_MULTILIB := both
268 LOCAL_CXX_STL := libc++_static
269 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
270 include $(LLVM_HOST_BUILD_MK)
271 include $(BUILD_HOST_STATIC_LIBRARY)
272
273 # libsimpleperf_record.so on host
274 include $(CLEAR_VARS)
275 LOCAL_CLANG := true
276 LOCAL_MODULE := libsimpleperf_record
277 LOCAL_MODULE_HOST_OS := linux
278 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
279 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
280 LOCAL_SRC_FILES := record_lib_interface.cpp
281 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
282 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
283 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux) -Wl,--exclude-libs,ALL
284 LOCAL_MULTILIB := both
285 LOCAL_CXX_STL := libc++_static
286 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
287 include $(LLVM_HOST_BUILD_MK)
288 include $(BUILD_HOST_SHARED_LIBRARY)
289
290
291 # libsimpleperf_report.so
292 # It is the shared library used on host by python scripts
293 # to report samples in different ways.
294 # =========================================================
295 include $(CLEAR_VARS)
296 LOCAL_MODULE := libsimpleperf_report
297 LOCAL_MODULE_HOST_OS := darwin linux windows
298 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
299 LOCAL_CPPFLAGS_darwin := $(simpleperf_cppflags_host_darwin)
300 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
301 LOCAL_CPPFLAGS_windows := $(simpleperf_cppflags_host_windows)
302 LOCAL_SRC_FILES := report_lib_interface.cpp
303 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
304 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
305 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux) -Wl,--exclude-libs,ALL
306 LOCAL_MULTILIB := both
307 LOCAL_CXX_STL := libc++_static
308 include $(LLVM_HOST_BUILD_MK)
309 include $(BUILD_HOST_SHARED_LIBRARY)
310
311 $(call dist-for-goals,sdk,$(ALL_MODULES.libsimpleperf_report.BUILT))
312 ifdef HOST_2ND_ARCH
313 $(call dist-for-goals,sdk,$(ALL_MODULES.libsimpleperf_report$(HOST_2ND_ARCH_MODULE_SUFFIX).BUILT):libsimpleperf_report32.so)
314 endif
315 $(call dist-for-goals,win_sdk,$(ALL_MODULES.host_cross_libsimpleperf_report.BUILT):libsimpleperf_report32.dll)
316 ifdef HOST_CROSS_2ND_ARCH
317 $(call dist-for-goals,win_sdk,$(ALL_MODULES.host_cross_libsimpleperf_report$(HOST_CROSS_2ND_ARCH_MODULE_SUFFIX).BUILT))
318 endif
319
320
321 # libsimpleperf_inplace_sampler.so
322 # It is the shared library linked with user's app and get samples from
323 # signal handlers in each thread.
324 # =========================================================
325
326 # libsimpleperf_inplace_sampler.so on target
327 include $(CLEAR_VARS)
328 LOCAL_CLANG := true
329 LOCAL_MODULE := libsimpleperf_inplace_sampler
330 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
331 LOCAL_SRC_FILES := inplace_sampler_lib.cpp
332 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_target)
333 LOCAL_MULTILIB := both
334 LOCAL_CXX_STL := libc++_static
335 LOCAL_LDLIBS := -Wl,--exclude-libs,ALL
336 include $(LLVM_DEVICE_BUILD_MK)
337 include $(BUILD_SHARED_LIBRARY)
338
339 # libsimpleperf_inplace_sampler.so on host
340 include $(CLEAR_VARS)
341 LOCAL_CLANG := true
342 LOCAL_MODULE := libsimpleperf_inplace_sampler
343 LOCAL_MODULE_HOST_OS := linux
344 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
345 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
346 LOCAL_SRC_FILES := inplace_sampler_lib.cpp
347 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
348 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
349 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux) -Wl,--exclude-libs,ALL
350 LOCAL_MULTILIB := both
351 LOCAL_CXX_STL := libc++_static
352 include $(LLVM_HOST_BUILD_MK)
353 include $(BUILD_HOST_SHARED_LIBRARY)
354
355
356 # simpleperf_unit_test
357 # =========================================================
358 simpleperf_unit_test_src_files := \
359   cmd_kmem_test.cpp \
360   cmd_report_test.cpp \
361   cmd_report_sample_test.cpp \
362   command_test.cpp \
363   gtest_main.cpp \
364   read_apk_test.cpp \
365   read_elf_test.cpp \
366   record_test.cpp \
367   sample_tree_test.cpp \
368   utils_test.cpp \
369
370 simpleperf_unit_test_src_files_linux := \
371   cmd_dumprecord_test.cpp \
372   cmd_list_test.cpp \
373   cmd_record_test.cpp \
374   cmd_stat_test.cpp \
375   environment_test.cpp \
376   IOEventLoop_test.cpp \
377   record_file_test.cpp \
378   UnixSocket_test.cpp \
379   workload_test.cpp \
380
381 # simpleperf_unit_test target
382 include $(CLEAR_VARS)
383 LOCAL_CLANG := true
384 LOCAL_MODULE := simpleperf_unit_test
385 LOCAL_COMPATIBILITY_SUITE := device-tests
386 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
387 LOCAL_SRC_FILES := \
388   $(simpleperf_unit_test_src_files) \
389   $(simpleperf_unit_test_src_files_linux) \
390
391 LOCAL_STATIC_LIBRARIES += libsimpleperf $(simpleperf_static_libraries_with_libc_target)
392 LOCAL_TEST_DATA := $(call find-test-data-in-subdirs,$(LOCAL_PATH),"*",testdata)
393 LOCAL_MULTILIB := both
394 LOCAL_FORCE_STATIC_EXECUTABLE := true
395 include $(LLVM_DEVICE_BUILD_MK)
396 include $(BUILD_NATIVE_TEST)
397
398 # simpleperf_unit_test host
399 include $(CLEAR_VARS)
400 LOCAL_MODULE := simpleperf_unit_test
401 LOCAL_MODULE_HOST_OS := darwin linux windows
402 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
403 LOCAL_CPPFLAGS_darwin := $(simpleperf_cppflags_host_darwin)
404 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
405 LOCAL_CPPFLAGS_windows := $(simpleperf_cppflags_host_windows)
406 LOCAL_SRC_FILES := $(simpleperf_unit_test_src_files)
407 LOCAL_SRC_FILES_linux := $(simpleperf_unit_test_src_files_linux)
408 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
409 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
410 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
411 LOCAL_MULTILIB := both
412 include $(LLVM_HOST_BUILD_MK)
413 include $(BUILD_HOST_NATIVE_TEST)
414
415
416 # simpleperf_cpu_hotplug_test
417 # =========================================================
418 simpleperf_cpu_hotplug_test_src_files := \
419   cpu_hotplug_test.cpp \
420
421 # simpleperf_cpu_hotplug_test target
422 include $(CLEAR_VARS)
423 LOCAL_CLANG := true
424 LOCAL_MODULE := simpleperf_cpu_hotplug_test
425 LOCAL_COMPATIBILITY_SUITE := device-tests
426 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
427 LOCAL_SRC_FILES := $(simpleperf_cpu_hotplug_test_src_files)
428 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_with_libc_target)
429 LOCAL_MULTILIB := both
430 LOCAL_FORCE_STATIC_EXECUTABLE := true
431 include $(LLVM_DEVICE_BUILD_MK)
432 include $(BUILD_NATIVE_TEST)
433
434 # simpleperf_cpu_hotplug_test linux host
435 include $(CLEAR_VARS)
436 LOCAL_CLANG := true
437 LOCAL_MODULE := simpleperf_cpu_hotplug_test
438 LOCAL_MODULE_HOST_OS := linux
439 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
440 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
441 LOCAL_SRC_FILES := $(simpleperf_cpu_hotplug_test_src_files)
442 LOCAL_STATIC_LIBRARIES := libsimpleperf $(simpleperf_static_libraries_host)
443 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
444 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
445 LOCAL_MULTILIB := first
446 include $(LLVM_HOST_BUILD_MK)
447 include $(BUILD_HOST_NATIVE_TEST)
448
449
450 # libsimpleperf_cts_test
451 # =========================================================
452 libsimpleperf_cts_test_src_files := \
453   $(libsimpleperf_src_files) \
454   $(libsimpleperf_src_files_linux) \
455   $(simpleperf_unit_test_src_files) \
456   $(simpleperf_unit_test_src_files_linux) \
457
458 # libsimpleperf_cts_test target
459 include $(CLEAR_VARS)
460 LOCAL_CLANG := true
461 LOCAL_MODULE := libsimpleperf_cts_test
462 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target) -DRUN_IN_APP_CONTEXT="\"com.android.simpleperf\""
463 LOCAL_SRC_FILES := $(libsimpleperf_cts_test_src_files)
464 LOCAL_STATIC_LIBRARIES := $(simpleperf_static_libraries_target)
465 LOCAL_MULTILIB := both
466 LOCAL_FORCE_STATIC_EXECUTABLE := true
467 include $(LLVM_DEVICE_BUILD_MK)
468 include $(BUILD_STATIC_TEST_LIBRARY)
469
470 # libsimpleperf_cts_test linux host
471 include $(CLEAR_VARS)
472 LOCAL_CLANG := true
473 LOCAL_MODULE := libsimpleperf_cts_test
474 LOCAL_MODULE_HOST_OS := linux
475 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
476 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
477 LOCAL_SRC_FILES := $(libsimpleperf_cts_test_src_files)
478 LOCAL_STATIC_LIBRARIES := $(simpleperf_static_libraries_host)
479 LOCAL_STATIC_LIBRARIES_linux := $(simpleperf_static_libraries_host_linux)
480 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
481 LOCAL_MULTILIB := both
482 include $(LLVM_HOST_BUILD_MK)
483 include $(BUILD_HOST_STATIC_TEST_LIBRARY)
484
485 # simpleperf_record_test
486 # ============================================================
487
488 # simpleperf_record_test target
489 include $(CLEAR_VARS)
490 LOCAL_CLANG := true
491 LOCAL_MODULE := simpleperf_record_test
492 LOCAL_CPPFLAGS := $(simpleperf_cppflags_target)
493 LOCAL_SRC_FILES := record_lib_test.cpp
494 LOCAL_SHARED_LIBRARIES := libsimpleperf_record
495 LOCAL_MULTILIB := both
496 include $(BUILD_NATIVE_TEST)
497
498 # simpleperf_record_test linux host
499 include $(CLEAR_VARS)
500 LOCAL_CLANG := true
501 LOCAL_MODULE := simpleperf_record_test
502 LOCAL_MODULE_HOST_OS := linux
503 LOCAL_CPPFLAGS := $(simpleperf_cppflags_host)
504 LOCAL_CPPFLAGS_linux := $(simpleperf_cppflags_host_linux)
505 LOCAL_SRC_FILES := record_lib_test.cpp
506 LOCAL_SHARED_LIBRARIES := libsimpleperf_record
507 LOCAL_LDLIBS_linux := $(simpleperf_ldlibs_host_linux)
508 LOCAL_MULTILIB := both
509 include $(BUILD_HOST_NATIVE_TEST)
510
511 include $(call first-makefiles-under,$(LOCAL_PATH))