Skip to content

Commit

Permalink
build: Permit to use clang to build and link simdutf correctly
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io>
  • Loading branch information
cosmo0920 committed Oct 11, 2024
1 parent d1a8d23 commit 7f7dcbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -482,12 +482,10 @@ endif()
if(FLB_UNICODE_ENCODER)
enable_language(CXX)
set (CMAKE_CXX_STANDARD 11)
# The current minimum required gcc and clang versions are sited from
# https://github.com/fluent/fluent-bit/blob/master/.github/workflows/unit-tests.yaml.
# gcc version is 7.0 and clang version is 6.0 now.
if (MSVC OR
(CMAKE_COMPILER_IS_CLANG AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0) OR
(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0))
# The current minimum required gcc and clang versions are sited from Ubuntu 16.04's system gcc.
# gcc version 5.4 or later is needed to compile and link libsimdutf.
if (MSVC OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "5.3.99"))
add_subdirectory(${FLB_PATH_LIB_SIMDUTF} EXCLUDE_FROM_ALL)
FLB_DEFINITION(FLB_HAVE_UNICODE_ENCODER)
else()
Expand Down
2 changes: 1 addition & 1 deletion src/simdutf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include_directories (../../${FLB_PATH_LIB_SIMDUTF}/src/simdutf)

message(STATUS "include: ${FLB_PATH_LIB_SIMDUTF}/src/simdutf")
message(STATUS "Using bundled simdutf: ${FLB_PATH_LIB_SIMDUTF}/src/simdutf")

set(src
flb_simdutf_connector.cpp)
Expand Down

0 comments on commit 7f7dcbf

Please sign in to comment.