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

Fix linker issues and target support #378

Merged
merged 1 commit into from
Apr 13, 2023
Merged

Conversation

kennykerr
Copy link
Contributor

While I don’t think the 3-6 month update cadence of the windows-sys crate was a substantial issue, dropping that dependency (#374) is certainly your choice. However, by doing so you gave up some functionality and target support which will prevent parking_lot_core from linking in many cases.

The windows and windows-sys crates depend on the windows-targets crate for linker support. The windows-targets crate includes only import libs, supports semantic versioning of libs, and optional support for raw-dylib. It provides explicit import libs for the following targets:

  • i686_msvc
  • x86_64_msvc
  • aarch64_msvc
  • i686_gnu
  • x86_64_gnu
  • x86_64_gnullvm
  • aarch64_gnullvm

By contrast, the older winapi crate only provided import libs for i686_gnu and x86_64_gnu and lacked support for raw-dylib, link-level semantic versioning, or ARM64. #374 further yanked all of this and means that dependents must now rely on some other implicit dependency to ensure that this crate’s imports will continue to link.

I think restoring windows-sys would be simpler in the long run, but as an alternative you can accept this PR which simply adds a dependency on the windows-targets crate directly to restore the target support described above.

Hope that helps.

@Amanieu
Copy link
Owner

Amanieu commented Apr 13, 2023

Thanks! I think this is good enough for now since this code is unlikely to change for a long time.

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