From 27a072c8845c3919b49426d161f83c360c0bfe6f Mon Sep 17 00:00:00 2001
From: Hugo Locurcio <hugo.locurcio@hugo.pro>
Date: Wed, 20 Jul 2022 19:05:49 +0200
Subject: Print expected `os.arch` tuple for current platform in GDExtension
 error

This also adds `Engine.get_architecture_name()` to get the name of the
CPU architecture the Godot binary was built for.
---
 core/core_bind.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'core/core_bind.cpp')

diff --git a/core/core_bind.cpp b/core/core_bind.cpp
index 56130134a0..630bd68e65 100644
--- a/core/core_bind.cpp
+++ b/core/core_bind.cpp
@@ -2270,6 +2270,10 @@ String Engine::get_license_text() const {
 	return ::Engine::get_singleton()->get_license_text();
 }
 
+String Engine::get_architecture_name() const {
+	return ::Engine::get_singleton()->get_architecture_name();
+}
+
 bool Engine::is_in_physics_frame() const {
 	return ::Engine::get_singleton()->is_in_physics_frame();
 }
@@ -2367,6 +2371,8 @@ void Engine::_bind_methods() {
 	ClassDB::bind_method(D_METHOD("get_license_info"), &Engine::get_license_info);
 	ClassDB::bind_method(D_METHOD("get_license_text"), &Engine::get_license_text);
 
+	ClassDB::bind_method(D_METHOD("get_architecture_name"), &Engine::get_architecture_name);
+
 	ClassDB::bind_method(D_METHOD("is_in_physics_frame"), &Engine::is_in_physics_frame);
 
 	ClassDB::bind_method(D_METHOD("has_singleton", "name"), &Engine::has_singleton);
-- 
cgit v1.2.3