Skip to content

Commit

Permalink
Fix build issue for ARM32-on-ARM64 systems
Browse files Browse the repository at this point in the history
  • Loading branch information
rui314 committed Oct 30, 2023
1 parent 3791900 commit 02ead29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion third-party/blake3/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ project(libblake3
LANGUAGES C ASM
)

include(CheckCCompilerFlag)
include(FeatureSummary)
include(GNUInstallDirs)

Expand Down Expand Up @@ -131,7 +132,12 @@ elseif(CMAKE_SYSTEM_PROCESSOR IN_LIST BLAKE3_ARMv8_NAMES
target_sources(blake3 PRIVATE
blake3_neon.c
)
set_source_files_properties(blake3_dispatch.c PROPERTIES COMPILE_DEFINITIONS BLAKE3_USE_NEON=1)
target_compile_options(blake3 PRIVATE -DBLAKE3_USE_NEON=1)

check_c_compiler_flag(-mfpu=neon BLAKE3_MFPU_NEON_SUPPORTED)
if (BLAKE3_MFPU_NEON_SUPPORTED)
target_compile_options(blake3 PRIVATE -mfpu=neon)
endif()

if (DEFINED BLAKE3_CFLAGS_NEON)
set_source_files_properties(blake3_neon.c PROPERTIES COMPILE_FLAGS "${BLAKE3_CFLAGS_NEON}")
Expand Down

0 comments on commit 02ead29

Please sign in to comment.