-
Notifications
You must be signed in to change notification settings - Fork 833
supported clang-cl #595
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
supported clang-cl #595
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,7 @@ | |
| License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at | ||
| http://www.boost.org/LICENSE_1_0.txt) */ | ||
|
|
||
| #ifdef _MSC_VER | ||
| #if defined(_MSC_VER) && !defined(__clang__) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. clang-cl supports declspecs, so I'd imagine this is useful as well.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. declspec causes this error on clang9 cereal::detail::StaticObject<cereal::detail::bind_to_archives<PolyDerivedLA, cereal::detail::(anonymous namespace)::polymorphic_binding_tag> >' must have external linkage when declared 'dllexport'
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this error can be reproduced on test_polymorphic There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We (myself + @fnabulsi + @bmcdb) got the identical error and had to make the same change, although I acknowledge this may warrant more investigation. We are testing cereal only with static linking so it wouldn't surprise me if there's more work to ensure that clang-cl can properly build Cereal as a DLL. |
||
| # define CEREAL_DLL_EXPORT __declspec(dllexport) | ||
| # define CEREAL_USED | ||
| #else // clang or gcc | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure you'd want to do this, clang-cl has the same integer sizes as MSVC, so we'd want the unsigned long overload as well here, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to suppress this error
in json.hpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok correction: in our org we never came across this even though our
json.hpplooks the same. We're using clang-cl version 8.0.0. I wonder if @durswd has a different configuration wherebysizeof(long)is coming out as 8?