Created
February 16, 2017 15:30
-
-
Save RCL/aac0b17023872d35f1cfc8584cd940fc to your computer and use it in GitHub Desktop.
Use gold during nat compile if possible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Engine/Source/Developer/SourceControl/SourceControl.Build.cs 2017-01-31 04:06:01.000000000 -0500 | |
@@ -14,20 +14,17 @@ | |
"CoreUObject", | |
"InputCore", | |
} | |
); | |
- if (Target.Platform != UnrealTargetPlatform.Linux) | |
- { | |
- PrivateDependencyModuleNames.AddRange( | |
- new string[] { | |
- "Slate", | |
- "SlateCore", | |
- "EditorStyle" | |
- } | |
- ); | |
- } | |
+ PrivateDependencyModuleNames.AddRange( | |
+ new string[] { | |
+ "Slate", | |
+ "SlateCore", | |
+ "EditorStyle" | |
+ } | |
+ ); | |
if (UEBuildConfiguration.bBuildEditor) | |
{ | |
PrivateDependencyModuleNames.AddRange( | |
new string[] { | |
--- Engine/Source/Programs/UnrealBuildTool/Linux/LinuxToolChain.cs 2017-02-10 03:28:09.000000000 -0500 | |
@@ -29,11 +29,13 @@ | |
if (!String.IsNullOrEmpty(ClangPath)) | |
{ | |
break; | |
} | |
} | |
- GCCPath = Which("g++"); | |
+ // gcc is not really supported at this point, uncomment when/if the support is repaired | |
+ //GCCPath = Which("g++"); | |
+ GoldPath = Which("ld.gold"); | |
ArPath = Which("ar"); | |
RanlibPath = Which("ranlib"); | |
StripPath = Which("strip"); | |
// if clang is available, zero out gcc (@todo: support runtime switching?) | |
@@ -568,10 +570,16 @@ | |
string GetLinkArguments(LinkEnvironment LinkEnvironment) | |
{ | |
string Result = ""; | |
+ // use gold if possible | |
+ if (!String.IsNullOrEmpty(GoldPath)) | |
+ { | |
+ Result += " -fuse-ld=gold"; | |
+ } | |
+ | |
// debugging symbols | |
// Applying to all configurations @FIXME: temporary hack for FN to enable callstack in Shipping builds (proper resolution: UEPLAT-205) | |
Result += " -rdynamic"; // needed for backtrace_symbols()... | |
if (LinkEnvironment.bIsBuildingDLL) | |
@@ -677,14 +685,15 @@ | |
// Write output | |
string ConvertedExpression = " " + ConvertedFilePath + "(" + ConvertedLineNumber + "," + ConvertedColumnNumber + "):" + MatchDescription; | |
Console.WriteLine(ConvertedExpression); // To create clickable vs link | |
} | |
- // cache the location of NDK tools | |
+ // cache the location of tools | |
static string BaseLinuxPath; | |
static string ClangPath; | |
static string GCCPath; | |
+ static string GoldPath; | |
static string ArPath; | |
static string RanlibPath; | |
static string StripPath; | |
/// <summary> | |
--- Engine/Source/Runtime/Launch/Launch.Build.cs 2017-02-09 18:41:45.000000000 -0500 | |
@@ -142,10 +142,11 @@ | |
PublicIncludePathModuleNames.Add("ProfilerClient"); | |
PrivateDependencyModuleNames.AddRange( | |
new string[] { | |
"SourceControl", | |
+ "EditorStyle", // A module that uses SourceControl module on Linux will also depend directly on EditorStyle | |
"UnrealEd", | |
"DesktopPlatform" | |
} | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment