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

No longer depend on cc to build the library 4 unix #63

Merged
merged 5 commits into from
Apr 5, 2020
Merged

Conversation

nagisa
Copy link
Owner

@nagisa nagisa commented Apr 4, 2020

Fixes #61

@nagisa
Copy link
Owner Author

nagisa commented Apr 4, 2020

A couple thing I still want to do before landing this:

  1. Look through the list of targets and see if any of them obviously are MT-unsafe in their currently supported releases.
  2. Document this as a platform-specific behaviour for Library::get.

@nagisa
Copy link
Owner Author

nagisa commented Apr 4, 2020

Linux, Solaris, OpenBSD, Redox are MT-safe.
macOS, Android appear to be MT-safe.

FreeBSD, DragonFlyBSD, NetBSD are MT-unsafe.

@nagisa
Copy link
Owner Author

nagisa commented Apr 4, 2020

Fuchsia appears to be MT-safe. WxWorks is unknown.

@nagisa
Copy link
Owner Author

nagisa commented Apr 4, 2020

I think I know the best path forward here:

  1. Assume that on platforms that were not confirmed to have MT-safe dlerror, dlsym returning a nullptr is a guaranteed error. This makes it infeasible on those platforms to use features (such as IFUNC) that would otherwise allow dlsym to do this without it being an error;
    • Use a whitelist for this, i.e. set a dlerror-mtsafe feature on platforms where we know it is MT-safe;
  2. Make dlerror not producing an error a plain Err not a panic like it is currently.

@nagisa
Copy link
Owner Author

nagisa commented Apr 4, 2020

Bitrig is MT-unsafe.

@nagisa nagisa force-pushed the nagisa/drop-cc branch 7 times, most recently from 5978fa2 to 0e72b5e Compare April 4, 2020 21:44
@nagisa nagisa merged commit 9f92425 into master Apr 5, 2020
@nagisa nagisa deleted the nagisa/drop-cc branch April 5, 2020 01:19
matklad referenced this pull request in rust-lang/rust-analyzer Apr 5, 2020
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.

Consider removing C dependency for popular platforms
1 participant