Skip to content

Commit

Permalink
dockerfile: enable SIMD optimization for x86_64, amd64, arm64 and aar…
Browse files Browse the repository at this point in the history
…ch64

Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Nov 10, 2024
1 parent 282923d commit a7a7613
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,15 @@ COPY . ./
# We split the builder setup out so people can target it or use as a base image without doing a full build.
FROM builder-base AS builder
WORKDIR /src/fluent-bit/build/
RUN cmake -DFLB_RELEASE=On \

# SIMD support: x86_64, amd64 and arm64
ARG SIMD_CMAKE_FLAG=""
RUN SIMD_CMAKE_FLAG="" && \
case "$(uname -m)" in \
"x86_64"|"amd64"|"aarch64"|"arm64") \
SIMD_CMAKE_FLAG="-DFLB_SIMD=On";; \
esac && \
cmake -DFLB_RELEASE=On \
-DFLB_JEMALLOC=On \
-DFLB_TLS=On \
-DFLB_SHARED_LIB=Off \
Expand All @@ -78,6 +86,7 @@ RUN cmake -DFLB_RELEASE=On \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_LOG_NO_CONTROL_CHARS=On \
-DFLB_CHUNK_TRACE="$FLB_CHUNK_TRACE" \
$SIMD_CMAKE_FLAG \
..

RUN make -j "$(getconf _NPROCESSORS_ONLN)"
Expand Down

0 comments on commit a7a7613

Please sign in to comment.