1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Avoid repeating the -march flag

Under the right circumstances, both -march=armv8.1-a and -march=native
were added. But it only makes sense to use one or the other.
This commit is contained in:
Piotr Paweł Stefaniak 2024-05-06 14:34:27 +02:00 committed by Megamouse
parent 8dac5e34be
commit fe9bb31b09

View File

@ -33,7 +33,9 @@ else()
add_compile_options(-fno-exceptions)
add_compile_options(-fstack-protector)
if (COMPILER_ARM)
if(USE_NATIVE_INSTRUCTIONS AND COMPILER_SUPPORTS_MARCH_NATIVE)
add_compile_options(-march=native)
elseif(COMPILER_ARM)
# This section needs a review. Apple claims armv8.5-a on M-series but doesn't support SVE.
# Note that compared to the rest of the 8.x family, 8.1 is very restrictive and we'll have to bump the requirement in future to get anything meaningful.
if (APPLE)
@ -90,10 +92,6 @@ else()
add_compile_options(-Wno-class-memaccess)
endif()
if(USE_NATIVE_INSTRUCTIONS AND COMPILER_SUPPORTS_MARCH_NATIVE)
add_compile_options(-march=native)
endif()
if(NOT APPLE AND NOT WIN32)
# This hides our LLVM from mesa's LLVM, otherwise we get some unresolvable conflicts.
add_link_options(-Wl,--exclude-libs,ALL)