From bf7978dcf962c8ff37b3319121e60eb1629be684 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 9 Nov 2016 18:44:11 -0800 Subject: [post-build-checks] Rework crt linkage checks --- toolsrc/include/BuildInfo.h | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h index 870001474..235c83837 100644 --- a/toolsrc/include/BuildInfo.h +++ b/toolsrc/include/BuildInfo.h @@ -2,6 +2,7 @@ #include #include "Paragraphs.h" +#include namespace fs = std::tr2::sys; @@ -35,17 +36,33 @@ namespace vcpkg static const BuildType RELEASE_STATIC; static const BuildType RELEASE_DYNAMIC; - const ConfigurationType config; - const LinkageType linkage; + static constexpr int length() + { + return 4; + } + + static const std::vector& values() + { + static const std::vector v = {DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; + return v; + } BuildType() = delete; - std::string toString() const; + const ConfigurationType& config() const; + const LinkageType& linkage() const; + const std::regex& crt_regex() const; + const std::string& toString() const; private: - BuildType(const ConfigurationType& config, const LinkageType& linkage) : config(config), linkage(linkage) + BuildType(const ConfigurationType& config, const LinkageType& linkage, const std::string& crt_regex_as_string) + : m_config(config), m_linkage(linkage), m_crt_regex_as_string(crt_regex_as_string) { } + + ConfigurationType m_config; + LinkageType m_linkage; + std::string m_crt_regex_as_string; }; bool operator ==(const BuildType& lhs, const BuildType& rhs); -- cgit v1.2.3 From eb7ca47d4839a6bf8cea36cba8507750cd5d7746 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 10 Nov 2016 11:04:33 -0800 Subject: Add checks for outdated crts --- toolsrc/include/BuildInfo.h | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h index 235c83837..5a85d92d8 100644 --- a/toolsrc/include/BuildInfo.h +++ b/toolsrc/include/BuildInfo.h @@ -36,11 +36,6 @@ namespace vcpkg static const BuildType RELEASE_STATIC; static const BuildType RELEASE_DYNAMIC; - static constexpr int length() - { - return 4; - } - static const std::vector& values() { static const std::vector v = {DEBUG_STATIC, DEBUG_DYNAMIC, RELEASE_STATIC, RELEASE_DYNAMIC}; @@ -69,6 +64,43 @@ namespace vcpkg bool operator !=(const BuildType& lhs, const BuildType& rhs); + struct OutdatedDynamicCrt + { + static const OutdatedDynamicCrt MSVCP100_DLL; + static const OutdatedDynamicCrt MSVCP100D_DLL; + static const OutdatedDynamicCrt MSVCP110_DLL; + static const OutdatedDynamicCrt MSVCP110_WIN_DLL; + static const OutdatedDynamicCrt MSVCP120_DLL; + static const OutdatedDynamicCrt MSVCP120_CLR0400_DLL; + static const OutdatedDynamicCrt MSVCP60_DLL; + static const OutdatedDynamicCrt MSVCP_WIN_DLL; + + static const std::vector& values() + { + static const std::vector v = { + MSVCP100_DLL, MSVCP100D_DLL, + MSVCP110_DLL,MSVCP110_WIN_DLL, + MSVCP120_DLL, MSVCP120_CLR0400_DLL, + MSVCP60_DLL, MSVCP_WIN_DLL + }; + return v; + } + + OutdatedDynamicCrt() = delete; + + const std::regex& crt_regex() const; + const std::string& toString() const; + + private: + explicit OutdatedDynamicCrt(const std::string& dll_name, const std::string& crt_regex_as_string) + : m_dll_name(dll_name), m_crt_regex_as_string(crt_regex_as_string) + { + } + + std::string m_dll_name; + std::string m_crt_regex_as_string; + }; + struct BuildInfo { static BuildInfo create(const std::unordered_map& pgh); -- cgit v1.2.3 From d852d3b6f230a55878d7be26fba210cfc67689d1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 10 Nov 2016 16:28:10 -0800 Subject: Add more blacklisted outdated crts --- toolsrc/include/BuildInfo.h | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'toolsrc/include') diff --git a/toolsrc/include/BuildInfo.h b/toolsrc/include/BuildInfo.h index 5a85d92d8..22b4bed7d 100644 --- a/toolsrc/include/BuildInfo.h +++ b/toolsrc/include/BuildInfo.h @@ -66,6 +66,7 @@ namespace vcpkg struct OutdatedDynamicCrt { + // Old CPP static const OutdatedDynamicCrt MSVCP100_DLL; static const OutdatedDynamicCrt MSVCP100D_DLL; static const OutdatedDynamicCrt MSVCP110_DLL; @@ -75,13 +76,30 @@ namespace vcpkg static const OutdatedDynamicCrt MSVCP60_DLL; static const OutdatedDynamicCrt MSVCP_WIN_DLL; + // Old C + static const OutdatedDynamicCrt MSVCR100_DLL; + static const OutdatedDynamicCrt MSVCR100D_DLL; + static const OutdatedDynamicCrt MSVCR100_CLR0400_DLL; + static const OutdatedDynamicCrt MSVCR110_DLL; + static const OutdatedDynamicCrt MSVCR120_DLL; + static const OutdatedDynamicCrt MSVCR120_CLR0400_DLL; + static const OutdatedDynamicCrt MSVCRT_DLL; + static const OutdatedDynamicCrt MSVCRT20_DLL; + static const OutdatedDynamicCrt MSVCRT40_DLL; + static const std::vector& values() { static const std::vector v = { MSVCP100_DLL, MSVCP100D_DLL, MSVCP110_DLL,MSVCP110_WIN_DLL, MSVCP120_DLL, MSVCP120_CLR0400_DLL, - MSVCP60_DLL, MSVCP_WIN_DLL + MSVCP60_DLL, + MSVCP_WIN_DLL, + + MSVCR100_DLL, MSVCR100D_DLL, MSVCR100_CLR0400_DLL, + MSVCR110_DLL, + MSVCR120_DLL, MSVCR120_CLR0400_DLL, + MSVCRT_DLL, MSVCRT20_DLL,MSVCRT40_DLL }; return v; } -- cgit v1.2.3