public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next] selftests/bpf: add SKIP_LLVM makefile variable
@ 2025-05-22  1:38 Mykyta Yatsenko
  2025-05-22 16:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Mykyta Yatsenko @ 2025-05-22  1:38 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel, kafai, kernel-team; +Cc: Mykyta Yatsenko

From: Mykyta Yatsenko <yatsenko@meta.com>

Introduce SKIP_LLVM makefile variable that allows to avoid using llvm
dependencies when building BPF selftests. This is different from
existing feature-llvm, as the latter is a result of automatic detection
and should not be set by user explicitly.
Avoiding llvm dependencies could be useful for environments that do not
have them, given that as of now llvm dependencies are required only by
jit_disasm_helpers.c.

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
---
 tools/testing/selftests/bpf/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 0d04cf54068e..ac2a8e4c8b6e 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -34,6 +34,9 @@ OPT_FLAGS	?= $(if $(RELEASE),-O2,-O0)
 LIBELF_CFLAGS	:= $(shell $(PKG_CONFIG) libelf --cflags 2>/dev/null)
 LIBELF_LIBS	:= $(shell $(PKG_CONFIG) libelf --libs 2>/dev/null || echo -lelf)
 
+SKIP_DOCS	?=
+SKIP_LLVM	?=
+
 ifeq ($(srctree),)
 srctree := $(patsubst %/,%,$(dir $(CURDIR)))
 srctree := $(patsubst %/,%,$(dir $(srctree)))
@@ -172,6 +175,7 @@ override OUTPUT := $(patsubst %/,%,$(OUTPUT))
 endif
 endif
 
+ifneq ($(SKIP_LLVM),1)
 ifeq ($(feature-llvm),1)
   LLVM_CFLAGS  += -DHAVE_LLVM_SUPPORT
   LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets
@@ -187,6 +191,7 @@ ifeq ($(feature-llvm),1)
   endif
   LLVM_LDFLAGS += $(shell $(LLVM_CONFIG) --ldflags)
 endif
+endif
 
 SCRATCH_DIR := $(OUTPUT)/tools
 BUILD_DIR := $(SCRATCH_DIR)/build
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf-next] selftests/bpf: add SKIP_LLVM makefile variable
  2025-05-22  1:38 [PATCH bpf-next] selftests/bpf: add SKIP_LLVM makefile variable Mykyta Yatsenko
@ 2025-05-22 16:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-05-22 16:40 UTC (permalink / raw)
  To: Mykyta Yatsenko; +Cc: bpf, ast, andrii, daniel, kafai, kernel-team, yatsenko

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Thu, 22 May 2025 02:38:13 +0100 you wrote:
> From: Mykyta Yatsenko <yatsenko@meta.com>
> 
> Introduce SKIP_LLVM makefile variable that allows to avoid using llvm
> dependencies when building BPF selftests. This is different from
> existing feature-llvm, as the latter is a result of automatic detection
> and should not be set by user explicitly.
> Avoiding llvm dependencies could be useful for environments that do not
> have them, given that as of now llvm dependencies are required only by
> jit_disasm_helpers.c.
> 
> [...]

Here is the summary with links:
  - [bpf-next] selftests/bpf: add SKIP_LLVM makefile variable
    https://git.kernel.org/bpf/bpf-next/c/5ead949920c7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-05-22 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-22  1:38 [PATCH bpf-next] selftests/bpf: add SKIP_LLVM makefile variable Mykyta Yatsenko
2025-05-22 16:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox