Experimental UnrealBuildTool makefile support
UnrealBuildTool 'Makefiles' allow for very fast iterative builds.
- New BuildConfiguration.xml setting added: "bUseExperimentalFastBuildIteration" (disabled by default)
- Turning this on causes Unreal Build Tool to emit 'UBT Makefiles' for targets when they're built the first time.
- Subsequent builds will load these Makefiles and begin outdatedness checking and build invocation very quickly.
- The caveat is that if source files are added or removed to the project, UBT will need to gather information about those in order for your build to complete successfully.
- Currently, you must run the project file generator after adding/removing source files to tell UBT to re-gather this information.
- Events that can invalidate the 'UBT Makefile':
- Adding/removing .cpp files
- Adding/removing .h files with UObjects
- Adding new UObject types to a file that didn't previously have any
- Changing global build settings (most settings in this file qualify.)
- Changed code that affects how Unreal Header Tool works
- You can force regeneration of the 'UBT Makefile' by passing the '-Gather' argument, or simply regenerating project files
- New command-line parameters added:
- "-Gather": Tells UBT to always perform the gather step (slower but will catch project structural changes)
- "-NoGather": Disables the gather step, unless UBT detects that it must be done. This is the default when bUseExperimentalFastBuildIteration is enabled
- "-GatherOnly": Runs the gather step and saves a UBTMakefile, but doesn't build anything
- "-Assemble": Tells UBT to also assemble build products. This always defaults to enabled
- "-NoAssemble": Tells UBT to skip the assemble step, whether we gathered build products or not
- "-AssembleOnly": Tells UBT to only assemble build products and not to gather, unless UBT determines it must
Other changes:
- UBT now keeps track of which targets it was building in an intermediate file, to help it invalidate cached includes in subsequent runs when the targets are different
- C++ includes are now stored in a class separate from the C++ compile enviroment (for easier serialization)
- The method that UBT uses to find the CoreUObject module timestamp was rewritten
- Various '@todo ubtmake' comments added to tag possible remaining Makefile tasks
- The 'FileItem' class had some member variable comments and code cleaned up, while making it serializable
- Cleaned up the comments and member variables in the "Action" class, while making it serializable
- Some UBT classes are now "serializable". This is because we need to store the data in UBTMakefiles.
- Removed support for Actions to tinker with Stdout and Stderror (was not used for anything)
- Moved PrecompileHeaderEnvironment class to the UEBuildModule.cs source file
- Plugin intermediate include directories are now selected on demand rather than cached early
- Toolchain code for gathering prerequisite headers is now shared in a single function (AddPrerequisiteSourceFile)
- Removed Action.StatusDetailedDescription, was not used for anything
- Removed UEBuildConfiguration.bExcludePlugins, was not used for anything
- Removed ECompilationResult.FailedDueToHeaderChange, was not used for anything
[CL 2254472 by Mike Fricker in Main branch]
2014-08-13 08:17:43 -04:00
|
|
|
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Xml;
|
|
|
|
|
|
|
|
|
|
namespace UnrealBuildTool
|
|
|
|
|
{
|
|
|
|
|
class AndroidPlatform : UEBuildPlatform
|
|
|
|
|
{
|
2014-04-23 18:00:27 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// Android settings.
|
|
|
|
|
/// </summary>
|
2014-06-06 07:43:02 -04:00
|
|
|
[XmlConfig]
|
2014-04-23 18:00:27 -04:00
|
|
|
public static string AndroidNdkApiTarget = "latest";
|
2014-06-06 07:43:02 -04:00
|
|
|
[XmlConfig]
|
2014-04-23 18:00:27 -04:00
|
|
|
public static string AndroidSdkApiTarget = "latest";
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
// The current architecture - affects everything about how UBT operates on Android
|
|
|
|
|
public override string GetActiveArchitecture()
|
|
|
|
|
{
|
2014-08-26 09:56:29 -04:00
|
|
|
// internal architectures are handled inside the toolchain to be able to build all at once, so we no longer need an architecture here
|
|
|
|
|
return base.GetActiveArchitecture();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-09-11 16:25:06 -04:00
|
|
|
public override bool CanUseXGE()
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-18 14:21:02 -04:00
|
|
|
protected override bool PlatformSupportsAutoSDKs()
|
2014-06-18 10:26:14 -04:00
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string GetSDKTargetPlatformName()
|
|
|
|
|
{
|
|
|
|
|
return "Android";
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-18 14:21:02 -04:00
|
|
|
protected override string GetRequiredSDKString()
|
2014-06-18 10:26:14 -04:00
|
|
|
{
|
|
|
|
|
return "-19";
|
|
|
|
|
}
|
|
|
|
|
|
2014-07-18 14:21:02 -04:00
|
|
|
protected override String GetRequiredScriptVersionString()
|
2014-06-18 10:26:14 -04:00
|
|
|
{
|
2014-07-25 21:56:32 -04:00
|
|
|
return "3.0";
|
2014-06-18 10:26:14 -04:00
|
|
|
}
|
|
|
|
|
|
2014-07-23 15:41:23 -04:00
|
|
|
// prefer auto sdk on android as correct 'manual' sdk detection isn't great at the moment.
|
|
|
|
|
protected override bool PreferAutoSDK()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-19 11:22:53 -04:00
|
|
|
/// <summary>
|
|
|
|
|
/// checks if the sdk is installed or has been synced
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private bool HasAnySDK()
|
|
|
|
|
{
|
|
|
|
|
string NDKPath = Environment.GetEnvironmentVariable("NDKROOT");
|
|
|
|
|
|
|
|
|
|
// we don't have an NDKROOT specified
|
|
|
|
|
if (String.IsNullOrEmpty(NDKPath))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
NDKPath = NDKPath.Replace("\"", "");
|
|
|
|
|
|
|
|
|
|
// can't find llvm-3.3 or llvm-3.1 in the toolchains
|
|
|
|
|
if (!Directory.Exists(Path.Combine(NDKPath, @"toolchains\llvm-3.3")) && !Directory.Exists(Path.Combine(NDKPath, @"toolchains\llvm-3.1")))
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2014-07-18 14:21:02 -04:00
|
|
|
protected override SDKStatus HasRequiredManualSDKInternal()
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-07-18 14:21:02 -04:00
|
|
|
// if any autosdk setup has been done then the local process environment is suspect
|
|
|
|
|
if (HasSetupAutoSDK())
|
2014-06-18 10:26:14 -04:00
|
|
|
{
|
2014-07-18 14:21:02 -04:00
|
|
|
return SDKStatus.Invalid;
|
2014-06-18 10:26:14 -04:00
|
|
|
}
|
2014-07-18 14:21:02 -04:00
|
|
|
|
|
|
|
|
if (HasAnySDK())
|
|
|
|
|
{
|
|
|
|
|
return SDKStatus.Valid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return SDKStatus.Invalid;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-07-18 14:21:02 -04:00
|
|
|
protected override void RegisterBuildPlatformInternal()
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-04-29 21:56:53 -04:00
|
|
|
if ((ProjectFileGenerator.bGenerateProjectFiles == true) || (HasRequiredSDKsInstalled() == SDKStatus.Valid))
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
bool bRegisterBuildPlatform = true;
|
|
|
|
|
|
|
|
|
|
string EngineSourcePath = Path.Combine(ProjectFileGenerator.EngineRelativePath, "Source");
|
|
|
|
|
string AndroidTargetPlatformFile = Path.Combine(EngineSourcePath, "Developer", "Android", "AndroidTargetPlatform", "AndroidTargetPlatform.Build.cs");
|
|
|
|
|
|
|
|
|
|
if (File.Exists(AndroidTargetPlatformFile) == false)
|
|
|
|
|
{
|
|
|
|
|
bRegisterBuildPlatform = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bRegisterBuildPlatform == true)
|
|
|
|
|
{
|
|
|
|
|
// Register this build platform
|
|
|
|
|
Log.TraceVerbose(" Registering for {0}", UnrealTargetPlatform.Android.ToString());
|
|
|
|
|
UEBuildPlatform.RegisterBuildPlatform(UnrealTargetPlatform.Android, this);
|
|
|
|
|
UEBuildPlatform.RegisterPlatformWithGroup(UnrealTargetPlatform.Android, UnrealPlatformGroup.Android);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override CPPTargetPlatform GetCPPTargetPlatform(UnrealTargetPlatform InUnrealTargetPlatform)
|
|
|
|
|
{
|
|
|
|
|
switch (InUnrealTargetPlatform)
|
|
|
|
|
{
|
|
|
|
|
case UnrealTargetPlatform.Android:
|
|
|
|
|
return CPPTargetPlatform.Android;
|
|
|
|
|
}
|
|
|
|
|
throw new BuildException("AndroidPlatform::GetCPPTargetPlatform: Invalid request for {0}", InUnrealTargetPlatform.ToString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string GetBinaryExtension(UEBuildBinaryType InBinaryType)
|
|
|
|
|
{
|
|
|
|
|
switch (InBinaryType)
|
|
|
|
|
{
|
|
|
|
|
case UEBuildBinaryType.DynamicLinkLibrary:
|
|
|
|
|
return ".so";
|
|
|
|
|
case UEBuildBinaryType.Executable:
|
|
|
|
|
return ".so";
|
|
|
|
|
case UEBuildBinaryType.StaticLibrary:
|
|
|
|
|
return ".a";
|
2014-06-05 12:11:58 -04:00
|
|
|
case UEBuildBinaryType.Object:
|
|
|
|
|
return ".o";
|
|
|
|
|
case UEBuildBinaryType.PrecompiledHeader:
|
|
|
|
|
return ".gch";
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
return base.GetBinaryExtension(InBinaryType);
|
|
|
|
|
}
|
|
|
|
|
|
2014-08-26 09:56:29 -04:00
|
|
|
public override bool ShouldUsePCHFiles(CPPTargetPlatform Platform, CPPTargetConfiguration Configuration)
|
|
|
|
|
{
|
2014-09-02 17:48:19 -04:00
|
|
|
return true;
|
2014-08-26 09:56:29 -04:00
|
|
|
}
|
|
|
|
|
|
2014-06-05 12:11:58 -04:00
|
|
|
public override string GetDebugInfoExtension(UEBuildBinaryType InBinaryType)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void ResetBuildConfiguration(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
|
|
|
|
|
{
|
|
|
|
|
ValidateUEBuildConfiguration();
|
|
|
|
|
//BuildConfiguration.bDeployAfterCompile = true;
|
2014-08-11 17:27:11 -04:00
|
|
|
|
|
|
|
|
UEBuildConfiguration.bCompileICU = true;
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void ValidateUEBuildConfiguration()
|
|
|
|
|
{
|
|
|
|
|
BuildConfiguration.bUseUnityBuild = true;
|
|
|
|
|
|
|
|
|
|
UEBuildConfiguration.bCompileLeanAndMeanUE = true;
|
|
|
|
|
UEBuildConfiguration.bCompilePhysX = true;
|
|
|
|
|
UEBuildConfiguration.bCompileAPEX = false;
|
2014-09-09 16:30:29 -04:00
|
|
|
UEBuildConfiguration.bRuntimePhysicsCooking = false;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
UEBuildConfiguration.bBuildEditor = false;
|
|
|
|
|
UEBuildConfiguration.bBuildDeveloperTools = false;
|
|
|
|
|
UEBuildConfiguration.bCompileSimplygon = false;
|
|
|
|
|
|
|
|
|
|
UEBuildConfiguration.bCompileRecast = true;
|
|
|
|
|
|
|
|
|
|
// Don't stop compilation at first error...
|
|
|
|
|
BuildConfiguration.bStopXGECompilationAfterErrors = true;
|
|
|
|
|
|
|
|
|
|
BuildConfiguration.bUseSharedPCHs = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool ShouldCompileMonolithicBinary(UnrealTargetPlatform InPlatform)
|
|
|
|
|
{
|
|
|
|
|
// This platform currently always compiles monolithic
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool ShouldUsePDBFiles(CPPTargetPlatform Platform, CPPTargetConfiguration Configuration, bool bCreateDebugInfo)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool ShouldNotBuildEditor(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool BuildRequiresCookedData(UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool RequiresDeployPrepAfterCompile()
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void GetExtraModules(TargetInfo Target, UEBuildTarget BuildTarget, ref List<string> PlatformExtraModules)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void ModifyNewlyLoadedModule(UEBuildModule InModule, TargetInfo Target)
|
|
|
|
|
{
|
|
|
|
|
if ((Target.Platform == UnrealTargetPlatform.Win32) || (Target.Platform == UnrealTargetPlatform.Win64))
|
|
|
|
|
{
|
|
|
|
|
bool bBuildShaderFormats = UEBuildConfiguration.bForceBuildShaderFormats;
|
|
|
|
|
if (!UEBuildConfiguration.bBuildRequiresCookedData)
|
|
|
|
|
{
|
|
|
|
|
if (InModule.ToString() == "Engine")
|
|
|
|
|
{
|
|
|
|
|
if (UEBuildConfiguration.bBuildDeveloperTools)
|
|
|
|
|
{
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("AndroidTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_PVRTCTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ATCTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_DXTTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ETC1TargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ETC2TargetPlatform");
|
2014-09-18 17:49:40 -04:00
|
|
|
// InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_GL4TargetPlatform");
|
2014-09-30 11:38:37 -04:00
|
|
|
// @todo es31: Put this back in for ES31 support
|
|
|
|
|
// ES31 code is in, but it's not fully supported in UE4 4.5, so for now we need to disable the targetplatform as it will confuse people greatly
|
|
|
|
|
// InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ES31TargetPlatform");
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (InModule.ToString() == "UnrealEd")
|
|
|
|
|
{
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("AndroidPlatformEditor");
|
|
|
|
|
}
|
|
|
|
|
else if (InModule.ToString() == "TargetPlatform")
|
|
|
|
|
{
|
|
|
|
|
bBuildShaderFormats = true;
|
|
|
|
|
InModule.AddDynamicallyLoadedModule("TextureFormatPVR");
|
|
|
|
|
InModule.AddDynamicallyLoadedModule("TextureFormatDXT");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("TextureFormatAndroid"); // ATITC, ETC1 and ETC2
|
|
|
|
|
if (UEBuildConfiguration.bBuildDeveloperTools)
|
|
|
|
|
{
|
|
|
|
|
//InModule.AddDynamicallyLoadedModule("AudioFormatADPCM"); //@todo android: android audio
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// allow standalone tools to use targetplatform modules, without needing Engine
|
|
|
|
|
if (UEBuildConfiguration.bForceBuildTargetPlatforms)
|
|
|
|
|
{
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("AndroidTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_PVRTCTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ATCTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_DXTTargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ETC1TargetPlatform");
|
|
|
|
|
InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ETC2TargetPlatform");
|
2014-09-18 17:49:40 -04:00
|
|
|
// InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_GL4TargetPlatform");
|
2014-09-30 11:38:37 -04:00
|
|
|
// @todo es31: Put this back in for ES31 support
|
|
|
|
|
// ES31 code is in, but it's not fully supported in UE4 4.5, so for now we need to disable the targetplatform as it will confuse people greatly
|
|
|
|
|
// InModule.AddPlatformSpecificDynamicallyLoadedModule("Android_ES31TargetPlatform");
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (bBuildShaderFormats)
|
|
|
|
|
{
|
|
|
|
|
//InModule.AddDynamicallyLoadedModule("ShaderFormatAndroid"); //@todo android: ShaderFormatAndroid
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void SetUpEnvironment(UEBuildTarget InBuildTarget)
|
|
|
|
|
{
|
|
|
|
|
// we want gcc toolchain 4.8, but fall back to 4.6 for now if it doesn't exist
|
|
|
|
|
string NDKPath = Environment.GetEnvironmentVariable("NDKROOT");
|
|
|
|
|
NDKPath = NDKPath.Replace("\"", "");
|
|
|
|
|
|
|
|
|
|
string GccVersion = "4.8";
|
|
|
|
|
if (!Directory.Exists(Path.Combine(NDKPath, @"sources\cxx-stl\gnu-libstdc++\4.8")))
|
|
|
|
|
{
|
|
|
|
|
GccVersion = "4.6";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_DESKTOP=0");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_64BITS=0");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_CAN_SUPPORT_EDITORONLY_DATA=0");
|
|
|
|
|
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_OGGVORBIS=1");
|
|
|
|
|
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("UNICODE");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("_UNICODE");
|
|
|
|
|
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("PLATFORM_ANDROID=1");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("ANDROID=1");
|
|
|
|
|
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_DATABASE_SUPPORT=0");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("WITH_EDITOR=0");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("USE_NULL_RHI=0");
|
2014-05-22 09:13:12 -04:00
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.Definitions.Add("REQUIRES_ALIGNED_INT_ACCESS");
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-08-26 09:56:29 -04:00
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/include");
|
|
|
|
|
|
|
|
|
|
// the toolchain will actually filter these out
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/armeabi-v7a/include");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/x86/include");
|
2014-08-11 17:27:11 -04:00
|
|
|
|
2014-08-26 09:56:29 -04:00
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/armeabi-v7a");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add("$(NDKROOT)/sources/cxx-stl/gnu-libstdc++/" + GccVersion + "/libs/x86");
|
2014-03-14 14:13:41 -04:00
|
|
|
|
Experimental UnrealBuildTool makefile support
UnrealBuildTool 'Makefiles' allow for very fast iterative builds.
- New BuildConfiguration.xml setting added: "bUseExperimentalFastBuildIteration" (disabled by default)
- Turning this on causes Unreal Build Tool to emit 'UBT Makefiles' for targets when they're built the first time.
- Subsequent builds will load these Makefiles and begin outdatedness checking and build invocation very quickly.
- The caveat is that if source files are added or removed to the project, UBT will need to gather information about those in order for your build to complete successfully.
- Currently, you must run the project file generator after adding/removing source files to tell UBT to re-gather this information.
- Events that can invalidate the 'UBT Makefile':
- Adding/removing .cpp files
- Adding/removing .h files with UObjects
- Adding new UObject types to a file that didn't previously have any
- Changing global build settings (most settings in this file qualify.)
- Changed code that affects how Unreal Header Tool works
- You can force regeneration of the 'UBT Makefile' by passing the '-Gather' argument, or simply regenerating project files
- New command-line parameters added:
- "-Gather": Tells UBT to always perform the gather step (slower but will catch project structural changes)
- "-NoGather": Disables the gather step, unless UBT detects that it must be done. This is the default when bUseExperimentalFastBuildIteration is enabled
- "-GatherOnly": Runs the gather step and saves a UBTMakefile, but doesn't build anything
- "-Assemble": Tells UBT to also assemble build products. This always defaults to enabled
- "-NoAssemble": Tells UBT to skip the assemble step, whether we gathered build products or not
- "-AssembleOnly": Tells UBT to only assemble build products and not to gather, unless UBT determines it must
Other changes:
- UBT now keeps track of which targets it was building in an intermediate file, to help it invalidate cached includes in subsequent runs when the targets are different
- C++ includes are now stored in a class separate from the C++ compile enviroment (for easier serialization)
- The method that UBT uses to find the CoreUObject module timestamp was rewritten
- Various '@todo ubtmake' comments added to tag possible remaining Makefile tasks
- The 'FileItem' class had some member variable comments and code cleaned up, while making it serializable
- Cleaned up the comments and member variables in the "Action" class, while making it serializable
- Some UBT classes are now "serializable". This is because we need to store the data in UBTMakefiles.
- Removed support for Actions to tinker with Stdout and Stderror (was not used for anything)
- Moved PrecompileHeaderEnvironment class to the UEBuildModule.cs source file
- Plugin intermediate include directories are now selected on demand rather than cached early
- Toolchain code for gathering prerequisite headers is now shared in a single function (AddPrerequisiteSourceFile)
- Removed Action.StatusDetailedDescription, was not used for anything
- Removed UEBuildConfiguration.bExcludePlugins, was not used for anything
- Removed ECompilationResult.FailedDueToHeaderChange, was not used for anything
[CL 2254472 by Mike Fricker in Main branch]
2014-08-13 08:17:43 -04:00
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/android/native_app_glue");
|
|
|
|
|
InBuildTarget.GlobalCompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths.Add("$(NDKROOT)/sources/android/cpufeatures");
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-06-12 22:11:52 -04:00
|
|
|
// Add path to statically compiled version of cxa_demangle
|
2014-08-26 09:56:29 -04:00
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "Android/cxa_demangle/armeabi-v7a");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "Android/cxa_demangle/x86");
|
2014-06-12 22:11:52 -04:00
|
|
|
|
2014-09-18 17:49:40 -04:00
|
|
|
//@TODO: Tegra Gfx Debugger
|
|
|
|
|
// InBuildTarget.GlobalLinkEnvironment.Config.LibraryPaths.Add(UEBuildConfiguration.UEThirdPartySourceDirectory + "NVIDIA/TegraGfxDebugger");
|
|
|
|
|
// InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("Tegra_gfx_debugger");
|
|
|
|
|
|
2014-08-11 17:27:11 -04:00
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("gnustl_shared");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("gcc");
|
2014-03-14 14:13:41 -04:00
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("z");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("c");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("m");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("log");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("dl");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("GLESv2");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("EGL");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("OpenSLES");
|
|
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("android");
|
2014-06-12 22:11:52 -04:00
|
|
|
InBuildTarget.GlobalLinkEnvironment.Config.AdditionalLibraries.Add("cxa_demangle");
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
UEBuildConfiguration.bCompileSimplygon = false;
|
|
|
|
|
BuildConfiguration.bDeployAfterCompile = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override bool ShouldCreateDebugInfo(UnrealTargetPlatform Platform, UnrealTargetConfiguration Configuration)
|
|
|
|
|
{
|
|
|
|
|
switch (Configuration)
|
|
|
|
|
{
|
|
|
|
|
case UnrealTargetConfiguration.Development:
|
|
|
|
|
case UnrealTargetConfiguration.Shipping:
|
|
|
|
|
case UnrealTargetConfiguration.Test:
|
|
|
|
|
case UnrealTargetConfiguration.Debug:
|
|
|
|
|
default:
|
|
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2014-09-02 14:26:49 -04:00
|
|
|
public override string[] FinalizeBinaryPaths(string BinaryName)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-08-26 16:05:32 -04:00
|
|
|
string[] Architectures = AndroidToolChain.GetAllArchitectures();
|
2014-09-18 17:49:40 -04:00
|
|
|
string[] GPUArchitectures = AndroidToolChain.GetAllGPUArchitectures();
|
2014-08-26 16:05:32 -04:00
|
|
|
|
2014-09-02 14:26:49 -04:00
|
|
|
// make multiple output binaries
|
|
|
|
|
List<string> AllBinaries = new List<string>();
|
2014-08-26 16:05:32 -04:00
|
|
|
foreach (string Architecture in Architectures)
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
2014-09-18 17:49:40 -04:00
|
|
|
foreach (string GPUArchitecture in GPUArchitectures)
|
|
|
|
|
{
|
|
|
|
|
AllBinaries.Add(AndroidToolChain.InlineArchName(BinaryName, Architecture, GPUArchitecture));
|
|
|
|
|
}
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
|
2014-09-02 14:26:49 -04:00
|
|
|
return AllBinaries.ToArray();
|
2014-03-14 14:13:41 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|