Skip to content

Commit 351b5a4

Browse files
committed
add support for arm
1 parent a05ad5d commit 351b5a4

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

libsql-ffi/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ fn build_multiple_ciphers(target: &str, out_path: &Path) {
481481
"x86_64"
482482
} else if cc.contains("aarch64") {
483483
"arm64"
484+
} else if cc.contains("arm") {
485+
"arm"
484486
} else {
485487
panic!("Unsupported cross target {}", cc)
486488
};

libsql-ffi/bundled/SQLite3MultipleCiphers/CMakeLists.txt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux"
279279
# Do not set `-maes -msee4.2` when we are on arm which doesn't support
280280
# this instruction set.
281281
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64"
282-
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
282+
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"
283+
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm")
283284
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
284285
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
285286
else()
@@ -298,7 +299,9 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux"
298299
set(SHARED_LIB_EXPORT_DEFINITION "__attribute__((visibility(\"default\")))")
299300
else()
300301
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT (
301-
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"
302+
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64"
303+
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"
304+
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm"
302305
))
303306
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -maes")
304307
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -maes")
@@ -307,7 +310,9 @@ else()
307310
endif()
308311

309312
if (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND NOT (
310-
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"
313+
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64"
314+
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64"
315+
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm"
311316
))
312317
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2 -maes -Wno-error=incompatible-function-pointer-types")
313318
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2 -maes")

0 commit comments

Comments
 (0)