aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authorCurtis.Bezault <curtbezault@gmail.com>2019-07-17 10:10:36 -0700
committerCurtis.Bezault <curtbezault@gmail.com>2019-07-17 10:10:36 -0700
commitd4ab567609495a5c239f537d7c1e200f7b8a19c0 (patch)
tree984741a95cf980aadfb24cb1e75be0960083fb93 /toolsrc/src
parent7d9d457f589d82d6675c511636808a0fbee7a4e5 (diff)
downloadvcpkg-d4ab567609495a5c239f537d7c1e200f7b8a19c0.tar.gz
vcpkg-d4ab567609495a5c239f537d7c1e200f7b8a19c0.zip
first pass at abi additional files
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg/build.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp
index 03e0c0b1d..daed6f695 100644
--- a/toolsrc/src/vcpkg/build.cpp
+++ b/toolsrc/src/vcpkg/build.cpp
@@ -496,6 +496,31 @@ namespace vcpkg::Build
s_hash_cache.emplace(triplet_file_path, hash);
}
+ for (const fs::path& additional_file : pre_build_info.additional_files)
+ {
+ it_hash = s_hash_cache.find(additional_file);
+
+ if (it_hash != s_hash_cache.end())
+ {
+ hash += "-";
+ hash += it_hash->second;
+ }
+ else if (fs.is_regular_file(additional_file))
+ {
+ std::string tmp_hash = Hash::get_file_hash(fs, additional_file, "SHA1");
+ hash += "-";
+ hash += tmp_hash;
+
+ s_hash_cache.emplace(additional_file, tmp_hash);
+ }
+ else
+ {
+ Checks::exit_with_message(
+ VCPKG_LINE_INFO,
+ additional_file + " was listed as an additional file for calculating the abi, but was not found.");
+ }
+ }
+
return hash;
}
@@ -1087,6 +1112,13 @@ namespace vcpkg::Build
case VcpkgTripletVar::ENV_PASSTHROUGH :
pre_build_info.passthrough_env_vars = Strings::split(variable_value, ";");
break;
+ case VcpkgTripletVar::ABI_ADDITIONAL_FILES :
+ pre_build_info.additional_files = Util::fmap(Strings::split(variable_value, ";"),
+ [](const std::string& path)
+ {
+ return fs::path{path};
+ });
+ break;
}
}
else