Build: Fix use of non-standard __has_feature test macro

The `__has_feature` test macro is a non-standard extension and compilers
like MSVC do not implement it.

Handle it like elsewhere in the codebase by defining it if it doesn't
exist.

Pull Request: https://projects.blender.org/blender/blender/pulls/162552
This commit is contained in:
Jesse Yurkovich 2026-08-11 14:14:52 +02:00 • committed by Jeroen Bakker
parent 6b63bb0ae9
commit 4ba7b5c6fa

View file

@ -797,6 +797,9 @@ struct GHOST_InstanceVK {
vk_physical_device, &device_create_info, nullptr, &device.vk_device);
if (result != VK_SUCCESS) {
#ifndef __has_feature
# define __has_feature(x) 0
#endif
#if (defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer)) && defined(__linux__)
if (device.device_driver_properties.driverID == VK_DRIVER_ID_NVIDIA_PROPRIETARY) {
CLOG_ERROR(