xref: /linux/tools/perf/tests/Build (revision c358f53871605a1a8d7ed6e544a05ea00e9c80cb)
1# SPDX-License-Identifier: GPL-2.0
2
3perf-y += builtin-test.o
4perf-y += builtin-test-list.o
5perf-y += parse-events.o
6perf-y += dso-data.o
7perf-y += attr.o
8perf-y += vmlinux-kallsyms.o
9perf-y += openat-syscall.o
10perf-y += openat-syscall-all-cpus.o
11perf-y += openat-syscall-tp-fields.o
12perf-y += mmap-basic.o
13perf-y += perf-record.o
14perf-y += evsel-roundtrip-name.o
15perf-y += evsel-tp-sched.o
16perf-y += fdarray.o
17perf-y += pmu.o
18perf-y += pmu-events.o
19perf-y += hists_common.o
20perf-y += hists_link.o
21perf-y += hists_filter.o
22perf-y += hists_output.o
23perf-y += hists_cumulate.o
24perf-y += python-use.o
25perf-y += bp_signal.o
26perf-y += bp_signal_overflow.o
27perf-y += bp_account.o
28perf-y += wp.o
29perf-y += task-exit.o
30perf-y += sw-clock.o
31perf-y += mmap-thread-lookup.o
32perf-y += thread-maps-share.o
33perf-y += switch-tracking.o
34perf-y += keep-tracking.o
35perf-y += code-reading.o
36perf-y += sample-parsing.o
37perf-y += parse-no-sample-id-all.o
38perf-y += kmod-path.o
39perf-y += thread-map.o
40perf-y += llvm.o llvm-src-base.o llvm-src-kbuild.o llvm-src-prologue.o llvm-src-relocation.o
41perf-y += bpf.o
42perf-y += topology.o
43perf-y += mem.o
44perf-y += cpumap.o
45perf-y += stat.o
46perf-y += event_update.o
47perf-y += event-times.o
48perf-y += expr.o
49perf-y += backward-ring-buffer.o
50perf-y += sdt.o
51perf-y += is_printable_array.o
52perf-y += bitmap.o
53perf-y += perf-hooks.o
54perf-y += clang.o
55perf-y += unit_number__scnprintf.o
56perf-y += mem2node.o
57perf-y += maps.o
58perf-y += time-utils-test.o
59perf-y += genelf.o
60perf-y += api-io.o
61perf-y += demangle-java-test.o
62perf-y += demangle-ocaml-test.o
63perf-y += pfm.o
64perf-y += parse-metric.o
65perf-y += pe-file-parsing.o
66perf-y += expand-cgroup.o
67perf-y += perf-time-to-tsc.o
68perf-y += dlfilter-test.o
69perf-y += sigtrap.o
70
71$(OUTPUT)tests/llvm-src-base.c: tests/bpf-script-example.c tests/Build
72	$(call rule_mkdir)
73	$(Q)echo '#include <tests/llvm.h>' > $@
74	$(Q)echo 'const char test_llvm__bpf_base_prog[] =' >> $@
75	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
76	$(Q)echo ';' >> $@
77
78$(OUTPUT)tests/llvm-src-kbuild.c: tests/bpf-script-test-kbuild.c tests/Build
79	$(call rule_mkdir)
80	$(Q)echo '#include <tests/llvm.h>' > $@
81	$(Q)echo 'const char test_llvm__bpf_test_kbuild_prog[] =' >> $@
82	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
83	$(Q)echo ';' >> $@
84
85$(OUTPUT)tests/llvm-src-prologue.c: tests/bpf-script-test-prologue.c tests/Build
86	$(call rule_mkdir)
87	$(Q)echo '#include <tests/llvm.h>' > $@
88	$(Q)echo 'const char test_llvm__bpf_test_prologue_prog[] =' >> $@
89	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
90	$(Q)echo ';' >> $@
91
92$(OUTPUT)tests/llvm-src-relocation.c: tests/bpf-script-test-relocation.c tests/Build
93	$(call rule_mkdir)
94	$(Q)echo '#include <tests/llvm.h>' > $@
95	$(Q)echo 'const char test_llvm__bpf_test_relocation[] =' >> $@
96	$(Q)sed -e 's/"/\\"/g' -e 's/\(.*\)/"\1\\n"/g' $< >> $@
97	$(Q)echo ';' >> $@
98
99ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 arm arm64 powerpc))
100perf-$(CONFIG_DWARF_UNWIND) += dwarf-unwind.o
101endif
102
103CFLAGS_attr.o         += -DBINDIR="BUILD_STR($(bindir_SQ))" -DPYTHON="BUILD_STR($(PYTHON_WORD))"
104CFLAGS_python-use.o   += -DPYTHONPATH="BUILD_STR($(OUTPUT)python)" -DPYTHON="BUILD_STR($(PYTHON_WORD))"
105CFLAGS_dwarf-unwind.o += -fno-optimize-sibling-calls
106