Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid repeating the -march flag #15561

Merged
merged 2 commits into from
May 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions buildfiles/cmake/ConfigureCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
kd-11 marked this conversation as resolved.
Show resolved Hide resolved
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)
Expand Down Expand Up @@ -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)
Expand Down