Skip to content

Commit

Permalink
[BugFix] fix cpu instruction detection in build.sh (backport StarRock…
Browse files Browse the repository at this point in the history
…s#41679) (StarRocks#41692)

Signed-off-by: Kevin Xiaohua Cai <caixiaohua@starrocks.com>
Co-authored-by: Kevin Cai <caixiaohua@starrocks.com>
  • Loading branch information
mergify[bot] and kevincai committed Feb 27, 2024
1 parent 311008b commit 2d0d90b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ if [[ -z ${USE_SSE4_2} ]]; then
USE_SSE4_2=ON
fi
# detect cpuinfo
if [[ -z $(grep -o 'avx[^ ]*' /proc/cpuinfo) ]]; then
if [[ -z $(grep -o 'avx[^ ]\+' /proc/cpuinfo) ]]; then
USE_AVX2=OFF
fi

if [[ -z $(grep -o 'sse[^ ]*' /proc/cpuinfo) ]]; then
if [[ -z $(grep -o 'sse4[^ ]*' /proc/cpuinfo) ]]; then
USE_SSE4_2=OFF
fi

Expand Down Expand Up @@ -208,6 +208,7 @@ echo "Get params:
WITH_GCOV -- $WITH_GCOV
WITH_BENCH -- $WITH_BENCH
USE_AVX2 -- $USE_AVX2
USE_SSE4_2 -- $USE_SSE4_2
PARALLEL -- $PARALLEL
ENABLE_QUERY_DEBUG_TRACE -- $ENABLE_QUERY_DEBUG_TRACE
WITH_BLOCK_CACHE -- $WITH_BLOCK_CACHE
Expand Down

0 comments on commit 2d0d90b

Please sign in to comment.