Skip to content

Instantly share code, notes, and snippets.

@RCL
RCL / gold.diff
Created February 16, 2017 15:30
Use gold during nat compile if possible
--- 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(
@RCL
RCL / add to your makefile or CMAKE_TOOLCHAIN_FILE
Last active April 30, 2019 06:10
Options to compile against UE4's libc++
Compile:
-nostdinc++ -I $UE_THIRD_PARTY_DIR/Linux/LibCxx/include/ -I $UE_THIRD_PARTY_DIR/Linux/LibCxx/include/c++/v1
Link:
-nodefaultlibs -L $UE_THIRD_PARTY_DIR/Linux/LibCxx/lib/Linux/x86_64-unknown-linux-gnu/ $UE_THIRD_PARTY_DIR/Linux/LibCxx/lib/Linux/x86_64-unknown-linux-gnu/libc++.a $UE_THIRD_PARTY_DIR/Linux/LibCxx/lib/Linux/x86_64-unknown-linux-gnu/libc++abi.a -lm -lc -lgcc_s -lgcc
@RCL
RCL / LinuxToolChain.cs
Created October 6, 2016 05:31
Fix FixDeps
PostLinkAction.CommandArguments += ShellBinary + ExecuteSwitch + " \"" + FixDepsScript.AbsolutePath + "\" && ";
- string Touch = bUseCmdExe ? "echo \"\" >> \"{0}\" && copy /b \"{0}\" +,," : "touch \"{0}\"";
+ // output file should not be empty or it will be rebuilt next time
+ string Touch = bUseCmdExe ? "echo \"Dummy\" >> \"{0}\" && copy /b \"{0}\" +,," : "echo \"Dummy\" >> \"{0}\"";
PostLinkAction.CommandArguments += String.Format(Touch, OutputFile.AbsolutePath);
PostLinkAction.CommandArguments += bUseCmdExe ? "\"" : "'";
@RCL
RCL / OpenGL.Build.cs
Created September 2, 2016 14:52
Proposed fix for drivers that need libstdc++ / STL symbols
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
using UnrealBuildTool;
public class OpenGL : ModuleRules
{
public OpenGL(TargetInfo Target)
{
Type = ModuleType.External;
#! /usr/bin/env python
# See http://preshing.com/20130115/view-your-filesystem-history-using-python
import optparse
import os
import fnmatch
import time
# Parse options
parser = optparse.OptionParser(usage='Usage: %prog [options] path [path2 ...]')
parser.add_option('-g', action='store', type='long', dest='secs', default=10,