Use Requires.private only for static linking#42
Use Requires.private only for static linking#42otegami wants to merge 3 commits intoruby-gnome:mainfrom
Conversation
GitHub: - ruby-gnome#41 (comment) - ruby-gnome#41 (comment) By default, exclude `Requires.private` dependencies from cflags and libs output to match pkgconf's behavior. When the new `static: true` option is specified, include `Requires.private` dependencies for static linking scenarios. This change makes the default behavior consistent with pkgconf while still supporting static linking use-cases through an explicit option. Co-Authored-By: kou <kou@clear-code.com>
2a3e40a to
c59ea43
Compare
c59ea43 to
183cb7b
Compare
|
On Windows, some test failed because of cflags... ref: https://github.com/otegami/pkg-config/actions/runs/19729356341/job/56526836780#step:9:24 The pkgconf's behavior might be different between RubyInstaller and MSYS2. RubyInstaller (pkgconf 2.5.1)Output includes Requires.private cflags. MSYS2 (pkgconf 2.5.1)Output does NOT include Requires.private cflags. |
|
The difference is caused by pkgconf's system include path filtering. MSYS2 environmentIn MSYS2, pkgconf recognizes '/ucrt64/include' as a system include path and excludes it by default.
ref: https://github.com/otegami/pkg-config/actions/runs/19730472975/job/56530192519#step:5:97 Difference between RubyInstaller and MSYS2
This is likely due to different pkgconf build configurations or environment settings between the two? |
|
Could you show the results of |
Sure, the result is the following. RubyInstaller's MSYS2no-RubyInstaller MSYS2 |
|
Could you also share |
Sure. RubyInstaller MSYS2pkgconf --helpのログno RubyInstaller MSYS2pkgconf --helpのログ |
|
I looked into the pkgconf source code. It seems that pkgconf includes To match pkgconf's behavior, we need to implement this system path filtering in the pkg-config gem. |
How did you confirm it? Could you share the result of |
|
I confirmed it using the following information. This is also documented in the NEWS file.
I will check it now. |
|
Then, we should keep the current implementation (use |
|
Yes. So I will close this PR because this specification doesn't follow pkgconf's behaviors. |
GitHub:
By default, exclude
Requires.privatedependencies from cflags and libs output to match pkgconf'sbehavior.
When the new
static: trueoption is specified,include
Requires.privatedependencies for static linking scenarios.This change makes the default behavior consistent with pkgconf while still supporting static linking
use-cases through an explicit option.