| 18 Jul 2025 |
emily | let kind = if host == target { "HOST" } else { "TARGET" };
it's wonderful that it does this for no apparent reason
| 20:48:18 |
emily | I guess to handle the build script deps case | 20:48:26 |
dramforever | what uses HOST_PKG_CONFIG | 20:48:29 |
emily | so actually setting both should be fine… | 20:48:34 |
dramforever | does build script dep even look like cross | 20:48:44 |
emily | no, which is why ^ triggers | 20:48:53 |
emily | here's the relevant pieces of code https://docs.rs/pkg-config/0.3.32/src/pkg_config/lib.rs.html#638-659, https://docs.rs/pkg-config/0.3.32/src/pkg_config/lib.rs.html#606-630, https://docs.rs/pkg-config/0.3.32/src/pkg_config/lib.rs.html#672-679 | 20:49:06 |
emily | is it a sign of maturity in my cross-compilation journey that my typical reaction has gone from "I'm confused" to "the people who wrote this build logic are confused" | 20:49:48 |
dramforever | to confuse your enemies you must first confuse yourself | 20:50:16 |
dramforever | so is this for everything? or just for rust? | 20:50:44 |
emily | we're just doing Rust here | 20:52:21 |
emily | but we're setting it in the pkg-config hook to accommodate the Rust thing | 20:52:28 |
emily | which uses variables nobody else does, for fun | 20:52:36 |
emily | and I think assigns different semantics to them than others, for fun | 20:52:44 |
dramforever | okay so HOST_PKG_CONFIG is just doing nothing...? | 20:52:49 |
emily | well it's doing the same thing as PKG_CONFIG in non-cross builds | 20:53:03 |
emily | for cross builds it's never used, I guess. | 20:53:11 |
emily | or well | 20:53:21 |
dramforever | ah | 20:53:22 |
emily | it's used in the build scripts | 20:53:23 |
emily | or, uh | 20:53:27 |
emily | I mean, it's used when targeting … augh | 20:53:35 |
emily | you know what I mean. hopefully | 20:53:41 |
dramforever | wanna get angry? linux makefiles take HOSTPKG_CONFIG | 20:53:56 |
emily | it seems like the library will fundamentally only think about the host ("target") platform | 20:54:22 |
emily | when run in a build script for a package targeting that host platform | 20:54:30 |
emily | even though there seems like reason you might want to care about build platform deps in such a build script too | 20:54:42 |
dramforever | wait so if i'm building a build script dep | 20:55:04 |
dramforever | what do i get for "HOST" and "TARGET" | 20:55:16 |
emily | the same thing | 20:55:20 |