Skip to content

Commit 970ae86

Browse files
acmelnamhyung
authored andcommitted
perf build: The bfd features are opt-in, stop testing for them by default
These are leftovers noticed while updating a build container. We don't need those so that test-all.c can build and thus speed up the feature detection. Test for those features only if the user asks for BUILD_NONDISTRO=1 to build with libbfd. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Reviewed-by: James Clark <[email protected]> Reviewed-by: Ian Rogers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 7c750d3 commit 970ae86

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

tools/build/feature/test-all.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@
6666
# include "test-libslang.c"
6767
#undef main
6868

69-
#define main main_test_libbfd
70-
# include "test-libbfd.c"
71-
#undef main
72-
73-
#define main main_test_libbfd_buildid
74-
# include "test-libbfd-buildid.c"
75-
#undef main
76-
7769
#define main main_test_backtrace
7870
# include "test-backtrace.c"
7971
#undef main
@@ -158,14 +150,6 @@
158150
# include "test-reallocarray.c"
159151
#undef main
160152

161-
#define main main_test_disassembler_four_args
162-
# include "test-disassembler-four-args.c"
163-
#undef main
164-
165-
#define main main_test_disassembler_init_styled
166-
# include "test-disassembler-init-styled.c"
167-
#undef main
168-
169153
#define main main_test_libzstd
170154
# include "test-libzstd.c"
171155
#undef main
@@ -193,8 +177,6 @@ int main(int argc, char *argv[])
193177
main_test_libelf_gelf_getnote();
194178
main_test_libelf_getshdrstrndx();
195179
main_test_libslang();
196-
main_test_libbfd();
197-
main_test_libbfd_buildid();
198180
main_test_backtrace();
199181
main_test_libnuma();
200182
main_test_numa_num_possible_cpus();
@@ -213,7 +195,6 @@ int main(int argc, char *argv[])
213195
main_test_setns();
214196
main_test_libaio();
215197
main_test_reallocarray();
216-
main_test_disassembler_four_args();
217198
main_test_libzstd();
218199
main_test_libtraceevent();
219200
main_test_libtracefs();

tools/perf/Makefile.config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,8 @@ ifneq ($(NO_JEVENTS),1)
926926
endif
927927

928928
ifdef BUILD_NONDISTRO
929+
$(call feature_check,libbfd)
930+
929931
ifeq ($(feature-libbfd), 1)
930932
EXTLIBS += -lbfd -lopcodes
931933
else
@@ -954,6 +956,9 @@ ifdef BUILD_NONDISTRO
954956

955957
CFLAGS += -DHAVE_LIBBFD_SUPPORT
956958
CXXFLAGS += -DHAVE_LIBBFD_SUPPORT
959+
960+
$(call feature_check,libbfd-buildid)
961+
957962
ifeq ($(feature-libbfd-buildid), 1)
958963
CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT
959964
else

0 commit comments

Comments
 (0)