diff mbox series

[liburing,v1,2/3] Makefile: Introduce `LIBURING_CFLAGS` variable

Message ID 20221020114814.63133-3-ammar.faizi@intel.com (mailing list archive)
State New
Headers show
Series Clean up clang `-Wshorten-64-to-32` warnings | expand

Commit Message

Ammar Faizi Oct. 20, 2022, 11:52 a.m. UTC
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>

`LIBURING_CFLAGS` will be appended to `CFLAGS` but it only applies
to files in the `src/` directory (the main library). The first use
case of this variable is for appending a clang-specific flag,
`-Wshorten-64-to-32` in the GitHub bot.

Co-authored-by: Dylan Yudaken <dylany@fb.com>
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 src/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/Makefile b/src/Makefile
index 73a98ba..09617fb 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -5,11 +5,14 @@  includedir ?= $(prefix)/include
 libdir ?= $(prefix)/lib
 libdevdir ?= $(prefix)/lib
 
+LIBURING_CFLAGS ?=
 CPPFLAGS ?=
 override CPPFLAGS += -D_GNU_SOURCE \
 	-Iinclude/ -include ../config-host.h
 CFLAGS ?= -g -O3 -Wall -Wextra -fno-stack-protector
-override CFLAGS += -Wno-unused-parameter -Wno-sign-compare -DLIBURING_INTERNAL
+override CFLAGS += -Wno-unused-parameter -Wno-sign-compare \
+	-DLIBURING_INTERNAL \
+	$(LIBURING_CFLAGS)
 SO_CFLAGS=-fPIC $(CFLAGS)
 L_CFLAGS=$(CFLAGS)
 LINK_FLAGS=