turn off zstd on arm64 llvm build (#158)

This commit is contained in:
Baye Dieng 2023-02-27 23:30:15 +00:00 committed by GitHub
parent 78a607679f
commit 316c5f0769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,14 +11,20 @@ set(LLVM_OPTS -DCMAKE_INSTALL_PREFIX:STRING=<INSTALL_DIR>)
if(WIN32)
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "AMD64")
list(APPEND LLVM_OPTS -DLLVM_TARGETS_TO_BUILD:STRING=X86)
# turn off zstd due to potential shared libray issue
list(APPEND LLVM_OPTS -DLLVM_ENABLE_ZSTD:BOOL=OFF)
else()
message(FATAL_ERROR "Target CPU is not supported")
endif()
else()
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
list(APPEND LLVM_OPTS -DLLVM_TARGETS_TO_BUILD:STRING=X86)
list(APPEND LLVM_OPTS -DLLVM_ENABLE_ZSTD:BOOL=OFF)
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "arm64")
list(APPEND LLVM_OPTS -DLLVM_TARGETS_TO_BUILD:STRING=AArch64)
list(APPEND LLVM_OPTS -DLLVM_ENABLE_ZSTD:BOOL=OFF)
else()
message(FATAL_ERROR "Target CPU is not supported")
endif()