aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src
diff options
context:
space:
mode:
authornicole mazzuca <mazzucan@outlook.com>2020-11-12 17:31:34 -0800
committerGitHub <noreply@github.com>2020-11-12 17:31:34 -0800
commitd9b179fd46fc93a2f893b98eefac17a1985f423d (patch)
tree8b4b39c6267bbb66a62b0cadd16448cd3e19f86b /toolsrc/src
parent05170a1f609f8e4fdf1b771f960943773e110e50 (diff)
downloadvcpkg-d9b179fd46fc93a2f893b98eefac17a1985f423d.tar.gz
vcpkg-d9b179fd46fc93a2f893b98eefac17a1985f423d.zip
[llvm] install tools in tools/llvm (#14399)
* [llvm] install tools in tools/llvm * remove the giant commented out block of code * update port-version * hopefully fix the port? There are still some issues, namely that the python scripts and DLLs that are copied into `tools/llvm` are not considered to be "installed by llvm", and thus are not removed when llvm is removed * format! * apparently REGEX REPLACE fails if a thing doesn't match * fix LLVM_REMOVE_EXTENSION_REGEX on windows * actually read the cmake regex docs... * fix the name of the variable * turns out CMAKE_MATCH_1 is the one I want * need to update VERSION for new policy * stop removing debug/bin * fix faulty merge
Diffstat (limited to 'toolsrc/src')
-rw-r--r--toolsrc/src/vcpkg/build.cpp3
-rw-r--r--toolsrc/src/vcpkg/postbuildlint.cpp13
2 files changed, 11 insertions, 5 deletions
diff --git a/toolsrc/src/vcpkg/build.cpp b/toolsrc/src/vcpkg/build.cpp
index bae937277..e75f5b7c1 100644
--- a/toolsrc/src/vcpkg/build.cpp
+++ b/toolsrc/src/vcpkg/build.cpp
@@ -203,6 +203,7 @@ namespace vcpkg::Build
static const std::string NAME_EMPTY_PACKAGE = "PolicyEmptyPackage";
static const std::string NAME_DLLS_WITHOUT_LIBS = "PolicyDLLsWithoutLIBs";
static const std::string NAME_DLLS_WITHOUT_EXPORTS = "PolicyDLLsWithoutExports";
+ static const std::string NAME_DLLS_IN_STATIC_LIBRARY = "PolicyDLLsInStaticLibrary";
static const std::string NAME_MISMATCHED_NUMBER_OF_BINARIES = "PolicyMismatchedNumberOfBinaries";
static const std::string NAME_ONLY_RELEASE_CRT = "PolicyOnlyReleaseCRT";
static const std::string NAME_EMPTY_INCLUDE_FOLDER = "PolicyEmptyIncludeFolder";
@@ -231,6 +232,7 @@ namespace vcpkg::Build
case BuildPolicy::EMPTY_PACKAGE: return NAME_EMPTY_PACKAGE;
case BuildPolicy::DLLS_WITHOUT_LIBS: return NAME_DLLS_WITHOUT_LIBS;
case BuildPolicy::DLLS_WITHOUT_EXPORTS: return NAME_DLLS_WITHOUT_EXPORTS;
+ case BuildPolicy::DLLS_IN_STATIC_LIBRARY: return NAME_DLLS_IN_STATIC_LIBRARY;
case BuildPolicy::MISMATCHED_NUMBER_OF_BINARIES: return NAME_MISMATCHED_NUMBER_OF_BINARIES;
case BuildPolicy::ONLY_RELEASE_CRT: return NAME_ONLY_RELEASE_CRT;
case BuildPolicy::EMPTY_INCLUDE_FOLDER: return NAME_EMPTY_INCLUDE_FOLDER;
@@ -249,6 +251,7 @@ namespace vcpkg::Build
case BuildPolicy::EMPTY_PACKAGE: return "VCPKG_POLICY_EMPTY_PACKAGE";
case BuildPolicy::DLLS_WITHOUT_LIBS: return "VCPKG_POLICY_DLLS_WITHOUT_LIBS";
case BuildPolicy::DLLS_WITHOUT_EXPORTS: return "VCPKG_POLICY_DLLS_WITHOUT_EXPORTS";
+ case BuildPolicy::DLLS_IN_STATIC_LIBRARY: return "VCPKG_POLICY_DLLS_IN_STATIC_LIBRARY";
case BuildPolicy::MISMATCHED_NUMBER_OF_BINARIES: return "VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES";
case BuildPolicy::ONLY_RELEASE_CRT: return "VCPKG_POLICY_ONLY_RELEASE_CRT";
case BuildPolicy::EMPTY_INCLUDE_FOLDER: return "VCPKG_POLICY_EMPTY_INCLUDE_FOLDER";
diff --git a/toolsrc/src/vcpkg/postbuildlint.cpp b/toolsrc/src/vcpkg/postbuildlint.cpp
index 8490ac364..0ea5786f6 100644
--- a/toolsrc/src/vcpkg/postbuildlint.cpp
+++ b/toolsrc/src/vcpkg/postbuildlint.cpp
@@ -561,9 +561,9 @@ namespace vcpkg::PostBuildLint
return LintStatus::SUCCESS;
}
- static LintStatus check_no_dlls_present(const std::vector<fs::path>& dlls)
+ static LintStatus check_no_dlls_present(const Build::BuildPolicies& policies, const std::vector<fs::path>& dlls)
{
- if (dlls.empty())
+ if (dlls.empty() || policies.is_enabled(BuildPolicy::DLLS_IN_STATIC_LIBRARY))
{
return LintStatus::SUCCESS;
}
@@ -628,9 +628,12 @@ namespace vcpkg::PostBuildLint
return LintStatus::SUCCESS;
}
- static LintStatus check_bin_folders_are_not_present_in_static_build(const Files::Filesystem& fs,
+ static LintStatus check_bin_folders_are_not_present_in_static_build(const Build::BuildPolicies& policies,
+ const Files::Filesystem& fs,
const fs::path& package_dir)
{
+ if (policies.is_enabled(BuildPolicy::DLLS_IN_STATIC_LIBRARY)) return LintStatus::SUCCESS;
+
const fs::path bin = package_dir / "bin";
const fs::path debug_bin = package_dir / "debug" / "bin";
@@ -922,9 +925,9 @@ namespace vcpkg::PostBuildLint
{
auto dlls = release_dlls;
dlls.insert(dlls.end(), debug_dlls.begin(), debug_dlls.end());
- error_count += check_no_dlls_present(dlls);
+ error_count += check_no_dlls_present(build_info.policies, dlls);
- error_count += check_bin_folders_are_not_present_in_static_build(fs, package_dir);
+ error_count += check_bin_folders_are_not_present_in_static_build(build_info.policies, fs, package_dir);
if (!toolset.dumpbin.empty() && !build_info.policies.is_enabled(BuildPolicy::SKIP_DUMPBIN_CHECKS))
{