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

Honor manual requests for static linking #75

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

Ablu
Copy link

@Ablu Ablu commented Jun 22, 2023

This allows a user to statically link a library even when not using pkg-config as source. Previously, if SYSTEM_DEPS_NO_PKG_CONFIG was set, the SYSTEM_DEPS_LINK=static configuration was ignored.

Since the user already went above and beyond to issue a strong intent of static linking, no check is performed whether the file actually exists. The linker will scream if something is wrong.

This allows a user to statically link a library even when not using
pkg-config as source. Previously, if SYSTEM_DEPS_<LIB>_NO_PKG_CONFIG was
set, the SYSTEM_DEPS_<LIB>_LINK=static configuration was ignored.

Since the user already went above and beyond to issue a strong intent of
static linking, no check is performed whether the file actually exists.
The linker will scream if something is wrong.
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #75 (0b30a14) into master (d1765d9) will increase coverage by 0.49%.
The diff coverage is 98.18%.

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
+ Coverage   62.48%   62.97%   +0.49%     
==========================================
  Files           3        3              
  Lines        3505     3565      +60     
==========================================
+ Hits         2190     2245      +55     
- Misses       1315     1320       +5     
Impacted Files Coverage Δ
src/lib.rs 38.86% <90.00%> (+0.20%) ⬆️
src/test.rs 98.57% <100.00%> (+0.06%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@gdesmott gdesmott merged commit 8ca9d9d into gdesmott:master Jun 22, 2023
@gdesmott
Copy link
Owner

Thanks for your patch, and kudo for writing a test! ❤️

I just released 6.1.1 with it.

@Ablu
Copy link
Author

Ablu commented Jun 22, 2023

I just released 6.1.1 with it.

Thanks :)

Ablu added a commit to Ablu/libgpiod that referenced this pull request Jun 26, 2023
Static linking simplifies the test execution a bit (no need to set
LD_LIBRARY_PATH). system-deps had a bug with it when disabling
pkg-config lookup [1]. Bump the lower floor to a version with the fix.

API slightly changed regarding iterating the libs.

No functional changes intended. Since this is only a build-dep, no
implications should occur for users.

[1] gdesmott/system-deps#75

Signed-off-by: Erik Schilling <[email protected]>
Ablu added a commit to Ablu/libgpiod that referenced this pull request Jun 29, 2023
Static linking simplifies the test execution a bit (no need to set
LD_LIBRARY_PATH). system-deps gained static linking support with version
4.0, but then had a bug with it when disabling pkg-config lookup [1].
Bump the lower floor to a version with the fix.

So we can choose between 4.x or >6.1.x. In order to prevent needing to
bump the MSRV, this goes with 4.x.

API slightly changed regarding iterating the libs.

No functional changes intended. Since this is only a build-dep, no
implications should occur for users.

[1] gdesmott/system-deps#75

Signed-off-by: Erik Schilling <[email protected]>
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