KhronosGroup / SPIRV-Reflect

SPIRV-Reflect is a lightweight library that provides a C/C++ reflection API for SPIR-V shader bytecode in Vulkan applications.
Apache License 2.0
672 stars 147 forks source link

Add support for shared library build #276

Open makkarpov opened 1 month ago

makkarpov commented 1 month ago

This PR adds support for building SPIRV-Reflect as a shared library.

Sure enough, this library is not a perfect candidate to be shared (i.e. stack-allocated structs without any kind of layout or size stability guarantees), but at least this PR makes library usable via FFI interface from languages like Java.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.

makkarpov commented 1 month ago

Ok, I will add mentions in README.md that shared library build is possible.

Also, to be on the safe side, I will also perform DLL testing on Windows with actual application. It should work (GCC cross-compilation succeeded, all exports are present), but it's better to check.