radv: mark const structs as extern in header file to avoid lto damage

The copr repo from che was using LTO and he reported radv broke
recently with it. When testing with lto builds here I noticed
that we weren't seeing any instance extensions reported.

It appears LTO was treating the const without extern as an empty
struct, this is possibly a gcc bug, but we can work around it
just by marking these with extern.

Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2018-04-13 12:40:55 +10:00
parent f8c4716854
commit a8420e2530
1 changed files with 3 additions and 3 deletions

View File

@ -195,9 +195,9 @@ struct radv_device_extension_table {
};
};
const VkExtensionProperties radv_instance_extensions[RADV_INSTANCE_EXTENSION_COUNT];
const VkExtensionProperties radv_device_extensions[RADV_DEVICE_EXTENSION_COUNT];
const struct radv_instance_extension_table radv_supported_instance_extensions;
extern const VkExtensionProperties radv_instance_extensions[RADV_INSTANCE_EXTENSION_COUNT];
extern const VkExtensionProperties radv_device_extensions[RADV_DEVICE_EXTENSION_COUNT];
extern const struct radv_instance_extension_table radv_supported_instance_extensions;
struct radv_physical_device;