mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 16:48:07 +02:00
util: Remove the __declspec(dllexport) on win32 for PUBLIC export macro
As on Windows, all DLLs are exported use def files, there is no need do __declspec(dllexport) on the function marker. Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36863>
This commit is contained in:
parent
39e20ad563
commit
de1a2a3537
5 changed files with 2 additions and 29 deletions
|
|
@ -503,12 +503,6 @@ radv_GetInstanceProcAddr(VkInstance _instance, const char *pName)
|
|||
return vk_instance_get_proc_addr(instance, &radv_instance_entrypoints, pName);
|
||||
}
|
||||
|
||||
/* Windows will use a dll definition file to avoid build errors. */
|
||||
#ifdef _WIN32
|
||||
#undef PUBLIC
|
||||
#define PUBLIC
|
||||
#endif
|
||||
|
||||
/* The loader wants us to expose a second GetInstanceProcAddr function
|
||||
* to work around certain LD_PRELOAD issues seen in apps.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1626,12 +1626,6 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL lvp_GetInstanceProcAddr(
|
|||
pName);
|
||||
}
|
||||
|
||||
/* Windows will use a dll definition file to avoid build errors. */
|
||||
#ifdef _WIN32
|
||||
#undef PUBLIC
|
||||
#define PUBLIC
|
||||
#endif
|
||||
|
||||
/* The loader wants us to expose a second GetInstanceProcAddr function
|
||||
* to work around certain LD_PRELOAD issues seen in apps.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1890,12 +1890,6 @@ dzn_GetInstanceProcAddr(VkInstance _instance,
|
|||
pName);
|
||||
}
|
||||
|
||||
/* Windows will use a dll definition file to avoid build errors. */
|
||||
#ifdef _WIN32
|
||||
#undef PUBLIC
|
||||
#define PUBLIC
|
||||
#endif
|
||||
|
||||
PUBLIC VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
|
||||
vk_icdGetInstanceProcAddr(VkInstance instance,
|
||||
const char *pName)
|
||||
|
|
|
|||
|
|
@ -289,10 +289,11 @@ do { \
|
|||
|
||||
/**
|
||||
* This marks symbols that should be visible to dynamic library consumers.
|
||||
* On win32, symbols use def file to export, do not use __declspec(dllexport)
|
||||
*/
|
||||
#ifndef PUBLIC
|
||||
# if defined(_WIN32)
|
||||
# define PUBLIC __declspec(dllexport)
|
||||
# define PUBLIC
|
||||
# elif defined(__GNUC__)
|
||||
# define PUBLIC __attribute__((visibility("default")))
|
||||
# else
|
||||
|
|
|
|||
|
|
@ -555,16 +555,6 @@ vk_common_EnumeratePhysicalDeviceGroups(VkInstance _instance, uint32_t *pGroupCo
|
|||
return vk_outarray_status(&out);
|
||||
}
|
||||
|
||||
/* For Windows, PUBLIC is default-defined to __declspec(dllexport) to automatically export the
|
||||
* public entrypoints from a DLL. However, this declspec needs to match between declaration and
|
||||
* definition, and this attribute is not present on the prototypes specified in vk_icd.h. Instead,
|
||||
* we'll use a .def file to manually export these entrypoints on Windows.
|
||||
*/
|
||||
#ifdef _WIN32
|
||||
#undef PUBLIC
|
||||
#define PUBLIC
|
||||
#endif
|
||||
|
||||
/* With version 4+ of the loader interface the ICD should expose
|
||||
* vk_icdGetPhysicalDeviceProcAddr()
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue