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

Don't ignore transitive imports when probing a static library #77

Merged
merged 1 commit into from Mar 14, 2024

Conversation

amyspark
Copy link

@amyspark amyspark commented Aug 22, 2023

This is needed towards building GStreamer's Rust plugins statically on Windows.

CC @nirbheek

@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@a80ea92). Click here to learn what that means.

❗ Current head d3dc609 differs from pull request most recent head a89df41. Consider uploading reports for the commit a89df41 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #77   +/-   ##
=======================================
  Coverage        ?   75.14%           
=======================================
  Files           ?        3           
  Lines           ?     3022           
  Branches        ?        0           
=======================================
  Hits            ?     2271           
  Misses          ?      751           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gdesmott
Copy link
Owner

We stopped relying on pkg-config to print metadata as we do it manually, see 331bab3

Shouldn't we fix that manual code instead then?

@amyspark
Copy link
Author

@gdesmott I assume you mean this?

// TODO: add support for "rustc-link-lib=static=" ?

If so, I'll see what I can do.

@amyspark
Copy link
Author

amyspark commented Sep 6, 2023

@gdesmott I found the code, it needs a copy of rust-lang/pkg-config-rs#154 applied. Let me know if this looks OK now.

@amyspark
Copy link
Author

@gdesmott Hi again, just updated the PR. Could this be reviewed now?

src/lib.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
@gdesmott
Copy link
Owner

The change seems safe enough now.

Which actual use case is it fixing? Did you check it build and is usable now?

@sdroege
Copy link

sdroege commented Jan 17, 2024

FWIW the pkg-config-rs change that does basically the same is merged and released

@gdesmott
Copy link
Owner

@amyspark : sorry I missed your latest update.

Can you please rebase on top of main (I just fixed the CI) so we can merge this?

Suppressing cargo_metadata silences libraries with full paths, in turn
causing linking against static libraries to fail utterly on Windows.
@amyspark
Copy link
Author

@gdesmott done, let me know if anything else's needed.

@gdesmott gdesmott merged commit 1db7d8b into gdesmott:main Mar 14, 2024
6 checks passed
@amyspark amyspark deleted the fix-windows-builds branch March 14, 2024 14:23
@gdesmott
Copy link
Owner

Released in 6.2.1, sorry for the delay.

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.

None yet

3 participants