From 9eb9a1331dec83098c858150cd0a8ad9f6d8f46c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Fri, 7 Nov 2025 17:34:05 +0100 Subject: [PATCH] Revert "ggml-cpu: detect correct cpu flags for arm64 (#16229) (#16239)" (#17084) This reverts commit 7c23f3f0d4b9f5d6ea140756eb694b562d5acebb. --- ggml/src/ggml-cpu/CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ggml/src/ggml-cpu/CMakeLists.txt b/ggml/src/ggml-cpu/CMakeLists.txt index 485227d24d..23ec8bb08a 100644 --- a/ggml/src/ggml-cpu/CMakeLists.txt +++ b/ggml/src/ggml-cpu/CMakeLists.txt @@ -118,18 +118,18 @@ function(ggml_add_cpu_backend_variant_impl tag_name) # so we check for them manually and enable them if available execute_process( - COMMAND ${CMAKE_C_COMPILER} -march=native -E -v - + COMMAND ${CMAKE_C_COMPILER} -mcpu=native -E -v - INPUT_FILE "/dev/null" OUTPUT_QUIET ERROR_VARIABLE ARM_MCPU RESULT_VARIABLE ARM_MCPU_RESULT ) if (NOT ARM_MCPU_RESULT) - string(REGEX MATCH "-march=[^ ']+" ARM_MCPU_FLAG "${ARM_MCPU}") + string(REGEX MATCH "-mcpu=[^ ']+" ARM_MCPU_FLAG "${ARM_MCPU}") endif() if ("${ARM_MCPU_FLAG}" STREQUAL "") - set(ARM_MCPU_FLAG -march=native) - message(STATUS "ARM -mcpu not found, -march=native will be used") + set(ARM_MCPU_FLAG -mcpu=native) + message(STATUS "ARM -mcpu not found, -mcpu=native will be used") endif() include(CheckCXXSourceRuns)