Merge pull request #7633 from aws-lumberyard-dev/fixWindowsClangBuild

Fix windows clang build
monroegm-disable-blank-issue-2
Chris Burel 4 years ago committed by GitHub
commit 28049f6321
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,7 +78,7 @@ namespace AZ::Dom::Benchmark
if (apply) if (apply)
{ {
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after); auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
for (auto _ : state) for ([[maybe_unused]] auto _ : state)
{ {
auto patchResult = patchInfo.m_forwardPatches.Apply(m_before); auto patchResult = patchInfo.m_forwardPatches.Apply(m_before);
benchmark::DoNotOptimize(patchResult); benchmark::DoNotOptimize(patchResult);
@ -86,7 +86,7 @@ namespace AZ::Dom::Benchmark
} }
else else
{ {
for (auto _ : state) for ([[maybe_unused]] auto _ : state)
{ {
auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after); auto patchInfo = GenerateHierarchicalDeltaPatch(m_before, m_after);
benchmark::DoNotOptimize(patchInfo); benchmark::DoNotOptimize(patchInfo);

@ -104,7 +104,7 @@ namespace AZ::Dom::Benchmark
PathEntry endOfArray; PathEntry endOfArray;
endOfArray.SetEndOfArray(); endOfArray.SetEndOfArray();
for (auto _ : state) for ([[maybe_unused]] auto _ : state)
{ {
benchmark::DoNotOptimize(name == name); benchmark::DoNotOptimize(name == name);
benchmark::DoNotOptimize(name == index); benchmark::DoNotOptimize(name == index);

@ -289,7 +289,7 @@ namespace UnitTest
tag = randomGenerator.GetRandom(); tag = randomGenerator.GetRandom();
} }
for (auto _ : state) for ([[maybe_unused]] auto _ : state)
{ {
// We'll benchmark this two ways: // We'll benchmark this two ways:
// 1. We clear each time, which means each AddSurfaceWeightIfGreater call will search the whole list then add. // 1. We clear each time, which means each AddSurfaceWeightIfGreater call will search the whole list then add.
@ -340,7 +340,7 @@ namespace UnitTest
comparisonTags.emplace_back(tag ^ 0x01); comparisonTags.emplace_back(tag ^ 0x01);
} }
for (auto _ : state) for ([[maybe_unused]] auto _ : state)
{ {
// Test to see if any of our tags match. // Test to see if any of our tags match.
// All of comparison tags should get compared against all of the added tags. // All of comparison tags should get compared against all of the added tags.

@ -20,8 +20,6 @@ ly_append_configurations_options(
-Wall -Wall
-Werror -Werror
-fpie # Position-Independent Executables
################### ###################
# Disabled warnings (please do not disable any others without first consulting sig-build) # Disabled warnings (please do not disable any others without first consulting sig-build)
################### ###################

@ -62,3 +62,8 @@ if(CMAKE_GENERATOR MATCHES "Ninja")
ly_set(CMAKE_JOB_POOL_LINK link_job_pool) ly_set(CMAKE_JOB_POOL_LINK link_job_pool)
endif() endif()
endif() endif()
set(CMAKE_POSITION_INDEPENDENT_CODE True)
include(CheckPIESupported)
check_pie_supported()

@ -16,10 +16,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
__linux__ __linux__
LINUX64 LINUX64
COMPILATION COMPILATION
-fPIC
-msse4.1 -msse4.1
LINK_NON_STATIC LINK_NON_STATIC
-Wl,-undefined,error -Wl,--no-undefined
-fpie -fpie
-Wl,-z,relro,-z,now -Wl,-z,relro,-z,now
-Wl,-z,noexecstack -Wl,-z,noexecstack
@ -47,7 +46,6 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
__linux__ __linux__
LINUX64 LINUX64
COMPILATION COMPILATION
-fPIC
-msse4.1 -msse4.1
LINK_NON_STATIC LINK_NON_STATIC
${LY_GCC_GCOV_LFLAGS} ${LY_GCC_GCOV_LFLAGS}

Loading…
Cancel
Save