diff --git a/configure.pri b/configure.pri
index 8705ad93f..08751ed47 100644
--- a/configure.pri
+++ b/configure.pri
@@ -341,7 +341,7 @@ defineReplace(webEngineGetMacOSVersion) {
 }
 
 defineReplace(webEngineGetMacOSSDKVersion) {
-    value = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
+    value = $$system("xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
     return($$value)
 }
 
@@ -496,7 +496,7 @@ defineTest(qtwebengine_isMinOSXSDKVersion) {
     requested_minor = $$2
     requested_patch = $$3
     isEmpty(requested_patch): requested_patch = 0
-    WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("/usr/bin/xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
+    WEBENGINE_OSX_SDK_PRODUCT_VERSION = $$system("xcodebuild -sdk $$QMAKE_MAC_SDK -version ProductVersion 2>/dev/null")
     export(WEBENGINE_OSX_SDK_PRODUCT_VERSION)
     isEmpty(WEBENGINE_OSX_SDK_PRODUCT_VERSION) {
         qtwebengine_platformError("requires SDK product version, but could not resolve it for \'$$QMAKE_MAC_SDK\'.")
diff --git a/src/buildtools/config/mac_osx.pri b/src/buildtools/config/mac_osx.pri
index b53f91706..a93f9c5cd 100644
--- a/src/buildtools/config/mac_osx.pri
+++ b/src/buildtools/config/mac_osx.pri
@@ -24,8 +24,10 @@ QMAKE_CLANG_PATH = "$${QMAKE_CLANG_DIR}/bin/clang++"
 message("Using clang++ from $${QMAKE_CLANG_PATH}")
 system("$${QMAKE_CLANG_PATH} --version")
 
+GN_HOST_CPU = $$gnArch($$QT_ARCH)
 
 gn_args += \
+    host_cpu=\"$$GN_HOST_CPU\" \
     is_clang=true \
     use_sysroot=false \
     use_system_xcode=true \
