Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SPIRV_TOOLS_EXPORT to public C++ API #5591

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

svenvh
Copy link
Member

@svenvh svenvh commented Feb 22, 2024

In contrast to the C API, the C++ API did not have symbol visibility specified. An application using the C++ API would fail to link against a shared SPIRV-Tools library built with -fvisibility=hidden; see e.g. KhronosGroup/SPIRV-LLVM-Translator#2358

Mark all classes in the public .hpp files with SPIRV_TOOLS_EXPORT. Add SPIRV_TOOLS_LOCAL to hide nested structs containing implementation details.

In contrast to the C API, the C++ API did not have symbol visibility
specified.  An application using the C++ API would fail to link
against a shared SPIRV-Tools library built with `-fvisibility=hidden`.

Mark all classes in the public `.hpp` files with `SPIRV_TOOLS_EXPORT`.
Add `SPIRV_TOOLS_LOCAL` to hide nested structs containing
implementation details.

Signed-off-by: Sven van Haastregt <sven.vanhaastregt@arm.com>
Copy link
Collaborator

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
Thanks for taking care of this!

@dneto0 dneto0 merged commit dadb301 into KhronosGroup:main Apr 18, 2024
24 checks passed
@svenvh svenvh deleted the cxx-visibility branch April 19, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants