Use __has_declspec_attribute for shared builds#3616
Use __has_declspec_attribute for shared builds#3616donny-dont wants to merge 1 commit intocurl:masterfrom
Conversation
|
Okay, but do we really want this for non-windows? |
|
Any toolchain that's clang based could potentially use |
|
Right, they can use it but with this change they will use it - unconditionally. I'm not even sure what the significance is of using this, but it is certainly a change to how it worked without this change. BTW, the added line is too long which why the CI turns red: |
|
When you build clang out for a platform you have to explicitly turn on support for I figured I'd see if the change was palatable to upstream. If its not I'm fine with maintaining it outside of curl. |
Ah, right. Thanks for explaining this for an ignorant like me! 😁 I'll merge... |
Clang compilation targets may support
__declspecattributes. Because of that it has a__has_declspec_attributecheck.Currently cURL just assumes that
__declspecis Windows only. This adds a compatibility macro and checks whetherdllimportanddllexportare available.