From 5f3074fb5383b0ee784d8a0f333c0154fbe2b1e2 Mon Sep 17 00:00:00 2001 From: rightblank Date: Tue, 27 Aug 2024 23:05:20 +0800 Subject: [PATCH] build: use the system lib luajit for s390x (#9172) Signed-off-by: YingJie Fu --- README.md | 2 +- cmake/s390x.cmake | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a6ba08be9e8..be2e805cc50 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ Fluent Bit is fully supported on Windows environments, get started with [these i #### Running on s390x -Fluent Bit is supported on Linux on IBM Z(s390x), but the WASM and LUA filter plugins are not. +Fluent Bit runs on Linux on IBM Z(s390x), but the WASM filter plugin is not. For the LUA filter plugin, it runs when `libluajit` is installed on the system and fluent bit is built with `FLB_LUAJIT` and `FLB_PREFER_SYSTEM_LIB_LUAJIT` on. ### Plugins: Inputs, Filters and Outputs diff --git a/cmake/s390x.cmake b/cmake/s390x.cmake index af70127ceb4..c93633636a0 100644 --- a/cmake/s390x.cmake +++ b/cmake/s390x.cmake @@ -3,6 +3,10 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(SystemZ|s390x)") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char") message(STATUS "Cannot build WAMR on this platform, so WASM support is disabled.") set(FLB_WASM OFF) - message(STATUS "This platform does not support LuaJIT, so it's disabled.") - set(FLB_LUAJIT OFF) + if(FLB_LUAJIT) + if(NOT FLB_PREFER_SYSTEM_LIB_LUAJIT) + message(WARNING "LuaJIT is disabled, this platform does not support built-in LuaJIT. To use lua filter on this platform, install LuaJIT as system lib and build again with both FLB_LUAJIT and FLB_PREFER_SYSTEM_LIB_LUAJIT on.") + set(FLB_LUAJIT OFF) + endif() + endif() endif ()