feat(deps): resolve pkg-config modules
VoidBuildSystem CI / sanitizers-gcc16 (push) Failing after 4s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 5s
VoidBuildSystem CI / fuzz-clang (push) Failing after 4s
VoidBuildSystem CI / signing-openssl-gcc16 (push) Failing after 9s
VoidBuildSystem CI / wine-windows-gcc16 (push) Failing after 49s

This commit is contained in:
faumaray committed 2026-12-05 13:55:02 +03:00
1 parent f8e0036b37
commit ce041ace07
13 files changed
+663 -12

No files matched your search

+19
View File
@@ -25,6 +25,7 @@
#include <Void/Build/Provenance/Signing.hpp>
#include <Void/Build/Provenance/TrustedKeys.hpp>
#include <Void/Build/Provenance/Verification.hpp>
#include <Void/Build/Provider/PkgConfig.hpp>
#include <Void/Build/Provider/Provider.hpp>
#include <Void/Build/Provider/Translator.hpp>
#include <Void/Build/Report/Cdash.hpp>
@@ -680,6 +681,24 @@ int execute_build_or_test(BuildCmdOptions opts, bool run_tests) {
}
}
}
// pkg-config dependencies are resolved from the host environment (PKG_CONFIG_PATH /
// PKG_CONFIG_LIBDIR) instead of being fetched.
for (const auto &dep : *merged_deps) {
if (dep.record.source_kind != DependencySourceKind::PkgConfig) {
continue;
}
auto exported = Provider::resolve_pkgconfig(dep.record.name, dep.record.location,
Provider::pkgconfig_search_paths());
if (!exported) {
std::cerr << "vbs: " << exported.error().message() << '\n';
return 1;
}
Void::Log::info("Provider", "[{}] Resolved pkg-config '{}' ({} target(s))",
prof_name, dep.record.location, exported->targets.size());
for (auto &[k, v] : exported->targets) {
imported_targets[k] = std::move(v);
}
}
if (need_lock_publish) {
const std::string base_rev =
pinned_lock->has_value() ? (*pinned_lock)->revision_hash : std::string{};