Skip to content

Commit b0618f3

Browse files
committed
perf build: Gracefully fail the build if BUILD_BPF_SKEL=1 is specified and clang isn't available
Build BPF skels require having a compiler able to generate BPF bytecode, and so far this is only possible with clang, so check for its availability and fail the build when the user explicitely ask for BPF skels to be built. Acked-by: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Andrii Nakryiko <[email protected]>, Cc: Ian Rogers <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Song Liu <[email protected]> Yang: Yang Jihong <[email protected]>, Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 5f0b89e commit b0618f3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/perf/Makefile.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ ifeq ($(call get-executable,$(BISON)),)
216216
dummy := $(error Error: $(BISON) is missing on this system, please install it)
217217
endif
218218

219+
ifeq ($(BUILD_BPF_SKEL),1)
220+
ifeq ($(call get-executable,$(CLANG)),)
221+
dummy := $(error $(CLANG) is missing on this system, please install it to be able to build with BUILD_BPF_SKEL=1)
222+
endif
223+
endif
224+
219225
ifneq ($(OUTPUT),)
220226
ifeq ($(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 371), 1)
221227
BISON_FILE_PREFIX_MAP := --file-prefix-map=$(OUTPUT)=

0 commit comments

Comments
 (0)