Skip to content

Commit 1f4b6a5

Browse files
authored
Remove any inadvertent use of -march=native from DYNAMIC_ARCH builds
from #2143, -march=native precludes use of more specific options like -march=skylake-avx512 in individual kernels, and defeats the purpose of dynamic arch anyway.
1 parent ff1bfe7 commit 1f4b6a5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/arch.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ if (DYNAMIC_ARCH)
7373
endif ()
7474
if (NOT NO_AVX512)
7575
set(DYNAMIC_CORE ${DYNAMIC_CORE} SKYLAKEX)
76-
endif ()
76+
string(REGEX REPLACE "-march=native" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
77+
endif ()
7778
if (DYNAMIC_LIST)
7879
set(DYNAMIC_CORE PRESCOTT ${DYNAMIC_LIST})
7980
endif ()

0 commit comments

Comments
 (0)