Files
UnrealEngineUWP/Engine/Source/Runtime/Core/Core.Build.cs
Mark Satterthwaite 88751c6da8 Rewritten debug symbol handling for OS X to allow creation of dSYM bundles & symbol stripping of executables.
- The MacToolChain will emit dSYMs and strip executables when the UBT configuration enables bGeneratedSYMFile, just like iOS.
- Symbol stripping requires generating dSYMs to prevent creation of non-debuggable builds whose crash reports would be unresolvable.
- To avoid a dependency on the Private framework CoreSymbolication all symbols from that framework are loaded dynamically & can only be used within programs, not the game or the editor, as CoreSymbolication is incompatible with non-ANSI malloc implementations.
- Added an initial platform-agnostic API for querying debug symbol info, including a generic database format that can be queried on otherwise incompatible platforms.
- Added UnrealAtoS that emulates Apple's atos to resolve symbols using the generic database or the platform API (CoreSymbolication on OS X) which on OS X is used by the editor to gather symbol info for CodeView.
- Added DSymExporter which will export Apple debug symbol data from Mach-O binaries, including the payload within a .dSYM bundle, to the generic format so that the crash report server may one day read the data without needing a Mac to symbolicate reports.
- Initial SymbolDebugger & MinidumpDiagnostics support on OS X.
#codereview michael.trepka, Jaroslaw.Surowiec, lee.clark, peter.sauerbrei

[CL 2466299 by Mark Satterthwaite in Main branch]
2015-03-02 10:21:50 -05:00

203 lines
6.8 KiB
C#

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
using System;
using System.IO;
public class Core : ModuleRules
{
public Core(TargetInfo Target)
{
SharedPCHHeaderFile = "Runtime/Core/Public/Core.h";
PublicIncludePaths.AddRange(
new string[] {
"Runtime/Core/Public",
"Runtime/Core/Public/Internationalization",
"Runtime/Core/Public/Async",
"Runtime/Core/Public/Concurrency",
"Runtime/Core/Public/Containers",
"Runtime/Core/Public/Delegates",
"Runtime/Core/Public/GenericPlatform",
"Runtime/Core/Public/HAL",
"Runtime/Core/Public/Logging",
"Runtime/Core/Public/Math",
"Runtime/Core/Public/Misc",
"Runtime/Core/Public/Modules",
"Runtime/Core/Public/Modules/Boilerplate",
"Runtime/Core/Public/ProfilingDebugging",
"Runtime/Core/Public/Serialization",
"Runtime/Core/Public/Serialization/Csv",
"Runtime/Core/Public/Stats",
"Runtime/Core/Public/Templates",
"Runtime/Core/Public/UObject",
}
);
PrivateIncludePaths.AddRange(
new string[] {
"Developer/DerivedDataCache/Public",
"Developer/SynthBenchmark/Public",
"Runtime/Core/Private",
"Runtime/Core/Private/Misc",
"Runtime/Core/Private/Serialization/Json",
"Runtime/Core/Private/Internationalization",
"Runtime/Core/Private/Internationalization/Cultures",
"Runtime/Analytics/Public",
}
);
PrivateIncludePathModuleNames.AddRange(
new string[] {
"TargetPlatform",
"DerivedDataCache",
"InputDevice",
"Analytics"
}
);
if (UEBuildConfiguration.bBuildEditor == true)
{
DynamicallyLoadedModuleNames.Add("SourceCodeAccess");
}
if ((Target.Platform == UnrealTargetPlatform.Win64) ||
(Target.Platform == UnrealTargetPlatform.Win32))
{
PublicIncludePaths.Add("Runtime/Core/Public/Windows");
AddThirdPartyPrivateStaticDependencies(Target,
"zlib");
AddThirdPartyPrivateStaticDependencies(Target,
"IntelTBB",
"XInput"
);
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
PublicIncludePaths.AddRange(new string[] { "Runtime/Core/Public/Apple", "Runtime/Core/Public/Mac" });
AddThirdPartyPrivateStaticDependencies(Target,
"IntelTBB",
"zlib",
"OpenGL",
"PLCrashReporter"
);
PublicFrameworks.AddRange(new string[] { "Cocoa", "Carbon", "IOKit", "Security" });
if (UEBuildConfiguration.bBuildEditor == true)
{
PublicAdditionalLibraries.Add("/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/Current/MultitouchSupport");
}
}
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
PublicIncludePaths.AddRange(new string[] {"Runtime/Core/Public/Apple", "Runtime/Core/Public/IOS"});
AddThirdPartyPrivateStaticDependencies(Target,
"zlib"
);
PublicFrameworks.AddRange(new string[] { "UIKit", "Foundation", "AudioToolbox", "AVFoundation", "GameKit", "StoreKit", "CoreVideo", "CoreMedia", "CoreMotion"});
bool bSupportAdvertising = true;
if (bSupportAdvertising)
{
PublicFrameworks.AddRange(new string[] { "iAD", "CoreGraphics" });
}
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
PublicIncludePaths.Add("Runtime/Core/Public/Android");
AddThirdPartyPrivateStaticDependencies(Target,
"zlib"
);
}
else if ((Target.Platform == UnrealTargetPlatform.Linux))
{
PublicIncludePaths.Add("Runtime/Core/Public/Linux");
AddThirdPartyPrivateStaticDependencies(Target,
"zlib",
"jemalloc",
"elftoolchain",
"SDL2"
);
// Core uses dlopen()
PublicAdditionalLibraries.Add("dl");
// We need FreeType2 and GL for the Splash, but only in the Editor
if (Target.Type == TargetRules.TargetType.Editor)
{
AddThirdPartyPrivateStaticDependencies(Target, "FreeType2");
AddThirdPartyPrivateStaticDependencies(Target, "OpenGL");
}
}
else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture == "-win32")
{
PublicIncludePaths.Add("Runtime/Core/Public/HTML5");
AddThirdPartyPrivateStaticDependencies(Target, "SDL2");
AddThirdPartyPrivateStaticDependencies(Target, "OpenAL");
}
else if (Target.Platform == UnrealTargetPlatform.HTML5 && Target.Architecture != "-win32")
{
AddThirdPartyPrivateStaticDependencies(Target, "SDL2");
PrivateDependencyModuleNames.Add("HTML5JS");
}
if ( UEBuildConfiguration.bCompileICU == true )
{
AddThirdPartyPrivateStaticDependencies(Target, "ICU");
}
Definitions.Add("UE_ENABLE_ICU=" + (UEBuildConfiguration.bCompileICU ? "1" : "0")); // Enable/disable (=1/=0) ICU usage in the codebase. NOTE: This flag is for use while integrating ICU and will be removed afterward.
Definitions.Add("WITH_STEAMWORKS=" + (UEBuildConfiguration.bCompileSteamOSS ? "1" : "0"));
// If we're compiling with the engine, then add Core's engine dependencies
if (UEBuildConfiguration.bCompileAgainstEngine == true)
{
if (!UEBuildConfiguration.bBuildRequiresCookedData)
{
DynamicallyLoadedModuleNames.AddRange(new string[] { "DerivedDataCache" });
}
}
// On Windows platform, VSPerfExternalProfiler.cpp needs access to "VSPerf.h". This header is included with Visual Studio, but it's not in a standard include path.
if( Target.Platform == UnrealTargetPlatform.Win32 || Target.Platform == UnrealTargetPlatform.Win64 )
{
var VisualStudioVersionNumber = "11.0";
var SubFolderName = ( Target.Platform == UnrealTargetPlatform.Win64 ) ? "x64/PerfSDK" : "PerfSDK";
string PerfIncludeDirectory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), String.Format("Microsoft Visual Studio {0}/Team Tools/Performance Tools/{1}", VisualStudioVersionNumber, SubFolderName));
if (File.Exists(Path.Combine(PerfIncludeDirectory, "VSPerf.h")))
{
PrivateIncludePaths.Add(PerfIncludeDirectory);
Definitions.Add("WITH_VS_PERF_PROFILER=1");
}
}
if ((Target.Platform == UnrealTargetPlatform.XboxOne) ||
(Target.Platform == UnrealTargetPlatform.WinRT) ||
(Target.Platform == UnrealTargetPlatform.WinRT_ARM))
{
Definitions.Add("WITH_DIRECTXMATH=1");
}
else if ((Target.Platform == UnrealTargetPlatform.Win64) ||
(Target.Platform == UnrealTargetPlatform.Win32))
{
// To enable this requires Win8 SDK
Definitions.Add("WITH_DIRECTXMATH=0"); // Enable to test on Win64/32.
//PublicDependencyModuleNames.AddRange( // Enable to test on Win64/32.
// new string[] {
// "DirectXMath"
//});
}
else
{
Definitions.Add("WITH_DIRECTXMATH=0");
}
}
}