-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Add local build option on Linux; compiler fixups (#1756)
> [!IMPORTANT] > This alters default behavior for configuration on Linux that maintainers should be aware of. Introduces `ARES_BUILD_LOCAL` on Linux, enabled by default, that will pass `-march=native` if enabled. Maintainers will probably want to disable this. Also adds `ARES_ENABLE_MINIMUM_CPU`, `ON` by default, that compiles with the previously enforced `x86-64-v2` minimum on x86_64. Maintainers should do whatever they want with this option. (@bsdcode @Mastergatto) These changes are intended to give Linux users building from source a better experience. Enabling x86-64-v2 compared to compiling without any SSE functionality is a 10%+ performance loss locally in the N64 core, and may be higher on actual x86_64 machines. > [!NOTE] > It is worth noting that even though we do not explicitly define a minimum SSE functionality on arm64, in practice nall will still [define `__SSE4_1__`](https://github.com/ares-emulator/ares/blob/e808d2c5ab5be91d3e1035063892e8c5115d25e2/nall/intrinsics.hpp#L232) and take advantage of SIMD on that platform via sse2neon. ### Other changes * Adds `-march=native` on macOS builds under the control of `ARES_BUILD_LOCAL`, and fixes `ARES_BUILD_LOCAL` on Windows so that `-march=native` is added under gcc and not just clang. * Removes warning in the N64 core related to the issue caused by strict aliasing under GCC. * Fixed an issue where macOS would always generate for arm64 rather than the host architecture. * Ran a formatter pass that was previously missed on the CMake code, so there are a couple miscellaneous formatting changes.
- Loading branch information
Showing
8 changed files
with
80 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters