Skip to content

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

Merged
gdesmott merged 1 commit into
gdesmott:mainfrom
amyspark:fix-windows-builds
Mar 14, 2024
Merged

Don't ignore transitive imports when probing a static library#77
gdesmott merged 1 commit into
gdesmott:mainfrom
amyspark:fix-windows-builds

Conversation

@amyspark

@amyspark amyspark commented Aug 22, 2023

Copy link
Copy Markdown

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

CC @nirbheek

@codecov

codecov Bot commented Aug 22, 2023

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

amyspark commented Sep 6, 2023

Copy link
Copy Markdown
Author

@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
Copy Markdown
Author

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

Comment thread src/lib.rs
Comment thread src/lib.rs Outdated
@amyspark amyspark requested a review from gdesmott January 16, 2024 17:24
@gdesmott

Copy link
Copy Markdown
Owner

The change seems safe enough now.

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

@sdroege

sdroege commented Jan 17, 2024

Copy link
Copy Markdown

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

@gdesmott

Copy link
Copy Markdown
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 amyspark force-pushed the fix-windows-builds branch from c888d16 to a89df41 Compare March 14, 2024 14:15
@amyspark

Copy link
Copy Markdown
Author

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

@gdesmott gdesmott merged commit 1db7d8b into gdesmott:main Mar 14, 2024
@amyspark amyspark deleted the fix-windows-builds branch March 14, 2024 14:23
@gdesmott

Copy link
Copy Markdown
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.

3 participants