diff options
| author | Brendan Jackman <jackmanb@google.com> | 2025-08-28 12:28:00 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2025-09-13 16:55:25 -0700 |
| commit | 953dad21bb691b77265bf5a9acdec5769596b8e0 (patch) | |
| tree | ac2f7fdeedc372e4cf9bdc9ff23e294f497b921e | |
| parent | d794cd23dc81f4e61eb166a214ea22a5b6a09d02 (diff) | |
tools: testing: support EXTRA_CFLAGS in shared.mk
This allows the user to set cflags when building tests that use this
shared build infrastructure.
For example, it enables building with -Werror so that patch-check scripts
will fail:
make -C tools/testing/vma -j EXTRA_CFLAGS=-Werror
Link: https://lkml.kernel.org/r/20250828-b4-vma-no-atomic-h-v2-3-02d146a58ed2@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Acked-by: Pedro Falcato <pfalcato@suse.de>
Cc: Jann Horn <jannh@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
| -rw-r--r-- | tools/testing/shared/shared.mk | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/shared/shared.mk b/tools/testing/shared/shared.mk index 937aaa762332..5bcdf26c8a9d 100644 --- a/tools/testing/shared/shared.mk +++ b/tools/testing/shared/shared.mk @@ -4,6 +4,7 @@ include ../../scripts/Makefile.arch CFLAGS += -I../shared -I. -I../../include -I../../arch/$(SRCARCH)/include \ -I../../../lib -g -Og -Wall \ -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined +CFLAGS += $(EXTRA_CFLAGS) LDFLAGS += -fsanitize=address -fsanitize=undefined LDLIBS += -lpthread -lurcu LIBS := slab.o find_bit.o bitmap.o hweight.o vsprintf.o |
