-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
zig build: respect PKG_CONFIG environment variable #19901
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
zig build: respect PKG_CONFIG environment variable #19901
Conversation
ecdabd3
to
fdc0480
Compare
standard practice here is to check the |
I know, it was intentionally omitted. I think it will be easier to merge without it, since there are less lines added and less ehh controversial points (IIRC core team wants to avoid this kind of environment variables, f.e. #17585 and #10754 (comment)), don't want to convince them, just easy merge. |
fdc0480
to
65f369b
Compare
Fixed merge conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how those linked issues are relevant. If PKG_CONFIG
environment variable is a standard practice then it's desirable to use as the default. The purpose of the pkg-config integration is to integrate with the system. Respecting a standard environment variable would make the system integration more complete.
It's even better, will do :) |
`PKG_CONFIG` environment variable is used to override path to pkg-config executable, for example when it's name is prepended by target triple for cross-compilation purposes: ``` PKG_CONFIG=/usr/bin/aarch64-unknown-linux-gnu-pkgconf zig build ``` Signed-off-by: Eric Joldasov <[email protected]>
65f369b
to
bcf40a1
Compare
--pkg-config
option
you can use below code in the build.zig to achieve the same effect. b.graph.env_map.put("PKG_CONFIG_PATH", "XXXX") catch unreachable; |
Thanks! |
PKG_CONFIG
environment variable is used to override path topkg-config executable, for example when it's name is prepended by
target triple for cross-compilation purposes: