Skip to content

Fix linking if SDK and app are built by GCC with 11 and 17 standards #2185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 6 additions & 72 deletions aws-cpp-sdk-core/include/aws/core/endpoint/AWSPartitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,86 +4,20 @@
*/

#pragma once
#include <aws/core/Core_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSArray.h>

namespace Aws
{
namespace Endpoint
{
struct AWSPartitions
struct AWS_CORE_API AWSPartitions
{
public:
static constexpr size_t PartitionsBlobStrLen = 1629;
static constexpr size_t PartitionsBlobSize = 1630;
using PartitionsBlobT = Aws::Array<const char, PartitionsBlobSize>;
static constexpr PartitionsBlobT PartitionsBlob = {
'{','"','v','e','r','s','i','o','n','"',':','"','1','.','1','"',',','"','p','a','r','t','i','t','i',
'o','n','s','"',':','[','{','"','i','d','"',':','"','a','w','s','"',',','"','r','e','g','i','o','n',
'R','e','g','e','x','"',':','"','^','(','u','s','|','e','u','|','a','p','|','s','a','|','c','a','|',
'm','e','|','a','f',')','-','\\','\\','w','+','-','\\','\\','d','+','$','"',',','"','r','e','g','i','o',
'n','s','"',':','{','"','a','f','-','s','o','u','t','h','-','1','"',':','{','}',',','"','a','f','-',
'e','a','s','t','-','1','"',':','{','}',',','"','a','p','-','n','o','r','t','h','e','a','s','t','-',
'1','"',':','{','}',',','"','a','p','-','n','o','r','t','h','e','a','s','t','-','2','"',':','{','}',
',','"','a','p','-','n','o','r','t','h','e','a','s','t','-','3','"',':','{','}',',','"','a','p','-',
's','o','u','t','h','-','1','"',':','{','}',',','"','a','p','-','s','o','u','t','h','e','a','s','t',
'-','1','"',':','{','}',',','"','a','p','-','s','o','u','t','h','e','a','s','t','-','2','"',':','{',
'}',',','"','a','p','-','s','o','u','t','h','e','a','s','t','-','3','"',':','{','}',',','"','c','a',
'-','c','e','n','t','r','a','l','-','1','"',':','{','}',',','"','e','u','-','c','e','n','t','r','a',
'l','-','1','"',':','{','}',',','"','e','u','-','n','o','r','t','h','-','1','"',':','{','}',',','"',
'e','u','-','s','o','u','t','h','-','1','"',':','{','}',',','"','e','u','-','w','e','s','t','-','1',
'"',':','{','}',',','"','e','u','-','w','e','s','t','-','2','"',':','{','}',',','"','e','u','-','w',
'e','s','t','-','3','"',':','{','}',',','"','m','e','-','s','o','u','t','h','-','1','"',':','{','}',
',','"','s','a','-','e','a','s','t','-','1','"',':','{','}',',','"','u','s','-','e','a','s','t','-',
'1','"',':','{','}',',','"','u','s','-','e','a','s','t','-','2','"',':','{','}',',','"','u','s','-',
'w','e','s','t','-','1','"',':','{','}',',','"','u','s','-','w','e','s','t','-','2','"',':','{','}',
',','"','a','w','s','-','g','l','o','b','a','l','"',':','{','}','}',',','"','o','u','t','p','u','t',
's','"',':','{','"','n','a','m','e','"',':','"','a','w','s','"',',','"','d','n','s','S','u','f','f',
'i','x','"',':','"','a','m','a','z','o','n','a','w','s','.','c','o','m','"',',','"','d','u','a','l',
'S','t','a','c','k','D','n','s','S','u','f','f','i','x','"',':','"','a','p','i','.','a','w','s','"',
',','"','s','u','p','p','o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u','p',
'p','o','r','t','s','D','u','a','l','S','t','a','c','k','"',':','t','r','u','e','}','}',',','{','"',
'i','d','"',':','"','a','w','s','-','u','s','-','g','o','v','"',',','"','r','e','g','i','o','n','R',
'e','g','e','x','"',':','"','^','u','s','\\','\\','-','g','o','v','\\','\\','-','\\','\\','w','+','\\','\\',
'-','\\','\\','d','+','$','"',',','"','r','e','g','i','o','n','s','"',':','{','"','u','s','-','g','o',
'v','-','w','e','s','t','-','1','"',':','{','}',',','"','u','s','-','g','o','v','-','e','a','s','t',
'-','1','"',':','{','}',',','"','a','w','s','-','u','s','-','g','o','v','-','g','l','o','b','a','l',
'"',':','{','}','}',',','"','o','u','t','p','u','t','s','"',':','{','"','n','a','m','e','"',':','"',
'a','w','s','-','u','s','-','g','o','v','"',',','"','d','n','s','S','u','f','f','i','x','"',':','"',
'a','m','a','z','o','n','a','w','s','.','c','o','m','"',',','"','d','u','a','l','S','t','a','c','k',
'D','n','s','S','u','f','f','i','x','"',':','"','a','p','i','.','a','w','s','"',',','"','s','u','p',
'p','o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u','p','p','o','r','t','s',
'D','u','a','l','S','t','a','c','k','"',':','t','r','u','e','}','}',',','{','"','i','d','"',':','"',
'a','w','s','-','c','n','"',',','"','r','e','g','i','o','n','R','e','g','e','x','"',':','"','^','c',
'n','\\','\\','-','\\','\\','w','+','\\','\\','-','\\','\\','d','+','$','"',',','"','r','e','g','i','o','n',
's','"',':','{','"','c','n','-','n','o','r','t','h','-','1','"',':','{','}',',','"','c','n','-','n',
'o','r','t','h','w','e','s','t','-','1','"',':','{','}',',','"','a','w','s','-','c','n','-','g','l',
'o','b','a','l','"',':','{','}','}',',','"','o','u','t','p','u','t','s','"',':','{','"','n','a','m',
'e','"',':','"','a','w','s','-','c','n','"',',','"','d','n','s','S','u','f','f','i','x','"',':','"',
'a','m','a','z','o','n','a','w','s','.','c','o','m','.','c','n','"',',','"','d','u','a','l','S','t',
'a','c','k','D','n','s','S','u','f','f','i','x','"',':','"','a','p','i','.','a','m','a','z','o','n',
'w','e','b','s','e','r','v','i','c','e','s','.','c','o','m','.','c','n','"',',','"','s','u','p','p',
'o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u','p','p','o','r','t','s','D',
'u','a','l','S','t','a','c','k','"',':','t','r','u','e','}','}',',','{','"','i','d','"',':','"','a',
'w','s','-','i','s','o','"',',','"','r','e','g','i','o','n','R','e','g','e','x','"',':','"','^','u',
's','\\','\\','-','i','s','o','\\','\\','-','\\','\\','w','+','\\','\\','-','\\','\\','d','+','$','"',',','"',
'o','u','t','p','u','t','s','"',':','{','"','n','a','m','e','"',':','"','a','w','s','-','i','s','o',
'"',',','"','d','n','s','S','u','f','f','i','x','"',':','"','c','2','s','.','i','c','.','g','o','v',
'"',',','"','s','u','p','p','o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u',
'p','p','o','r','t','s','D','u','a','l','S','t','a','c','k','"',':','f','a','l','s','e',',','"','d',
'u','a','l','S','t','a','c','k','D','n','s','S','u','f','f','i','x','"',':','"','c','2','s','.','i',
'c','.','g','o','v','"','}',',','"','r','e','g','i','o','n','s','"',':','{','"','a','w','s','-','i',
's','o','-','g','l','o','b','a','l','"',':','{','}','}','}',',','{','"','i','d','"',':','"','a','w',
's','-','i','s','o','-','b','"',',','"','r','e','g','i','o','n','R','e','g','e','x','"',':','"','^',
'u','s','\\','\\','-','i','s','o','b','\\','\\','-','\\','\\','w','+','\\','\\','-','\\','\\','d','+','$','"',
',','"','o','u','t','p','u','t','s','"',':','{','"','n','a','m','e','"',':','"','a','w','s','-','i',
's','o','-','b','"',',','"','d','n','s','S','u','f','f','i','x','"',':','"','s','c','2','s','.','s',
'g','o','v','.','g','o','v','"',',','"','s','u','p','p','o','r','t','s','F','I','P','S','"',':','t',
'r','u','e',',','"','s','u','p','p','o','r','t','s','D','u','a','l','S','t','a','c','k','"',':','f',
'a','l','s','e',',','"','d','u','a','l','S','t','a','c','k','D','n','s','S','u','f','f','i','x','"',
':','"','s','c','2','s','.','s','g','o','v','.','g','o','v','"','}',',','"','r','e','g','i','o','n',
's','"',':','{','"','a','w','s','-','i','s','o','-','b','-','g','l','o','b','a','l','"',':','{','}',
'}','}',']','}','\0'
};
static const size_t PartitionsBlobStrLen;
static const size_t PartitionsBlobSize;

static const char* GetPartitionsBlob();
};
} // namespace Endpoint
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace Aws
public:
DefaultEndpointProvider(const Aws::Vector<char>& endpointRulesBLOB)
: m_crtRuleEngine(Aws::Crt::ByteCursorFromArray((const uint8_t*) endpointRulesBLOB.data(), endpointRulesBLOB.size()),
Aws::Crt::ByteCursorFromArray((const uint8_t*) AWSPartitions::PartitionsBlob.data(), AWSPartitions::PartitionsBlobSize))
Aws::Crt::ByteCursorFromArray((const uint8_t*) AWSPartitions::GetPartitionsBlob(), AWSPartitions::PartitionsBlobSize))
{
if(!m_crtRuleEngine) {
AWS_LOGSTREAM_FATAL(DEFAULT_ENDPOINT_PROVIDER_TAG, "Invalid CRT Rule Engine state");
Expand Down
79 changes: 78 additions & 1 deletion aws-cpp-sdk-core/source/endpoint/AWSPartitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,83 @@ namespace Aws
{
namespace Endpoint
{
constexpr AWSPartitions::PartitionsBlobT AWSPartitions::PartitionsBlob;
const size_t AWSPartitions::PartitionsBlobStrLen = 1629;
const size_t AWSPartitions::PartitionsBlobSize = 1630;

using PartitionsBlobT = Aws::Array<const char, AWSPartitions::PartitionsBlobSize>;
static constexpr PartitionsBlobT PartitionsBlob = {
'{','"','v','e','r','s','i','o','n','"',':','"','1','.','1','"',',','"','p','a','r','t','i','t','i',
'o','n','s','"',':','[','{','"','i','d','"',':','"','a','w','s','"',',','"','r','e','g','i','o','n',
'R','e','g','e','x','"',':','"','^','(','u','s','|','e','u','|','a','p','|','s','a','|','c','a','|',
'm','e','|','a','f',')','-','\\','\\','w','+','-','\\','\\','d','+','$','"',',','"','r','e','g','i','o',
'n','s','"',':','{','"','a','f','-','s','o','u','t','h','-','1','"',':','{','}',',','"','a','f','-',
'e','a','s','t','-','1','"',':','{','}',',','"','a','p','-','n','o','r','t','h','e','a','s','t','-',
'1','"',':','{','}',',','"','a','p','-','n','o','r','t','h','e','a','s','t','-','2','"',':','{','}',
',','"','a','p','-','n','o','r','t','h','e','a','s','t','-','3','"',':','{','}',',','"','a','p','-',
's','o','u','t','h','-','1','"',':','{','}',',','"','a','p','-','s','o','u','t','h','e','a','s','t',
'-','1','"',':','{','}',',','"','a','p','-','s','o','u','t','h','e','a','s','t','-','2','"',':','{',
'}',',','"','a','p','-','s','o','u','t','h','e','a','s','t','-','3','"',':','{','}',',','"','c','a',
'-','c','e','n','t','r','a','l','-','1','"',':','{','}',',','"','e','u','-','c','e','n','t','r','a',
'l','-','1','"',':','{','}',',','"','e','u','-','n','o','r','t','h','-','1','"',':','{','}',',','"',
'e','u','-','s','o','u','t','h','-','1','"',':','{','}',',','"','e','u','-','w','e','s','t','-','1',
'"',':','{','}',',','"','e','u','-','w','e','s','t','-','2','"',':','{','}',',','"','e','u','-','w',
'e','s','t','-','3','"',':','{','}',',','"','m','e','-','s','o','u','t','h','-','1','"',':','{','}',
',','"','s','a','-','e','a','s','t','-','1','"',':','{','}',',','"','u','s','-','e','a','s','t','-',
'1','"',':','{','}',',','"','u','s','-','e','a','s','t','-','2','"',':','{','}',',','"','u','s','-',
'w','e','s','t','-','1','"',':','{','}',',','"','u','s','-','w','e','s','t','-','2','"',':','{','}',
',','"','a','w','s','-','g','l','o','b','a','l','"',':','{','}','}',',','"','o','u','t','p','u','t',
's','"',':','{','"','n','a','m','e','"',':','"','a','w','s','"',',','"','d','n','s','S','u','f','f',
'i','x','"',':','"','a','m','a','z','o','n','a','w','s','.','c','o','m','"',',','"','d','u','a','l',
'S','t','a','c','k','D','n','s','S','u','f','f','i','x','"',':','"','a','p','i','.','a','w','s','"',
',','"','s','u','p','p','o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u','p',
'p','o','r','t','s','D','u','a','l','S','t','a','c','k','"',':','t','r','u','e','}','}',',','{','"',
'i','d','"',':','"','a','w','s','-','u','s','-','g','o','v','"',',','"','r','e','g','i','o','n','R',
'e','g','e','x','"',':','"','^','u','s','\\','\\','-','g','o','v','\\','\\','-','\\','\\','w','+','\\','\\',
'-','\\','\\','d','+','$','"',',','"','r','e','g','i','o','n','s','"',':','{','"','u','s','-','g','o',
'v','-','w','e','s','t','-','1','"',':','{','}',',','"','u','s','-','g','o','v','-','e','a','s','t',
'-','1','"',':','{','}',',','"','a','w','s','-','u','s','-','g','o','v','-','g','l','o','b','a','l',
'"',':','{','}','}',',','"','o','u','t','p','u','t','s','"',':','{','"','n','a','m','e','"',':','"',
'a','w','s','-','u','s','-','g','o','v','"',',','"','d','n','s','S','u','f','f','i','x','"',':','"',
'a','m','a','z','o','n','a','w','s','.','c','o','m','"',',','"','d','u','a','l','S','t','a','c','k',
'D','n','s','S','u','f','f','i','x','"',':','"','a','p','i','.','a','w','s','"',',','"','s','u','p',
'p','o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u','p','p','o','r','t','s',
'D','u','a','l','S','t','a','c','k','"',':','t','r','u','e','}','}',',','{','"','i','d','"',':','"',
'a','w','s','-','c','n','"',',','"','r','e','g','i','o','n','R','e','g','e','x','"',':','"','^','c',
'n','\\','\\','-','\\','\\','w','+','\\','\\','-','\\','\\','d','+','$','"',',','"','r','e','g','i','o','n',
's','"',':','{','"','c','n','-','n','o','r','t','h','-','1','"',':','{','}',',','"','c','n','-','n',
'o','r','t','h','w','e','s','t','-','1','"',':','{','}',',','"','a','w','s','-','c','n','-','g','l',
'o','b','a','l','"',':','{','}','}',',','"','o','u','t','p','u','t','s','"',':','{','"','n','a','m',
'e','"',':','"','a','w','s','-','c','n','"',',','"','d','n','s','S','u','f','f','i','x','"',':','"',
'a','m','a','z','o','n','a','w','s','.','c','o','m','.','c','n','"',',','"','d','u','a','l','S','t',
'a','c','k','D','n','s','S','u','f','f','i','x','"',':','"','a','p','i','.','a','m','a','z','o','n',
'w','e','b','s','e','r','v','i','c','e','s','.','c','o','m','.','c','n','"',',','"','s','u','p','p',
'o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u','p','p','o','r','t','s','D',
'u','a','l','S','t','a','c','k','"',':','t','r','u','e','}','}',',','{','"','i','d','"',':','"','a',
'w','s','-','i','s','o','"',',','"','r','e','g','i','o','n','R','e','g','e','x','"',':','"','^','u',
's','\\','\\','-','i','s','o','\\','\\','-','\\','\\','w','+','\\','\\','-','\\','\\','d','+','$','"',',','"',
'o','u','t','p','u','t','s','"',':','{','"','n','a','m','e','"',':','"','a','w','s','-','i','s','o',
'"',',','"','d','n','s','S','u','f','f','i','x','"',':','"','c','2','s','.','i','c','.','g','o','v',
'"',',','"','s','u','p','p','o','r','t','s','F','I','P','S','"',':','t','r','u','e',',','"','s','u',
'p','p','o','r','t','s','D','u','a','l','S','t','a','c','k','"',':','f','a','l','s','e',',','"','d',
'u','a','l','S','t','a','c','k','D','n','s','S','u','f','f','i','x','"',':','"','c','2','s','.','i',
'c','.','g','o','v','"','}',',','"','r','e','g','i','o','n','s','"',':','{','"','a','w','s','-','i',
's','o','-','g','l','o','b','a','l','"',':','{','}','}','}',',','{','"','i','d','"',':','"','a','w',
's','-','i','s','o','-','b','"',',','"','r','e','g','i','o','n','R','e','g','e','x','"',':','"','^',
'u','s','\\','\\','-','i','s','o','b','\\','\\','-','\\','\\','w','+','\\','\\','-','\\','\\','d','+','$','"',
',','"','o','u','t','p','u','t','s','"',':','{','"','n','a','m','e','"',':','"','a','w','s','-','i',
's','o','-','b','"',',','"','d','n','s','S','u','f','f','i','x','"',':','"','s','c','2','s','.','s',
'g','o','v','.','g','o','v','"',',','"','s','u','p','p','o','r','t','s','F','I','P','S','"',':','t',
'r','u','e',',','"','s','u','p','p','o','r','t','s','D','u','a','l','S','t','a','c','k','"',':','f',
'a','l','s','e',',','"','d','u','a','l','S','t','a','c','k','D','n','s','S','u','f','f','i','x','"',
':','"','s','c','2','s','.','s','g','o','v','.','g','o','v','"','}',',','"','r','e','g','i','o','n',
's','"',':','{','"','a','w','s','-','i','s','o','-','b','-','g','l','o','b','a','l','"',':','{','}',
'}','}',']','}','\0'
};

const char* AWSPartitions::GetPartitionsBlob()
{
return PartitionsBlob.data();
}

} // namespace Endpoint
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,10 @@ namespace Endpoint
{
public:
#set($PartitionsBlobStrLen = $serviceModel.partitionsBlob.length() - 1)
static constexpr size_t PartitionsBlobStrLen = $PartitionsBlobStrLen;
static constexpr size_t PartitionsBlobSize = $serviceModel.partitionsBlob.length();
using PartitionsBlobT = Aws::Array<const char, PartitionsBlobSize>;
static constexpr PartitionsBlobT PartitionsBlob = {
#set($lineLenth = 0)
#foreach($tmpChar in $serviceModel.partitionsBlob.toCharArray())
#if($tmpChar.equals($nl) || $tmpChar == $nl)
#set($tmpChar = "\n")
#end
#if($tmpChar == "\")
#set($tmpChar = "\\")
#end
#if($tmpChar == "'")
#set($tmpChar = "\'")
#end
#if($tmpChar == $nullChar)
#set($tmpChar = "\0")
#end
#if(25 == $lineLenth)
#set($lineLenth = 0)
static const size_t PartitionsBlobStrLen;
static const size_t PartitionsBlobSize;

#end
#set($lineLenth = $lineLenth + 1)
#if( $foreach.hasNext )
'${tmpChar}',##comment to avoid newline
#else
'${tmpChar}'##comment to avoid newline
#end
#end

};
static const char* GetPartitionsBlob();
};
} // namespace Endpoint
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,44 @@ namespace Aws
{
namespace Endpoint
{
constexpr AWSPartitions::PartitionsBlobT AWSPartitions::PartitionsBlob;
#set($PartitionsBlobStrLen = $serviceModel.partitionsBlob.length() - 1)
const size_t AWSPartitions::PartitionsBlobStrLen = $PartitionsBlobStrLen;
const size_t AWSPartitions::PartitionsBlobSize = $serviceModel.partitionsBlob.length();

using PartitionsBlobT = Aws::Array<const char, AWSPartitions::PartitionsBlobSize>;
static constexpr PartitionsBlobT PartitionsBlob = {
#set($lineLenth = 0)
#foreach($tmpChar in $serviceModel.partitionsBlob.toCharArray())
#if($tmpChar.equals($nl) || $tmpChar == $nl)
#set($tmpChar = "\n")
#end
#if($tmpChar == "\")
#set($tmpChar = "\\")
#end
#if($tmpChar == "'")
#set($tmpChar = "\'")
#end
#if($tmpChar == $nullChar)
#set($tmpChar = "\0")
#end
#if(25 == $lineLenth)
#set($lineLenth = 0)

#end
#set($lineLenth = $lineLenth + 1)
#if( $foreach.hasNext )
'${tmpChar}',##comment to avoid newline
#else
'${tmpChar}'##comment to avoid newline
#end
#end

};

const char* AWSPartitions::GetPartitionsBlob()
{
return PartitionsBlob.data();
}

} // namespace Endpoint
} // namespace Aws