]> Sergey Matveev's repositories - bfs.git/commitdiff
build: Add liburing on Linux
authorTavian Barnes <tavianator@tavianator.com>
Tue, 11 Jul 2023 18:30:52 +0000 (14:30 -0400)
committerTavian Barnes <tavianator@tavianator.com>
Mon, 2 Oct 2023 16:19:06 +0000 (12:19 -0400)
.github/workflows/ci.yml
.github/workflows/codecov.yml
.github/workflows/codeql.yml
GNUmakefile
README.md
docs/BUILDING.md

index ca1737cf998506ce5cff89891ec404cd92916cea..971a4df6bc0a04ea37023139437863e802b16f44 100644 (file)
@@ -28,9 +28,10 @@ jobs:
               libcap-dev \
               libcap2:i386 \
               libonig-dev \
-              libonig5:i386
+              libonig5:i386 \
+              liburing-dev
           # Ubuntu doesn't let you install the -dev packages for both amd64 and
-          # i386 at once, so we make our own symlinks to fix -m32 -lacl -lattr -lcap
+          # i386 at once, so we make our own symlinks to fix -m32 -lacl -l...
           sudo ln -s libacl.so.1 /lib/i386-linux-gnu/libacl.so
           sudo ln -s libattr.so.1 /lib/i386-linux-gnu/libattr.so
           sudo ln -s libcap.so.2 /lib/i386-linux-gnu/libcap.so
index 783cc431b6cc73c74f6c65e5fdc8ea14eda6ed96..b06ea626f9c030ad72595e2bc9b5a889f4ddd469 100644 (file)
@@ -20,7 +20,8 @@ jobs:
               libattr1-dev \
               libcap2-bin \
               libcap-dev \
-              libonig-dev
+              libonig-dev \
+              liburing-dev
 
       - name: Generate coverage
         run: |
index 88e9f3f4fd8bc8d41dc0953cac67e0cd4e5294ac..3a2f81f79ce403e563779a3a30ad6e1edac70eec 100644 (file)
@@ -37,7 +37,8 @@ jobs:
               libattr1-dev \
               libcap2-bin \
               libcap-dev \
-              libonig-dev
+              libonig-dev \
+              liburing-dev
 
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v2
index 690297928513b44f708d551eff34dff11b7ee9f2..815424057de05e4779bec869858e0a862a41e3c7 100644 (file)
@@ -126,6 +126,7 @@ ifndef NOLIBS
 USE_ACL := y
 USE_ATTR := y
 USE_LIBCAP := y
+USE_LIBURING := y
 endif
 
 ifdef USE_ACL
@@ -146,6 +147,11 @@ else
 LOCAL_CPPFLAGS += -DBFS_USE_SYS_CAPABILITY_H=0
 endif
 
+ifdef USE_LIBURING
+LOCAL_CPPFLAGS += -DBFS_USE_LIBURING=1
+LOCAL_LDLIBS += -luring
+endif
+
 LOCAL_LDFLAGS += -Wl,--as-needed
 LOCAL_LDLIBS += -lrt
 endif # Linux
@@ -287,7 +293,7 @@ ifneq ($(OS),Darwin)
 endif
        +$(MAKE) -B tsan ubsan check CC=clang $(DISTCHECK_FLAGS)
 ifeq ($(OS) $(ARCH),Linux x86_64)
-       +$(MAKE) -B check EXTRA_CFLAGS="-m32" ONIG_CONFIG= $(DISTCHECK_FLAGS)
+       +$(MAKE) -B check EXTRA_CFLAGS="-m32" ONIG_CONFIG= USE_LIBURING= $(DISTCHECK_FLAGS)
 endif
        +$(MAKE) -B release check $(DISTCHECK_FLAGS)
        +$(MAKE) -B check $(DISTCHECK_FLAGS)
index 18af808ff9536a1fb4af5872ce880e8c1693b70e..a7ca335412f5351dc0b079fd3ba9181ec1f60799 100644 (file)
--- a/README.md
+++ b/README.md
@@ -290,22 +290,22 @@ Here's how to install them on some common platforms:
 
 <pre>
 <strong>Alpine Linux</strong>
-# apk add acl{,-dev} attr{,-dev} libcap{,-dev} oniguruma-dev
+# apk add acl{,-dev} attr{,-dev} libcap{,-dev} liburing-dev oniguruma-dev
 
 <strong>Arch Linux</strong>
-# pacman -S acl attr libcap oniguruma
+# pacman -S acl attr libcap liburing oniguruma
 
 <strong>Debian/Ubuntu</strong>
-# apt install acl libacl1-dev attr libattr1-dev libcap2-bin libcap-dev libonig-dev
+# apt install acl libacl1-dev attr libattr1-dev libcap2-bin libcap-dev liburing-dev libonig-dev
 
 <strong>Fedora</strong>
-# dnf install acl libacl-devel libattr-devel libcap-devel oniguruma-devel
+# dnf install acl libacl-devel libattr-devel libcap-devel liburing-devel oniguruma-devel
 
 <strong>NixOS</strong>
-# nix-env -i acl attr libcap oniguruma
+# nix-env -i acl attr libcap liburing oniguruma
 
 <strong>Void Linux</strong>
-# xbps-install -S acl-{devel,progs} attr-{devel,progs} libcap-{devel,progs} oniguruma-devel
+# xbps-install -S acl-{devel,progs} attr-{devel,progs} libcap-{devel,progs} liburing-devel oniguruma-devel
 
 <strong>Homebrew</strong>
 $ brew install oniguruma
index b19ef00b5cac1b7576081139e15228bd225939f7..02f97565d38a82e909a717eb191d1c52eb26548a 100644 (file)
@@ -75,11 +75,13 @@ These dependencies are optional, and can be turned off at build time if necessar
 | [acl]       | Linux only | `USE_ACL`       |
 | [attr]      | Linux only | `USE_ATTR`      |
 | [libcap]    | Linux only | `USE_LIBCAP`    |
+| [liburing]  | Linux only | `USE_LIBURING`  |
 | [Oniguruma] | All        | `USE_ONIGURUMA` |
 
 [acl]: https://savannah.nongnu.org/projects/acl
 [attr]: https://savannah.nongnu.org/projects/attr
 [libcap]: https://sites.google.com/site/fullycapable/
+[liburing]: https://github.com/axboe/liburing
 [Oniguruma]: https://github.com/kkos/oniguruma
 
 ### Dependency tracking