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

Create separate dllexport marking points for clang and msvc. #2229

Merged
merged 3 commits into from
Apr 16, 2021

Conversation

denchat
Copy link
Contributor

@denchat denchat commented Apr 13, 2021

This should fix #2228

The issue is caused by changes in clang below.

[MinGW] Fix dllexport of explicit template instantiation
by mstorsjo on Apr 25 2019
https://reviews.llvm.org/D61118

Have to keep seperated dllexport marking points, until msvc follows GNU and LLVM's policy or vice versa.

denchat added 2 commits April 13, 2021 11:31
This should fix fmtlib#2228

To fix difference dllexport requirements
msvc:  dllexport at template instantiation definition in format.cc
clang: dllexport at template instantiation declaration (extern template) in format.h
 Create a separated FMT_INSTANTIATION_DEF_API

Create separated FMT_INSTANTIATION_DEF_API and FMT_INSTANTIATION_DECL_API
to fix dllexport requirement differences between clang and msvc.

- clang:  mark dllexport on extern template (template instantiation declaration) in format.h
- msvc:  mark dllexport on template instantiation definition in format.cc
@vitaut vitaut merged commit 52bd62c into fmtlib:master Apr 16, 2021
@vitaut
Copy link
Contributor

vitaut commented Apr 16, 2021

Thanks!

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.

warning C4910: '__declspec(dllexport)' and 'extern' are incompatible on an explicit instantiation
2 participants