-
Target macOS 10.14 on ARM64 to enable C++17 · 3fe96b78Nicolas Capens authored
The first devices with M1 'Apple Silicon' AArch64 processors were launched with macOS 11.0, so it's safe to increase the target OS beyond the 10.11 support level needed by Chrome. This helps enable C++17 by addressing the lack of aligned heap allocation support in previous macOS versions: third_party/marl/include/marl/pool.h:236:27: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer src/Vulkan/VkPipeline.hpp:83:10: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer C++17 invokes aligned new/delete because of our use of alignas(16) for types like sw::float4, which is used for member fields in sw::DrawCall::BatchData and vk::GraphicsState. While this could be addressed by using custom new/delete operators for these classes (and classes which in turn use them as members), misalignment is just a minor performance issue, so we can leave things as-is and work around it with a build flag (note 16-byte alignment is needed for some vectors accessed in Reactor code, but that's handled for those individual cases). Bug: b/174843857 Change-Id: Iaa40a3ac6aa7d12c088bf93a55803d8146bd289c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52068Reviewed-by:
Antonio Maiorano <amaiorano@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Commit-Queue: Nicolas Capens <nicolascapens@google.com> Kokoro-Result: kokoro <noreply+kokoro@google.com>
3fe96b78
×