From 1abcfdda851610d9f72985cc0b8ce4657f523cef Mon Sep 17 00:00:00 2001 From: "Yevhen Babiichuk (DustDFG)" Date: Sat, 28 Sep 2024 08:28:33 +0300 Subject: [PATCH] Replace comments with printed warning for Metal on x86_64 Signed-off-by: Yevhen Babiichuk (DustDFG) --- platform/ios/detect.py | 4 ++-- platform/macos/detect.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/ios/detect.py b/platform/ios/detect.py index 989a7f21f39..20a3a996bc6 100644 --- a/platform/ios/detect.py +++ b/platform/ios/detect.py @@ -2,7 +2,7 @@ import os import sys from typing import TYPE_CHECKING -from methods import detect_darwin_sdk_path, print_error +from methods import detect_darwin_sdk_path, print_error, print_warning if TYPE_CHECKING: from SCons.Script.SConscript import SConsEnvironment @@ -156,7 +156,7 @@ def configure(env: "SConsEnvironment"): env.Append(CPPDEFINES=["IOS_ENABLED", "UNIX_ENABLED", "COREAUDIO_ENABLED"]) if env["metal"] and env["arch"] != "arm64": - # Only supported on arm64, so skip it for x86_64 builds. + print_warning("Target architecture '{}' does not support the Metal rendering driver".format(env["arch"])) env["metal"] = False if env["metal"]: diff --git a/platform/macos/detect.py b/platform/macos/detect.py index e35423d41f0..9eb5d41ab74 100644 --- a/platform/macos/detect.py +++ b/platform/macos/detect.py @@ -2,7 +2,7 @@ import os import sys from typing import TYPE_CHECKING -from methods import detect_darwin_sdk_path, get_compiler_version, is_vanilla_clang, print_error +from methods import detect_darwin_sdk_path, get_compiler_version, is_vanilla_clang, print_error, print_warning from platform_methods import detect_arch, detect_mvk if TYPE_CHECKING: @@ -241,7 +241,7 @@ def configure(env: "SConsEnvironment"): env.Append(LINKFLAGS=["-rpath", "@executable_path/../Frameworks", "-rpath", "@executable_path"]) if env["metal"] and env["arch"] != "arm64": - # Only supported on arm64, so skip it for x86_64 builds. + print_warning("Target architecture '{}' does not support the Metal rendering driver".format(env["arch"])) env["metal"] = False extra_frameworks = set()