From 456be0b7ecca065fbccf380c2f51e0985e608ba0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Aum=C3=BCller?= <aumuell@reserv.at>
Date: Sat, 29 Aug 2020 07:02:45 +0200
Subject: [PATCH] use '-arch arm64' for 64-bit builds using darwin.jam (#642)

Even for 64-bit architectures, b2 would add '-arch arm' to the compiler
options - but this is only valid for 32-bit arm builds.
The problem was also observed here: https://stackoverflow.com/a/47096479
---
 src/tools/darwin.jam | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/tools/darwin.jam b/src/tools/darwin.jam
index c28ca42b01..4841cbf5c7 100644
--- a/tools/build/src/tools/darwin.jam
+++ b/tools/build/src/tools/darwin.jam
@@ -502,6 +502,8 @@ rule setup-address-model ( targets * : sources * : properties * )
         {
             if $(instruction-set) {
                 options = -arch$(_)$(instruction-set) ;
+            } else if $(address-model) = 64 {
+                options = -arch arm64 ;
             } else {
                 options = -arch arm ;
             }
