Target macOS 10.14 on ARM64 to enable C++17

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/+/52068
Reviewed-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>
diff --git a/BUILD.gn b/BUILD.gn
index 5bb08b0..0e12281 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -69,12 +69,15 @@
       "-fno-operator-names",
     ]
     cflags_cc = [ "-std=c++17" ]
-    # On macOS, some C++17 features used by LLVM require version 10.12.
-    if (is_mac && supports_llvm) {
+    # On macOS for the ARM architecture, some C++17 features require version 10.14,
+    # while Chrome must support 10.11 (El Capitan). However, the first 'Apple Silicon'
+    # devices launched with macOS 11.0 (Big Sur).
+    # TODO(b/174843857): Remove once Chrome demands macOS 10.14.
+    if (is_mac && current_cpu == "arm64") {
       cflags += [
         "-isysroot",
         rebase_path(sysroot, root_build_dir),
-        "-mmacosx-version-min=10.12.0",
+        "-mmacosx-version-min=10.14.0",
       ]
     }