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

[cpprestsdk] fix bad define in header for clang #38659

Merged
merged 2 commits into from May 23, 2024

Conversation

russelltg
Copy link
Contributor

  • [cpprestsdk] fix clang build on new zlib
  • ./vcpkg x-add-version --all

Defining dllimport is bad and breaks clang, and since this is in maintaince mode they aren't going to fix it.

This had the ability to blow up projects before, but newer zlib versions use __has_declspec_attribute, so that makes it impossible to even build cpprestsdk on systems like these (I'm on Fedora 40).

Refs:

microsoft/cpprestsdk#1710
llvm/llvm-project#53269

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

definint dllimport is *bad* and breaks clang, and since this is in maintaince mode they aren't going to fix it.  Refs:

microsoft/cpprestsdk#1710
llvm/llvm-project#53269
#define _ASYNCRTIMP_TYPEINFO
#else // ^^^ _NO_ASYNCRTIMP ^^^ // vvv !_NO_ASYNCRTIMP vvv
#ifdef _ASYNCRT_EXPORT
+#ifdef _WIN32
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if these checks should be #ifdef _MSC_VER instead.
__declspec(dllexport) is a compiler specific attribute not a platform specific one.

Copy link
Contributor

Choose a reason for hiding this comment

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

The attribute is also implemented by mingw, and widely used with _WIN32. So it is okay IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also implemented by clang.

@MonicaLiu0311 MonicaLiu0311 added the category:port-bug The issue is with a library, which is something the port should already support label May 10, 2024
@MonicaLiu0311 MonicaLiu0311 added the info:reviewed Pull Request changes follow basic guidelines label May 20, 2024
@vicroms vicroms merged commit 57676e8 into microsoft:master May 23, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants