gdesmott / system-deps

Run pkg-config from declarative dependencies in Cargo.toml
Apache License 2.0
87 stars 21 forks source link

Add support for linker flags #90

Closed amyspark closed 3 months ago

amyspark commented 3 months ago

Hi all,

This MR implements support for forwarding LDFLAGS from pkg-config modules. These are already detected in the pkg-config crate, but were not made available to system-deps consumers. In particular -Wl,-rpath,/a/b/c flags are essential to loading relocated libraries in Apple platforms.

For related issues, see:

cc @sdroege

gdesmott commented 3 months ago

Thanks for your patch Amy.

Looks ok to me assuming @sdroege agrees with this change as well.

It seems you'll have to update tests too.

amyspark commented 3 months ago

@gdesmott Just fixed the existing tests, and added one covering LDFLAGS. Thanks for the review!

gdesmott commented 3 months ago

Merged and I just released 7.0.0 with your patch.