From 915d8b51e8412ac374341496876758a68690ec7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kok?= Date: Fri, 9 Jan 2026 19:24:27 +0000 Subject: [PATCH 1/2] Fix: Set SNAPPY_HAVE_BMI2 to 0 to avoid crashes on older CPUs without BMI2. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ac6178fb3..51535e2cb5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -362,6 +362,10 @@ if(FIRESTORE_USE_EXTERNAL_CMAKE_BUILD) CACHE BOOL "Force Firestore build tests to match") endif() + # Disable Snappy's BMI2 optimizations for broader CPU compatibility. + # BMI2 instructions cause Illegal Instruction crashes on older CPUs that don't support BMI2. + set(SNAPPY_HAVE_BMI2 0 CACHE INTERNAL "Disable BMI2 for CPU compatibility") + add_subdirectory(${FIRESTORE_SOURCE_DIR} ${FIRESTORE_BINARY_DIR}) copy_subdirectory_definition(${FIRESTORE_SOURCE_DIR} NANOPB_SOURCE_DIR) From 79a7b3049b88478250cae0798effcdcc199e5d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Kok?= Date: Fri, 9 Jan 2026 19:35:54 +0000 Subject: [PATCH 2/2] Add FORCE as suggested by Gemini Code assist. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51535e2cb5..b600ec2b2e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,7 +364,7 @@ if(FIRESTORE_USE_EXTERNAL_CMAKE_BUILD) # Disable Snappy's BMI2 optimizations for broader CPU compatibility. # BMI2 instructions cause Illegal Instruction crashes on older CPUs that don't support BMI2. - set(SNAPPY_HAVE_BMI2 0 CACHE INTERNAL "Disable BMI2 for CPU compatibility") + set(SNAPPY_HAVE_BMI2 0 CACHE INTERNAL "Disable BMI2 for CPU compatibility" FORCE) add_subdirectory(${FIRESTORE_SOURCE_DIR} ${FIRESTORE_BINARY_DIR})