Fixes for compile failures with Clang on Windows (#532)

* Fix compile errors when building with Clang.

* Fix for clang-based unity builds
This commit is contained in:
Chris Burel
2021-05-03 22:46:28 -07:00
committed by GitHub
parent edf8ab4822
commit 31885753cb
14 changed files with 64 additions and 10 deletions
@@ -816,7 +816,7 @@ namespace AZ
template<size_t Index>
static void ReflectUnpackMethodFold(BehaviorContext::ClassBuilder<ContainerType>& builder)
{
AZStd::string methodName = AZStd::string::format("Get%ld", Index);
const AZStd::string methodName = AZStd::string::format("Get%zu", Index);
builder->Method(methodName.data(), [](ContainerType& value) { return AZStd::get<Index>(value); })
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
->Attribute(AZ::ScriptCanvasAttributes::TupleGetFunctionIndex, Index)
@@ -137,7 +137,7 @@ namespace AzFramework::ProjectManager
}
AZ::IO::FixedMaxPath pythonPath = engineRootPath / "python";
pythonPath /= AZ_TRAIT_AZFRAMEWORK_PYTHON_SHELL;
auto cmdPath = AZ::IO::FixedMaxPathString::format("%s %s%s --executable_path=%s --parent_pid=%" PRId64, pythonPath.Native().c_str(),
auto cmdPath = AZ::IO::FixedMaxPathString::format("%s %s%s --executable_path=%s --parent_pid=%" PRIu32, pythonPath.Native().c_str(),
debugOption.c_str(), (projectManagerPath / projectsScript).c_str(), executablePath.c_str(), AZ::Platform::GetCurrentProcessId());
AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo;
@@ -26,7 +26,7 @@ class CPerforceSourceControl
public:
// constructor
CPerforceSourceControl() = default;
~CPerforceSourceControl() = default;
virtual ~CPerforceSourceControl() = default;
void Init();
@@ -117,7 +117,7 @@ namespace AWSCore
result.m_content.append(AZStd::string::format(Detail::FOOTER_FMT, m_boundary.c_str()));
// Populate the metadata
result.m_contentLength = AZStd::string::format("%lu", result.m_content.length());
result.m_contentLength = AZStd::string::format("%zu", result.m_content.length());
result.m_contentType = AZStd::string::format("multipart/form-data; boundary=%s", m_boundary.c_str());
return result;
+2
View File
@@ -30,6 +30,8 @@ namespace UnitTest
void ShutdownInternal() override;
};
class BufferPool;
class Buffer
: public AZ::RHI::Buffer
{
-1
View File
@@ -21,7 +21,6 @@ namespace UnitTest
class Query
: public AZ::RHI::Query
{
friend class QueryPool;
public:
AZ_CLASS_ALLOCATOR(Query, AZ::SystemAllocator, 0);
@@ -32,7 +32,7 @@ namespace AZ
AZ_Assert(commandList && commandList->IsRecording() == false, "Command list not valid.");
}
}
#endif()
#endif
return AZStd::move(m_workRequest);
}
+2
View File
@@ -36,6 +36,7 @@ ly_add_target(
metastream_shared_files.cmake
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
PLATFORM_INCLUDE_FILES
${pal_source_dir}/metastream_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
${common_source_dir}/${PAL_TRAIT_COMPILER_ID}/metastream_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake
INCLUDE_DIRECTORIES
PRIVATE
@@ -62,6 +63,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
metastream_shared_files.cmake
${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
PLATFORM_INCLUDE_FILES
${pal_source_dir}/metastream_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
${common_source_dir}/${PAL_TRAIT_COMPILER_ID}/metastream_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake
INCLUDE_DIRECTORIES
PRIVATE
@@ -0,0 +1,10 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
@@ -11,7 +11,3 @@
# CivetHttpServer.cpp uses a try catch block
set(LY_COMPILE_OPTIONS PRIVATE /EHsc)
set(LY_BUILD_DEPENDENCIES
PRIVATE
3rdParty::civetweb
)
@@ -0,0 +1,10 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
@@ -0,0 +1,10 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
@@ -0,0 +1,15 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(LY_BUILD_DEPENDENCIES
PRIVATE
3rdParty::civetweb
)
@@ -0,0 +1,10 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#