aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2020-02-11 23:52:56 -0800
committerRobert Schumacher <roschuma@microsoft.com>2020-02-11 23:52:56 -0800
commit3d841c9b6a67edf2126c68698a9f05b5d1b5fbcd (patch)
tree0ff641d2cb980f66120e73c9271e2782878b28af /toolsrc/include
parentb9942d07441934c40869b16184455a7fef2024f5 (diff)
downloadvcpkg-3d841c9b6a67edf2126c68698a9f05b5d1b5fbcd.tar.gz
vcpkg-3d841c9b6a67edf2126c68698a9f05b5d1b5fbcd.zip
[vcpkg] Compute all ABIs upfront instead of during build_package()
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg/binarycaching.h16
-rw-r--r--toolsrc/include/vcpkg/build.h8
-rw-r--r--toolsrc/include/vcpkg/dependencies.h6
3 files changed, 17 insertions, 13 deletions
diff --git a/toolsrc/include/vcpkg/binarycaching.h b/toolsrc/include/vcpkg/binarycaching.h
index ff2be6eac..60b2eeab7 100644
--- a/toolsrc/include/vcpkg/binarycaching.h
+++ b/toolsrc/include/vcpkg/binarycaching.h
@@ -27,16 +27,12 @@ namespace vcpkg
{
virtual ~IBinaryProvider() = default;
virtual void prefetch() = 0;
- virtual RestoreResult try_restore(const VcpkgPaths& paths,
- const PackageSpec& spec,
- const Build::AbiTagAndFile& abi_tag_and_file,
- const Build::BuildPackageOptions& build_options) = 0;
- virtual void push_success(const VcpkgPaths& paths,
- const Build::AbiTagAndFile& abi_tag_and_file,
- const Dependencies::InstallPlanAction& action) = 0;
- virtual void push_failure(const VcpkgPaths& paths,
- const Build::AbiTagAndFile& abi_tag_and_file,
- const PackageSpec& spec) = 0;
+ virtual RestoreResult try_restore(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action) = 0;
+ virtual void push_success(const VcpkgPaths& paths, const Dependencies::InstallPlanAction& action) = 0;
+ virtual void push_failure(const VcpkgPaths& paths, const std::string& abi_tag, const PackageSpec& spec) = 0;
+ virtual RestoreResult precheck(const VcpkgPaths& paths,
+ const Dependencies::InstallPlanAction& action,
+ bool purge_tombstones) = 0;
};
std::unique_ptr<IBinaryProvider> create_archives_provider();
diff --git a/toolsrc/include/vcpkg/build.h b/toolsrc/include/vcpkg/build.h
index 58a807776..d36b64143 100644
--- a/toolsrc/include/vcpkg/build.h
+++ b/toolsrc/include/vcpkg/build.h
@@ -24,6 +24,7 @@ namespace vcpkg
namespace vcpkg::Dependencies
{
struct InstallPlanAction;
+ struct ActionPlan;
}
namespace vcpkg::Build
@@ -205,7 +206,6 @@ namespace vcpkg::Build
ExtendedBuildResult build_package(const VcpkgPaths& paths,
const Dependencies::InstallPlanAction& config,
- const CMakeVars::CMakeVarProvider& var_provider,
IBinaryProvider* binaries_provider,
const StatusParagraphs& status_db);
@@ -293,8 +293,12 @@ namespace vcpkg::Build
fs::path tag_file;
};
+ void compute_all_abis(const VcpkgPaths& paths,
+ Dependencies::ActionPlan& action_plan,
+ const CMakeVars::CMakeVarProvider& var_provider,
+ const StatusParagraphs& status_db);
+
Optional<AbiTagAndFile> compute_abi_tag(const VcpkgPaths& paths,
const Dependencies::InstallPlanAction& config,
- const PreBuildInfo& pre_build_info,
Span<const AbiEntry> dependency_abis);
}
diff --git a/toolsrc/include/vcpkg/dependencies.h b/toolsrc/include/vcpkg/dependencies.h
index 1f92ee63c..26ba9a67c 100644
--- a/toolsrc/include/vcpkg/dependencies.h
+++ b/toolsrc/include/vcpkg/dependencies.h
@@ -53,6 +53,7 @@ namespace vcpkg::Dependencies
std::unordered_map<std::string, std::vector<FeatureSpec>>&& dependencies);
std::string displayname() const;
+ const std::string& public_abi() const;
PackageSpec spec;
@@ -65,8 +66,11 @@ namespace vcpkg::Dependencies
std::unordered_map<std::string, std::vector<FeatureSpec>> feature_dependencies;
std::vector<PackageSpec> package_dependencies;
-
std::vector<std::string> feature_list;
+
+ Optional<std::unique_ptr<Build::PreBuildInfo>> pre_build_info;
+ Optional<std::string> package_abi;
+ Optional<fs::path> abi_tag_file;
};
enum class RemovePlanType