Skip to content

Commit 8216d63

Browse files
committed
Build fsst without -march=native
1 parent 362eb60 commit 8216d63

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ set(compiler_only
143143

144144
add_subdirectory(folly EXCLUDE_FROM_ALL)
145145
add_subdirectory(fbthrift EXCLUDE_FROM_ALL)
146-
add_subdirectory(fsst EXCLUDE_FROM_ALL)
147146
if(NOT (ZSTD_FOUND AND PREFER_SYSTEM_ZSTD))
148147
add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
149148
endif()
@@ -532,6 +531,17 @@ foreach(tgt dwarfs ${BINARY_TARGETS})
532531
endif()
533532
endforeach()
534533

534+
# not sure why exactly, copied from fsst/CMakeLists.txt
535+
if(CMAKE_BUILD_TYPE STREQUAL Release)
536+
set_source_files_properties(fsst/fsst_avx512.cpp PROPERTIES COMPILE_FLAGS -O1)
537+
endif()
538+
539+
add_library(
540+
fsst
541+
fsst/libfsst.cpp fsst/fsst_avx512.cpp fsst/fsst_avx512_unroll1.inc
542+
fsst/fsst_avx512_unroll2.inc fsst/fsst_avx512_unroll3.inc
543+
fsst/fsst_avx512_unroll4.inc)
544+
535545
target_include_directories(dwarfs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/fsst)
536546

537547
target_link_libraries(

cmake/static_link.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fi
1313

1414
g++ -static "$@" -o "$target" \
1515
libdwarfs.a \
16-
fsst/libfsst.a \
16+
libfsst.a \
1717
libmetadata_thrift.a \
1818
libthrift_light.a \
1919
libxxhash.a \

0 commit comments

Comments
 (0)