Skip to content

Commit

Permalink
Do not add -mfpu and -mfloat-abi arguments if build target is Apple.
Browse files Browse the repository at this point in the history
AppleClang does not support those arguments anymore:

```
c++: error: unsupported option '-mfpu=' for target 'arm64-apple-darwin23.6.0'
c++: error: unsupported option '-mfloat-abi=' for target 'arm64-apple-darwin23.6.0'
cc: error: unsupported option '-mfpu=' for target 'arm64-apple-darwin23.6.0'
cc: error: unsupported option '-mfloat-abi=' for target 'arm64-apple-darwin23.6.0'
```

seealso: https://stackoverflow.com/questions/29851128/gcc-arm64-aarch64-unrecognized-command-line-option-mfpu-neon
  • Loading branch information
atsushieno committed Dec 14, 2024
1 parent a708acb commit 660f950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/SfizzConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
gw_warn(-Wall -Wextra -Wno-multichar -Werror=return-type)
if(PROJECT_SYSTEM_PROCESSOR MATCHES "(i.86|x86_64)")
add_compile_options(-msse2)
elseif(PROJECT_SYSTEM_PROCESSOR MATCHES "(arm.*)")
elseif(PROJECT_SYSTEM_PROCESSOR MATCHES "(arm.*)" AND NOT (PROJECT_SYSTEM_PROCESSOR MATCHES "(arm64)"))
add_compile_options(-mfpu=neon)
if(NOT ANDROID)
add_compile_options(-mfloat-abi=hard)
Expand Down

0 comments on commit 660f950

Please sign in to comment.