Parcourir la source

cmzstd: Explicitly disable ASM

Our vendored zstd does not include the assembly language file from
upstream (huf_decompress_amd64.S), so it's fine to completely disable
assembly language.

Fixes: #25744
Kyle Edwards il y a 1 an
Parent
commit
4d3331c63c
1 fichiers modifiés avec 7 ajouts et 2 suppressions
  1. 7 2
      Utilities/cmzstd/CMakeLists.txt

+ 7 - 2
Utilities/cmzstd/CMakeLists.txt

@@ -44,7 +44,12 @@ add_library(cmzstd STATIC
   lib/dictBuilder/zdict.c
   )
 
-# BMI2 instructions are not supported in older environments.
-set_property(TARGET cmzstd PROPERTY COMPILE_DEFINITIONS DYNAMIC_BMI2=0)
+target_compile_definitions(cmzstd PRIVATE
+  # BMI2 instructions are not supported in older environments.
+  DYNAMIC_BMI2=0
+  # Explicitly disable ASM build to work with more compilers.
+  # Our vendored zstd does not include the assembly language file.
+  ZSTD_DISABLE_ASM=1
+  )
 
 install(FILES LICENSE DESTINATION ${CMAKE_DOC_DIR}/cmzstd)