Files
UnrealEngineUWP/Engine/Source/ThirdParty/Windows/PIX/WinPixEventRuntime.Build.cs
David Harvey bc3c4c7db0 Fixing up Address Sanitizer on Microsoft platforms.
<BuildConfiguration>
    <bEnableAddressSanitizer>true</bEnableAddressSanitizer>

#jira UE-112891
#rb dan.phillips
#rnx

[CL 16757980 by David Harvey in ue5-main branch]
2021-06-23 11:35:42 -04:00

32 lines
1.3 KiB
C#

// Copyright Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System.IO;
public class WinPixEventRuntime : ModuleRules
{
public WinPixEventRuntime(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
if (Target.WindowsPlatform.Architecture == WindowsArchitecture.ARM64 || Target.WindowsPlatform.Architecture == WindowsArchitecture.x64)
{
string WinPixDir = Path.Combine(Target.UEThirdPartySourceDirectory, "Windows/PIX");
PublicSystemIncludePaths.Add(Path.Combine( WinPixDir, "include") );
PublicDefinitions.Add("WITH_PIX_EVENT_RUNTIME=1");
PublicDelayLoadDLLs.Add("WinPixEventRuntime.dll");
PublicAdditionalLibraries.Add( Path.Combine( WinPixDir, "Lib/" + Target.WindowsPlatform.Architecture.ToString() + "/WinPixEventRuntime.lib") );
RuntimeDependencies.Add("$(EngineDir)/Binaries/ThirdParty/Windows/WinPixEventRuntime/" + Target.WindowsPlatform.Architecture.ToString() + "/WinPixEventRuntime.dll");
// see pixeventscommon.h - MSVC has no support for __has_feature(address_sanitizer) so need to define this manually
if (Target.WindowsPlatform.Compiler != WindowsCompiler.Clang && Target.WindowsPlatform.bEnableAddressSanitizer)
{
PublicDefinitions.Add("PIX_ENABLE_BLOCK_ARGUMENT_COPY=0");
}
}
}
}