From 4395c7e96a4c99c4822fb10213aa5e620c23ce09 Mon Sep 17 00:00:00 2001 From: Lipeng Zhu Date: Wed, 20 Mar 2024 07:58:37 -0400 Subject: [PATCH] build liburing if USE_IO_URING is true --- deps/Makefile | 9 +++++++++ src/Makefile | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/deps/Makefile b/deps/Makefile index 3bf0363d5c25..944ee31c019d 100644 --- a/deps/Makefile +++ b/deps/Makefile @@ -40,6 +40,7 @@ distclean: -(cd linenoise && $(MAKE) clean) > /dev/null || true -(cd lua && $(MAKE) clean) > /dev/null || true -(cd jemalloc && [ -f Makefile ] && $(MAKE) distclean) > /dev/null || true + -(cd liburing && [ -f Makefile ] && $(MAKE) clean) > /dev/null || true -(cd hdr_histogram && $(MAKE) clean) > /dev/null || true -(cd fpconv && $(MAKE) clean) > /dev/null || true -(rm -f .make-*) @@ -116,3 +117,11 @@ jemalloc: .make-prerequisites cd jemalloc && $(MAKE) lib/libjemalloc.a .PHONY: jemalloc + +liburing: .make-prerequisites + @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) + cd liburing && ./configure --cc=gcc --cxx=g++ + cd liburing && $(MAKE) + + +.PHONY: liburing diff --git a/src/Makefile b/src/Makefile index 81349e358879..6edcdfbe0bd4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -280,8 +280,9 @@ ifeq ($(uname_S),Linux) endif ifeq ($(USE_IO_URING),yes) - FINAL_CFLAGS+= -DUSE_IO_URING - FINAL_LIBS+= -luring + DEPENDENCY_TARGETS+= liburing + FINAL_CFLAGS+= -DUSE_IO_URING -I../deps/liburing/include + FINAL_LIBS := ../deps/liburing/src/liburing.a $(FINAL_LIBS) endif # LIBSSL & LIBCRYPTO