Files
UnrealEngineUWP/Engine/Source/Programs/UnrealBuildTool/Linux/LinuxToolChain.cs
Andrew Grant a534ff9466 Copying //UE4/Orion-Staging to //UE4/Main (Source: //Orion/Dev-General @ 3106465)
#lockdown Nick.Penwarden

Change 3110660 on 2016/9/1 by Andrew.Grant

Moved performance/quality warnings out of DrawStatsHUD into new function and now display them in everything other than shipping builds (unless disabled, or screenshot/movie dumping is in progress.
HLOD warning is  updated every 20 secs to deal with streaing levels.
Moved debug warnings into a separate Draw function (still disabled in test, but would like to make this an option in Orion soon).

#rb Michael.Noland
#tests verified we see our unbuilt HLOD warning in v31 :(

Change 3106649 on 2016/08/30 by Cody.Haskell

	#Orion

	- Input Axis Work

	#rb DanH
	#tests PIE

Change 3106299 on 2016/08/30 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 31.2 @ CL 3105865

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3105969 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3106213 on 2016/08/30 by Ben.Marsh

	BuildGraph: Include UAT, UBT, and UHT binaries in precompiled binaries zip file.

	#rb none
	#tests preflight

Change 3105994 on 2016/08/30 by Martin.Wilson

	Stop recompression happening when additive frame index is changed "interactively" (recompression will occur at end of interactive input)

	#jira UE-35289
	#rb Thomas.Sarkanen
	#tests Tested UI in editor

Change 3105331 on 2016/08/29 by Uriel.Doyon

	Allowed texture to ignore streaming MipBias with UTexture2D::bIgnoreStreamingMipBias
	Used this new flag when assigning texture to UImage::SetBrushFromTexture to prevent having low quality UI in low texture budget.
	#rb marcus.wassmer
	#tests launched editor and played game
	#jira OR-25814

Change 3105143 on 2016/08/29 by Josh.Markiewicz

	#UE4 - added assert when histogram input parameters don't match
	#rb none
	#tests launched/ran/won game golden path
	#codereview dmitry.rekman, michael.noland, bart.bressler

Change 3104976 on 2016/08/29 by Jon.Lietz

	pickup refector

	- fixed a big that would allow mixed replication to call a gameplay cue's added twice.
	- All pickups now use the pick up manager, consolidated all pick up code into the manager.
	- added to the XP set so we can define the CXP bounty for targets.

	#RB Dave.Ratti
	#tests Bot match, test maps, spawning coins and pickups.

Change 3103480 on 2016/08/26 by Josh.Markiewicz

	#UE4 - added GetSessionIdStr to FOnlineSessionSearchResult and FOnlineSession
	#rb none
	#tests golden path matchmaking
	#codereview paul.moore, eric.newman

Change 3103410 on 2016/08/26 by Max.Chen

	Movie Capture: Fix commandline burnin option.

	#rb none
	#tests Render movie with commandline -UseBurnIn=yes option.

Change 3102134 on 2016/08/25 by Brian.Karis

	Fix for HDR output exposure. Added 1000nit output option.

	#rb marcus
	#tests agora

Change 3101276 on 2016/08/25 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_31 - Merging  CL 3100347 (head revision of 2 files :o )

	#RB:none
	#Tests:none

	[CodeReviewed]: matt.schembari, max.preussner

	#R@BOMERGE-SOURCE: CL 3101273 in //Orion/Release-31/... via CL 3101274
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3101267 on 2016/08/25 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_DUI - Integrating Media changes from 4.13 (head revision)

	#RB:none
	#Tests:none

	/Engine/Plugins/Media
	/Engine/Source/Runtime/Media
	/Engine/Source/Runtime/MediaAssets

	[CodeReviewed] matt.schembari, max.preussner

	#R@BOMERGE-SOURCE: CL 3099267 in //Orion/Dev-UI/... via CL 3101266
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3100378 on 2016/08/24 by John.Pollard

	Fix a crash that can occur when scrubbing in replays

	#codereview David.Ratti
	#tests Replays
	#rb DavidR

	This is the output:
	[2016.08.24-21.35.05:973][603]LogAbilitySystem:Warning: OnRep_ReplicatedAnimMontage: PlayMontageSimulated failed. Name: AbilitySystemComponent0, AnimMontage: LevelStart_Montage

Change 3100375 on 2016/08/24 by Laurent.Delayen

	Added AimOffsetLookAt node. AimOffset node that drives its inputs automatically from a Target Location (and a Source Socket).

	#rb none
	#codereview lina.halper
	#tests Tacticia's RMB Targeting

Change 3100278 on 2016/08/24 by Laurent.Delayen

	Fix for fast path struct copy being broken for FVectors.

	#rb lina.halper
	#codereview thomas.sarkanen
	#tests Chains' hook, Tacticia's LaserBeam and OrientationWarping

Change 3100161 on 2016/08/24 by John.Pollard

	Merging using Dev-Networking_->_Dev-General_(Orion)

	Fix issue with refresh viewer command failing due to backend congestion

	#rb RyanG
	#tests Replays

Change 3100114 on 2016/08/24 by jason.bestimt

	#ORION_MAIN - Merge DUI @ CL 3098849

	#RB:none
	#Tests:none

	#CodeReview: kerrington.smith, matt.schembari

	#R@BOMERGE-SOURCE: CL 3100078 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3100015 on 2016/08/24 by Michael.Noland

	Don't allow the consideration of nodes that won't be processed to affect the live aspect of the active sound containing a cross fade node
	#jira UE-34998
	#rb Aaron.McLeran
	[re-implementing CL# 3098559 originaly by Marc.Audy in Release 4.13]
	#tests Compiled and ran a golden path match with headphones on

Change 3100012 on 2016/08/24 by Michael.Noland

	UE-34951 - Zero-volume vorbis decoded sounds are too expensive

	-Adding an audio settings parameter to disable zero-volume playback globally
	-Adding a new bool on sound waves to allow opt-in to virtualize when at zero-volume

	#rb marc.audy
	[re-implementing CL# 3094893 from Dev-Framework, originally by Aaron McLeran]
	#tests Compiled and ran a golden path match with headphones on

Change 3099889 on 2016/08/24 by Max.Chen

	Sequencer: Added command line option to enable burnin

	#rb none
	#tests Render movie from command line wtih -UseBurnIn=yes

Change 3099801 on 2016/08/24 by Lina.Halper

	Removed unnecessary comment

	#rb: none
	#code review: Benn.Gallagher
	#tests: compile

Change 3099787 on 2016/08/24 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: sam.zamani
	#http
	- fix for cancelled requests that have not been started never triggering a completion delegate
	- fixes soft lock when handling disconnects during login

	OR-26945 The client stays on the "downloading profile" screen when rejoining after disconnecting

	#rb josh.markiewicz, alex.fennell
	#tests none

	#R@BOMERGE-SOURCE: CL 3099782 in //Orion/Release-30.2/... via CL 3099784 via CL 3099785
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3099252 on 2016/08/24 by Lina.Halper

	Fixed menu text

	#rb: none
	#code review: Thomas.Sarkanen
	#tests: open editor and create child montage and replaced the animation

Change 3099251 on 2016/08/24 by Lina.Halper

	Deterministic cooking of skeleton
	 - abandon all guid from GuidMap. GuidMap is still important since we have to generate UID from it, but GuidMap only contains name once cooked

	#jira: UE-34834
	#rb: Martin.Wilson
	#tests: cooking orion and make sure it works

Change 3098504 on 2016/08/23 by Bart.Bressler

	Add server time between sending packets monitoring histogram

	#rb dmitry.rekman
	#tests ran server locally and made sure analytics events were sent

Change 3098494 on 2016/08/23 by Michael.Noland

	Engine: Added UWorld::SetTimeUntilNextGarbageCollection to change the GC timer for use when doing automated performance capture measurements
	- Note: Things that force a GC will still force a GC after using this method (and they will also reset the timer)
	- Fixed a bug where UWorld::ForceGarbageCollection might not force a GC immediately if run on a server with no clients connected
	#tests Tested by calling while stat dumphitches was active and confirmed that the interval changed
	#codereview ben.salem, gil.gribb
	#rb none

Change 3098491 on 2016/08/23 by Mieszko.Zielinski

	Expanded BTDecorator_IsAtLocation with an option to use AIDataProvider #UE4

	#rb Lukasz.Furman
	#test golden path

Change 3098070 on 2016/08/23 by Lina.Halper

	Fix crash with UI  update reconstructing

	- will have to come up with a better solution than this.

	#rb: Martin.Wilson
	#tests: child anim montage

Change 3097914 on 2016/08/23 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: david.nikdel
	Merging CL #3097879
	from //WEX/Main/Engine/Source/Runtime/Online/NotForLicensees/OnlineSubsystemMcp/...
	to //Orion/Main/Engine/Plugins/Online/NotForLicensees/OnlineSubsystemMcp/Source/...

	#Analytics #OSS: Adjusted cohort selection algorithm and test cases
	[CodeReviewed]: Philip.Buuck
	#TESTS: unit tests
	#RB: none

	#R@BOMERGE-SOURCE: CL 3097911 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3097745 on 2016/08/23 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Megre 30.2/31 @ CL 3096895

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3097716 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3097722 on 2016/08/23 by Chris.Bunner

	Update texture expression properties before triggering parent material recompile.
	#rb John.Billon
	#tests Editor replace references, Golden path
	#jira OR-27531

Change 3097694 on 2016/08/23 by Lina.Halper

	#Child Anim Montage

	- Duplicate from parent of the information it cares to get
	  - Currently it is selective on copying what data
	- Modified GetAllAnimationSequencesReferred to get a partial data
	- Added ParentAsset/AssetMappingTable in AnimationAsset
	- Sequence Browser opening would also add to history
	- AnimNotify - CanBeplaced virtual function lets you filter which asset it's placed on

	#code review: Benn.Gallagher, Thomas.Sarkanen, David.Ratti
	#rb:Martin.Wilson
	#tests: creating child montage, editing, lots of UI functionality, notifies placement

Change 3097513 on 2016/08/23 by Thomas.Sarkanen

	Non-POD structs can now be copied using the fast path

	We now always use CPP struct ops to perform copies when dealing with struct properties.

	#jira UE-34571 - Support struct member access on AnimBP fast path
	#rb Laurent.Delayen
	#tests OrionEntry with Tacticia, confirming orientation warping works correctly and fast path is enabled. Agora_P with Tacticia & bots, played two games.

Change 3096729 on 2016/08/22 by Mieszko.Zielinski

	Fixes to EQS scoring function preview #UE4

	#rb Lukasz.Furman
	#test golden path

Change 3096596 on 2016/08/22 by Jason.Bestimt

	#ORION_DG - Fixes from 4.13 to video playback (CL# 3075761 & 3083970)

	#RB:none
	#Tests:none

	#CodeReview: matt.schembari, max.preussner
	#R@BOMERGE: MAIN

Change 3096550 on 2016/08/22 by Jurre.deBaare

	Fix for HLOD dirty clusters PIE warning message
	#tests Simulated Origin with built HLOD clusters, and with one dirty cluster
	#rb none

Change 3096532 on 2016/08/22 by Mieszko.Zielinski

	Modified GameplayTask_WaitDelay to allow specifying task's priority #UE4

	As part of the change introduced UGameplayTask::NewTaskUninitialized that's basically a redirect of NewObject, but clearly indicates that a task needs to be manually initialized

	#codereview Lukasz.Furman
	#rb none
	#test golden path

Change 3096455 on 2016/08/22 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: keli.hlodversson
	#CEF: Copy upgraded CEF binaries from //Portal/Main to fix crash issues with Sofort purchases
	#RB David.Nikdel
	#TESTS none

	#R@BOMERGE-SOURCE: CL 3096452 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3096316 on 2016/08/22 by Sammy.James

	Resave to fix log warnings.
	BPC changes to ensure type saves.

	#rb #tests editor

Change 3096040 on 2016/08/22 by bruce.nesbit

	Revised fix for landscape crash

	#rb GarethM

	#tests Game

	#codereview Bart.Bressler

Change 3096015 on 2016/08/22 by bruce.nesbit

	Fixed a crash in ALandscapeProxy::PostLoad when running an editor build with -server

	#rb none

	#tests game

	#codereview Bart.Bressler

Change 3095578 on 2016/08/19 by Mieszko.Zielinski

	Made NavigationSystem call TickAsyncBuild on all navigation data instances is there was an ongoing navigation build in progress in the editor #UE4

	This was causing Orion's flow field to not build if auto navmesh update was disabled in the editor

	#rb none
	#test golden path
	#codereview Lukasz.Furman

Change 3095397 on 2016/08/19 by Lina.Halper

	Fix issue with crash when deleting all segment

	#rb: Laurent.Delayen
	#tests: delete segment and make sure it doesn't crash
	#jira: UE-34830

Change 3095060 on 2016/08/19 by Bart.Bressler

	Don't load ULandscapeComponent objects on dedicated servers to save memory.

	#tests cooked server data and played a Solo vs. AI game
	#rb gareth.martin
	#codereview james.golding

Change 3095037 on 2016/08/19 by Lina.Halper

	Potential fix with montage trigger ensure on marker sync group

	#jira: OR-27685
	#rb: Benn.Gallagher
	#code review: Martin.Wilson
	#tests: attack primhelilx with knock up

Change 3094962 on 2016/08/19 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: david.nikdel
	#Merging #OSS - Added FUserOnlineAccountMcp::SelectCohort
	#RB: None
	#TESTS: test suite in source
	[CodeReviewed]: Philip.Buuck

	#R@BOMERGE-SOURCE: CL 3094961 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3094950 on 2016/08/19 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: david.nikdel
	#Merge #UE4 - Made FMD5 const-correct
	#RB: none
	#TEST: none

	#R@BOMERGE-SOURCE: CL 3094949 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3094619 on 2016/08/19 by Lina.Halper

	#DUPEFIX - ANIM: SmartNAME: the cooking doesn't guarantee the package is saved in the order, so we'll still have to regenerate list without GUID.
	- assumed the name is all set by now

	#rb: Benn.Gallagher
	#jira : UE-34886
	#tests: cooking infiltrator that showed same issue and run game.

Change 3094532 on 2016/08/19 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3094498

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3094528 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3093260 on 2016/08/18 by Josh.Markiewicz

	#UE4 - changed how party reset occurs to skip relying on AGameState which could very rarely be null (during server travel)
	- removed unnecessary cast
	#rb bart.bressler
	#codereview bart.bressler, rob.cannaday
	#tests launched game, some basic party testing

Change 3093224 on 2016/08/18 by Josh.Markiewicz

	#UE4 - added a chatroom class that does some basic chat room join/create/leave functionality to share between games
	#rb paul.moore
	#codereview anthony.carter
	#tests solo vs ai chat with 2 players, coop vs ai chat with 2 players, one leaving and rejoining

Change 3092597 on 2016/08/17 by Daniel.Lamb

	Added Ben Crocker to the rebuild lighting emails.
	#rb Trivial
	#Test none

Change 3092063 on 2016/08/17 by andrew.grant

	Merging using ROBO://Orion/Release-Candidate->//Orion/Main
	#rb #tests none

Change 3091081 on 2016/08/16 by Jurre.deBaare

	Fixing non-Editor build errors
	#fix Wrapped parts in WITH_EDITOR and added IsBuilt to check if the LODActor has a valid static mesh (thus is not dirty)
	#tests Build Editor + Game
	#rb none

Change 3091009 on 2016/08/16 by Mieszko.Zielinski

	Added a way to configure a map to not spawn AISystem instance at all #UE4

	#rb none
	#test golden path

Change 3090932 on 2016/08/16 by Michael.Noland

	Vixen: Added indication to the analytics and FPS charts
	#rb marcus.wassmer
	#tests Compiled for the platform

Change 3090844 on 2016/08/16 by Laurent.Delayen

	Replicated CL 3090734  from Fortnite.

	---

	Fix AbilitySystemComponent not ticking while playing a montage, and ticking when we're not playing a montage

	Here's the issue in the version of the code prior to this checkin:
	- UpdateShouldTick calls GetShouldTick, which checks the value of RepAnimMontageInfo.IsStopped
	- When we call UpdateShouldTick within AnimMontage_UpdateReplicatedData, we haven't set RepAnimMontageInfo.IsStopped yet to the correct value
	- So when we aren't playing any montages but are starting a new one, we were saying we shouldn't tick
	- It also means if we were playing a montage, and then stop, we'll start ticking
	- Ticking calls AnimMontage_UpdateReplicatedData, which should be called while we're playing

	#codereview john.abercrombie
	#rb none
	#tests golden path

Change 3090832 on 2016/08/16 by Michael.Noland

	Windows: Fixed a whitespace issue
	#rb none
	#tests Compiled for windows

Change 3090688 on 2016/08/16 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: andrew.grant
	Merging using ROBO://Orion/Release-Candidate->//Orion/Main
	#rb none
	#tests built

	#R@BOMERGE-SOURCE: CL 3090687 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3090547 on 2016/08/16 by Jurre.deBaare

	Need a warning message similar to lighting unbuilt when HLOD cluster is not built
	#fix Added HLOD clusters need to be rebuilt message similar to the lighting one during PIE and game-time, and cleaned/changed "'DisableAllScreenMessages' to suppress" behaviour
	#jira UE-34335
	#rb none
	#codereview Michael.Noland
	#tests pie Agora with and without dirty HLOD clusters

Change 3090285 on 2016/08/16 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3090267

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3090282 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3089413 on 2016/08/15 by paul.mader

	Agora 2.0 assets

Change 3089266 on 2016/08/15 by Max.Chen

	Sequencer: Add Convert to Possessable

	Copy from Dev-Sequencer

	#jira UE-32139
	#rb none
	#tests Convert steel to possessable in Gameplay_PS4 map.

Change 3089136 on 2016/08/15 by Mieszko.Zielinski

	Fixed AISense_Sight's time slicing unintentionally skipping queue aging if given time limit is reached #UE4

	#rb Lukasz.Furman
	#codereview Dan.Youhon
	#test golden path

Change 3089118 on 2016/08/15 by Mieszko.Zielinski

	Fixed a rare crash in UBlackboardData::GetKeyType resulting from a key selector referencing a type that has been removed from the project's source code #UE4

	#rb none
	#test golden path

Change 3088976 on 2016/08/15 by Andrew.Grant

	Fixed issue with PS4 toolchain ignoring ModuleRules.CodeOptimization.Never / ModuleRules.CodeOptimization.Always when determining optimization level of modules.
	Fixed issue with VC toolchain ignoring ModuleRules.CodeOptimization.Never setting.
	Removed superflous /Os from VC debugg settings
	#rb none
	#tests verified module built with 'Never' on PS4/Win is built without optimizations.
	#codereview Marcus.Wassmer, Ben.Marsh

Change 3088830 on 2016/08/15 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3088807

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3088829 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3088597 on 2016/08/14 by Jason.Bestimt

	#ORION_DG - Trying to resolve R@BOMERGE collision (DUI to MAIN -> DG)

	#RB:none
	#Tests:none

	#CodeReview: andrew.grant, david.ratti, matt.schembari

Change 3087827 on 2016/08/12 by Bart.Bressler

	Updates to skeletal mesh memory saving on dedicated server

	#rb lina.halper
	#tests Cooked server data, played a game for a while in Solo vs. AI

Change 3087351 on 2016/08/12 by John.Pollard

	Merging using Dev-Networking_->_Dev-General_(Orion)

	#jira OR-27406
	#rb RyanG
	#tests Replays

Change 3087118 on 2016/08/12 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3086747

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3087117 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3086176 on 2016/08/11 by Marcus.Wassmer

	Fix PS4 ShaderPipelines not matching pixel/vertex shader properly.
	#rb Rolando.Caloca
	#tests Broken PS4 content before/after

Change 3085992 on 2016/08/11 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Unclog R@BOMERGE

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3085987 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3085911 on 2016/08/11 by Laurent.Delayen

	Added FBoneContainer::BoneIsChildOf for FCompactPoseBoneIndex

	#rb none
	#tests Orientation Warping

Change 3085614 on 2016/08/11 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3085547

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3085598 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3084507 on 2016/08/10 by Marcus.Wassmer

	Duplicate 3070376 and 3078879 to fix corrupted decals on Vixen.
	#rb none
	#tests paragon ps4/vixen
	#codereview Olaf.Piesche

Change 3084136 on 2016/08/10 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3083799

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3083814 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3083424 on 2016/08/09 by Max.Chen

	Sequence Recorder: Fix crash when actor class to record is null.

	#tests Use sequence recorder to record a skeletal mesh actor
	#rb none

Change 3083134 on 2016/08/09 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: sam.zamani
	#online,store,ps4
	- creating one offer entry per entitlement

	#rb david.nikdel, ian.fox
	#tests MTX purhcase on PS4
	#lockdown: andrew.grant

	#R@BOMERGE-SOURCE: CL 3083127 in //Orion/Release-30.1/... via CL 3083128 via CL 3083131
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3083069 on 2016/08/09 by Marcus.Wassmer

	Vixen scalability changes
	#rb Michael.Noland
	#tests vixen/ps4
	#codereview jordan.walker

Change 3083063 on 2016/08/09 by Marcus.Wassmer

	Most games will probably run out of memory if setup to do auto-4k.
	Make this a setting that's off by default.
	#rb Michael.Noland
	#codereview Luke.Thatcher, Lee.Clark
	#tests vixen on 4k.

Change 3082778 on 2016/08/09 by Marcus.Wassmer

	Duplicate fix for Vixen GPU page faults and rendertarget errors (3066087)
	#rb none
	#tests Agora on vixen.

Change 3082772 on 2016/08/09 by Marcus.Wassmer

	Duplicate fix for detail mode reregistration (3065543)
	#rb none
	#tests Toggled detail mode, observe proper items spawning

Change 3082765 on 2016/08/09 by Marcus.Wassmer

	Don't crash when trying to use windowed vsync on vixen
	#rb Michael.Noland
	#test ran paragon on vixen
	#codereview Luke.Thatcher,Lee.Clark

Change 3082764 on 2016/08/09 by Marcus.Wassmer

	fix HLOD distance scale not working properly when components are re-registered.
	#rb michael.noland
	#codereview jurre.debarre
	#tests setting multiple times, setting on boot via deviceprofile

Change 3082429 on 2016/08/09 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: sam.zamani
	Merging //Orion/Release-30.1 to Main (//Orion/Main)

	Change: 3082419

	#online,store,PS4

	OR-25384 [PS4] "There is no content. It might not be for sale yet, or might no longer be for sale" at main menu and at post match screen

	- added config option for toggling store on PS4
	[OnlineSubsystemPS4]
	bStoreEnabled=true

	- can also override via title specific json values in <titleid>\title.json
	allow_mtx=true

	[CodeReviewed]: andrew.grant, phillip.buck, ian.fox
	#lockdown: andrew.grant
	#rb none
	#tests ps4 run with titleid=CUSA3609_00 (which has mtx disabled for PS4 since that title has no store support)

	#R@BOMERGE-SOURCE: CL 3082428 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3082194 on 2016/08/09 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3082105

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3082192 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3080984 on 2016/08/08 by Lina.Halper

	Issue with not being able to set static animation data via BP

	- artists were using SetAnimation/PlayAnimation, but they are not safe to be used in construction script, so made sure the other serializable properties are exposed via BP
	- also since they want it to work in level viewport, I have to tick/refresh whenever it's getting called.

	#rb: Martin.Wilson
	#tests: Sword Beauty map

Change 3080665 on 2016/08/08 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3080081

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3080543 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3080565 on 2016/08/08 by Laurent.Delayen

	Fix for curve values during URO interpolation.
	Fixes flashing of materials and Twinblast's ult weapon.

	https://jira.ol.epicgames.net/browse/OR-27107
	https://jira.ol.epicgames.net/browse/OR-24358

	#rb lina.halper, martin.wilson
	#tests Twinblast's ult and Coil's primary.

Change 3079832 on 2016/08/05 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: marcus.wassmer
	Fix for PS4 crash reports not attaching the minidump when trying to force full crash dumps via commandline
	#rb none
	[CodeReviewed] Chris.Wood
	#tests checked crashcontext on PC/PS4
	#lockdown Andrew.Grant

	#R@BOMERGE-SOURCE: CL 3078933 in //Orion/Release-30/... via CL 3078934 via CL 3078935 via CL 3079831
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3079045 on 2016/08/05 by Lina.Halper

	Adding more log to figure out why ActivePlayers.Count becomes inconsistent.

	#rb: Martin.Wilson
	#tests: PIE with bots

Change 3078944 on 2016/08/05 by Rolando.Caloca

	O - Update blacklisted driver
	#jira OR-27051
	#rb Marcus.Wassmer
	#tests Run with AMD card

Change 3078735 on 2016/08/05 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3078670

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3078734 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3078122 on 2016/08/04 by Dmitry.Rekman

	Linux: treat abort() / SIGABRT as crash.

	- Rationale: certain code not under our control (most notably, stack smashing protector) may call abort(), which would previously terminate the engine without any chance to even enter the crash handler.
	- Rewrote RequestExit() because it used abort() itself.
	- Also removed -fstack-protector. The logic behind this is: stack protector calls abort() on detecting a smash (which is suspected to contribute to missing reports), but does it at an inappropriate place, that causes stack unwinding to crash later.  As bad as it sounds, it may be better to allow stack to be corrupted and crash later - hopefully outside of libc code - to some other reason.

	#rb Mark.Satterthwaite
	#codereview Mark.Satterthwaite, Michael.Noland, Andrew.Grant
	#review-3078104 @Mark.Satterthwaite, @Michael.Noland, @Andrew.Grant

	#tests Ran Linux server, crashed using different methods.

Change 3077887 on 2016/08/04 by Dmitry.Rekman

	Initialize StackCount to 0 (kills valgrind warning).

	#rb David.Ratti
	#codereview David.Ratti
	#tests Ran Linux server.

Change 3077257 on 2016/08/04 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3077193

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3077256 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3077242 on 2016/08/04 by Dmitry.Rekman

	Linux: stop heartbeat thread before handling the crash.

	#rb Robert.Manuszewski
	#codereview Robert.Manuszewski, Andrew.Grant
	#tests Compiled and ran Linux server, crashed it.

Change 3076676 on 2016/08/03 by Dmitry.Rekman

	Linux: print details about memory access (read or write).

	- Also print all the 16 digits of the pointer.
	- Read/write detection only implemented for x86_64.

	#rb Andrew.Grant
	#codereview Andrew.Grant
	#tests Compiled (natively) and ran Linux server.

Change 3076675 on 2016/08/03 by Dmitry.Rekman

	Print a bit more info about the array in assert.

	#rb Andrew.Grant
	#codereview Andrew.Grant
	#test Compiled and ran Linux server.

Change 3076010 on 2016/08/03 by Laurent.Delayen

	Moved OrionAnimNode_LegIK from Paragon to Engine.

	#codereview lina.halper
	#rb none
	#tests Grim.exe + Iggy & Scorch

Change 3075512 on 2016/08/03 by Matt.Kuhlenschmidt

	Reimplemented 3070766 for Orion:

	Make sure richtooltips are not generated for hidden enum items so that there is not a mismatch between rich tooltips and enum items (causing a crash)

	#rb none
	#tests none

Change 3075446 on 2016/08/03 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3075422

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3075445 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3075394 on 2016/08/03 by HaarmPieter.Duiker

	Adding a shadows max and highlights min parameters to allow the user to control when the 'shadows' controls fall off and when the 'highlights' controls ramp in.
	#rb marcus.wassmer
	#tests post process color correction

Change 3074314 on 2016/08/02 by Dmitry.Rekman

	Linux: change optimization from -O2 to -O1 (temporarily?).

	- The purpose is to make callstacks easier to follow and possibly catch stack smashing (if it happens) earlier.
	- Also adds a line to UBT output during compilation to draw attention.

	#rb Michael.Noland
	#codereview Michael.Noland, Andrew.Grant, Bart.Bressler
	#tests Compiled and ran Linux server.

Change 3073553 on 2016/08/02 by jason.bestimt

	#ORION_MAIN - Merge 30.2 @ CL 3073360

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3073481 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

	#R@BOMERGE-SAYS: Beep boop! I couldn't merge this change. Please do it yourself, human.
	//Orion/Dev-General/OrionGame/Content/Characters/Heroes/BP_Hero.uasset - can't integrate exclusive file already opened
	#CodeReview: jason.bestimt

Change 3073505 on 2016/08/02 by Daniel.Lamb

	Added cook modification delegate stats to cooker stats.
	#rb Wes.Hunt
	#test cook paragon.

Change 3072440 on 2016/08/01 by Aaron.Eady

	PlayerController Force Feedback (Debug only);

	Adding #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) around the use of the debug only variable ForceFeedbackEffectHistoryEntries.

	#rb none
	#tests SHIPPING

Change 3072259 on 2016/08/01 by Aaron.Eady

	PlayerController Force Feedback (Debug only);

	Added more information to the things displayed on the screen for force feedback when we do ShowDebug ForceFeedback.

	#rb Michael.Noland
	#tests PIE

Change 3071908 on 2016/08/01 by John.Pollard

	Fix null reference crash

	#rb DavidR
	#tests Live game + replays

Change 3071876 on 2016/08/01 by John.Pollard

	Merging using Dev-Networking_->_Dev-General_(Orion)

	Assertion failed: WriterState.Changed.Num() == 0 occurs when a Pitcher Husk hits the Player

	#rb none
	#tests FN + Paragon live game + replays
	#codereview Andrew.Grant

Change 3071875 on 2016/08/01 by John.Pollard

	Merging using Dev-Networking_->_Dev-General_(Orion)

	Finalize replay version system

	* No longer use changelist to filter replays (so we will only filter by engine/game version now, which need to be hand cranked to invalidate old versions)
	* Submit actual changelist when uploading (rather than locking to previous versions). We can do this now since we don't filter by changelist anymore.
	* Removed unnecessary 'bShowAllVersions' property from replay browser code, using cvar instead (orion.ShowAllReplayVersions)

	#rb RyanG
	#tests Live game + replays
	#codereview Andrew.Grant

Change 3071874 on 2016/08/01 by John.Pollard

	Merging using Dev-Networking_->_Dev-General_(Orion)

	Fix gameplay tags to work better with backwards compatibility in replays

	* We use the net field export group system in the package map to export tag names as a packed index
	* This will allow us to see the names of tags that no longer exists on the remote side

	#rb RyanG
	#tests Live game + replays
	#codereview Andrew.Grant

Change 3071776 on 2016/08/01 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30.2 @ CL 3071738

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3071775 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3071258 on 2016/07/30 by Aaron.McLeran

	OR-26580 CRASH: FXAudio2SoundSource::GetChannelVolumes - Silent Crash during gameplay

	- Removed voice operation set since it was causing crashes when stopping voices. Still a good idea, but need to make sure the async OnBufferEnd and stopping an FSoundSource can work together.
	- Added a proxy object that wraps the FAsyncTask used for async decoding. Calling IsDone() and EnsureCompletion() can't happen at the same time from different threads now.

	#rb none
	#tests ran paragon soaking for a long time with constant AI combat and observed no crashes or audio issues.

Change 3071099 on 2016/07/30 by Aaron.McLeran

	OR-26580 CRASH: FXAudio2SoundSource::GetChannelVolumes - Silent Crash during gameplay

	- Temporary revert of a portion of CL 3067560 which exacerbates an issue with the async decoding tasks and calling IsDone and EnsureComplete on different threads.

	#rb none
	#tests ran paragon with change and noticed no change in audio quality

Change 3070916 on 2016/07/29 by Andrew.Grant

	Missed file!
	#rb #tests na

Change 3070915 on 2016/07/29 by Andrew.Grant

	Merging //UE4/Main @ 3070724 through //UE4/Orion-Staging
	#rb none
	#tests Engine QA, Orion QA smoke

Change 3070576 on 2016/07/29 by Uriel.Doyon

	Fixed initialization of the defrag pool size. Now controlled by r.PS4DefragPoolSize.
	#review-3070386 @marcus.wassmer
	#jira OR-25941
	#rb marcus.wassmer
	#tests Run Game on PS4, and in editor

Change 3070086 on 2016/07/29 by Martin.Wilson

	Fixed ensure triggering during sequencer playback due to double update.

	#jira UE-33938
	#rb Thomas.Sarkanen
	#tests opened affected asset and verified problem no longer occured

Change 3070016 on 2016/07/29 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 30 @ CL 3069935

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3069976 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3069435 on 2016/07/28 by Ian.Fox

	#Orion, #Mcp - Check if Price Engine is configured before attempting query
	#rb Sam.Zamani
	#tests none
	#codereview Sam.Zamani

Change 3069381 on 2016/07/28 by Michael.Noland

	Animation: Demoted a check() in anim sync group code to an ensure() to unblock others
	#rb nick.penwarden
	#tests Loaded Paragon cine asset that was crashing
	#codereview lina.halper, martin.wilson

Change 3069203 on 2016/07/28 by Dmitry.Rekman

	Headless client: do not draw windows.

	- Disables a bunch of code, including reaching into font cache to estimate width.
	- Should be probably disabled on a higher level, but cutting out the whole Slate application is infeasible (according to BradA/BenM, due to some logic requiring widgets).

	#rb Nick.Atamas
	#review-3068983 @Nick.Atamas, @Michael.Noland, @Brad.Angelcyk, @Ben.Salem
	#codereview Nick.Atamas, Michael.Noland, Brad.Angelcyk, Ben.Salem

	#tests Compiled and ran Orion Linux client.

Change 3069181 on 2016/07/28 by Lina.Halper

	Fix struct redirector for Orion anim node moving to engine

	#rb: Maciej.Mroz
	#code review:Laurent.Delayen
	#tests: editor loading the anim BP that caused the name conversion

Change 3069092 on 2016/07/28 by Aaron.McLeran

	OR-26161 Client hitches indefinitely when using Stat soundcues / soundwaves

	- Not all active sounds have sound classes, was causing a crash

	#codereview marc.audy
	#rb zabir.hoque
	#tests Run game with stat soundcues and not crash

Change 3068969 on 2016/07/28 by David.Ratti

	Move test for invalid gameplaycue instance up, since calling IsPendingKill() on garbage can cause crash too.

	#rb none
	#tests compile

Change 3068902 on 2016/07/28 by David.Ratti

	Code for tracking down UGameplayCueManager::GetInstancedCueActor crash.
	#rb none
	#tests compile

Change 3068831 on 2016/07/28 by Aaron.McLeran

	OR-26417 Reverb is too loud in-game in Dev-General

	- Initializing prev reverb to 0s so that the first default reverb gets set when no audio volume is set.

	#rb Jeff.Campeau
	#tests run a map with no reverb audio volume and reverb is not super wet

Change 3068529 on 2016/07/28 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: david.nikdel
	#OSS #PurchaseMcp: Use GameService->CreateOnlineHttpRequest instead of  McpSubsystem->CreateRequest to query receipts (uses subsystem config)
	#RB: none
	#TESTS: none

	#R@BOMERGE-SOURCE: CL 3068465 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3068399 on 2016/07/28 by Andrew.Rodham

	Sequencer: Changed animation tracks to allow more animation types (such as anim montages)

	  - APIs now accept UAnimSequenceBases rather than UAnimSequences to afford more flexibility

	#jira OR-25769
	#tests Tested all combinations of animation with sequencer (montage+sequence on asset/BP driven animation components) and matinee. Tested running a game and playing back the announce trailer. Rendered out some movies to ensure that trails work correctly.
	#rb Benn.Gallagher

Change 3068138 on 2016/07/28 by Marcus.Wassmer

	Disable mallocleak testing by default
	#rb none
	#test none

Change 3068121 on 2016/07/28 by Marcus.Wassmer

	Make sure we always do fast stack captures when USE_FAST_STACKTRACE is enabled.
	Fixes game becoming unresponsive on Windows after 'mallocleak' dumps data.  Any other tool that uses stacktraces could become 700 - 1000x slower after any stack symbolication also.
	#rb Robert.Manuszewski
	#tests stack tracing / symbolication with mallocleak on windows.

Change 3068119 on 2016/07/28 by Marcus.Wassmer

	Fix MallocLeakProxy deadlock
	#rb Robert.Manuszewski
	#tests mallocleak start/stop/dump on windows

Change 3067752 on 2016/07/27 by Michael.Noland

	Engine: Refactored FPS chart creation to make it modular so many performance data consumers can be active at once, allowing greater flexibility and decoupling game analytics from FPS chart exec commands
	- IPerformanceDataConsumer is an interface for all consumers of per-frame performance tracking data, and instances can be registered/unregisted with the engine using AddPerformanceDataConsumer/RemovePerformanceDataConsumer
	- The implementation of the 'standard' frame time and hitch histogram tracking is FPerformanceTrackingChart, while the per-frame logging .csv is split into a separate FFineGrainedPerformanceTracker class.
	- The calculation of frame time breakdowns and hitch detection now occur as long as at least one IPerformanceDataConsumer is registered
	- Internally the code has been cleaned up a bit to use FHistogram for data storage instead of custom binning code

	Upgrade Notes:
	- DumpFPSChartAnalytics has been removed, games that used it should switch to creating their own instance of FPerformanceTrackingChart and call DumpChartToAnalyticsParams on it directly
	- In general games should have no reason to programmatically call GEngine->StartFPSChart anymore, instead creating their own instance (this prevents conflicts when using the engine console commands)
	- HTML output for stopfpschart is now generated to a single file rather than two duplicate files (using both map name and capture time as part of the file name)
	- Removed PauseFPSChart, IsFPSChartActive, and GetFPSChartBoundByFrameCounts to reflect that the GEngine instances aren't meant for external use (Start/Stop are left public for automated testing that wants to use them to do logging, but may also be moved private in the future)

	Paragon:
	- Updated to use a separate FPerformanceTrackingChart for gameplay versus in-game menus and removed the duplicated code and GameThreadHitchChart event
	- Removed partial USE_SERVER_PERF_COUNTERS code in ChartCreation.cpp, splitting it out into a separate observer, which currently lives in Paragon but will be moved to shared code in a separate checkin. The code was only useful in the first place along with other Paragon-side code that was consuming it.

	#rb dmitry.rekman
	#codereview bob.tellez, peter.knepley, andrew.grant, john.mauney
	#review-3067607 @Dmitry.Rekman, @Bob.Tellez
	#tests Tested manual startfpschart/stopfpschart as well as Paragon match analytics via golden path solo vs AI

Change 3067654 on 2016/07/27 by Michael.Noland

	FString - Fix divide overload path concatenation for empty paths since there are several places in the engine that expect using that doing { path / "" } will append a / onto path.

	#rb steve.robb
	#jira UE-31959
	[duplicating CL# 3039827]

	#tests Tried moving a folder in the editor

Change 3067644 on 2016/07/27 by Aaron.McLeran

	OR-24537 Looping audio sometimes persists in Agora

	Adding stopping sounds if audio component is destroyed while playing a looping sound

	#rb jeff.campeau
	#tests audio component stops looping sound if audio component is destroyed prematurely

Change 3067560 on 2016/07/27 by Aaron.McLeran

	OR-26322 Client Hang in FXAudio2EffectsManager::SetReverbEffectParameters

	- Only applying reverb parameters if they've changed from previous reverb params to avoid unnecessarily spamming the XAudio2 API call
	- using xaudio2 operation sets to ensure that voice and effect params are executing in sequence
	- only calling destroy voice after all voice and effect changes have been committed to avoid destroy voice interfering with those commands
	- Don't call EnsureCompletion on pending async tasks on teardown

	#rb Jeff.Campeau
	#tests play paragon with change, notice no changes to audio behavior, no crashes. Created testmap with several reverb zones and demonstrated reverb effect transitions

Change 3067420 on 2016/07/27 by jason.bestimt

	#ORION_MAIN - Merge 29.2/30 @ CL 3067312

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3067400 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3067316 on 2016/07/27 by jason.bestimt

	#ORION_MAIN - Merge DUI @ CL 3065602

	#RB:none
	#Tests:none

	[CodeReviewed]: matt.schembari

	#R@BOMERGE-SOURCE: CL 3067079 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3067025 on 2016/07/27 by Michael.Noland

	Core: Corrected the initial value of FLightweightTimeGuard::FrameTimeThresholdMS to be in MS rather than seconds and did a few coding standards fixes
	#rb none
	#tests Compiled

Change 3067020 on 2016/07/27 by Michael.Noland

	Core: Various improvements to FHistogram and split it out into separate files
	- Added the ability to use a separate thresholding key than the actual measurement value being recorded (e.g., when accumulating frame time spent in a chart keyed on framerate)
	- Added O(1) getters for total sample counts and sum of all measurements
	- Removed encapsulation-breaking SetBinCountByIndex / SetBinSumByIndex
	- Added support for specifying explicit histogram bucket thresholds
	#rb dmitry.rekman
	#tests Tested with another pending changelist that moves FPS charts to use FHistogram for the underlying storage

Change 3066681 on 2016/07/27 by Frank.Gigliotti

	Camera anim field of view fix;

	* The FOV is now reset on the PlayerCameraManager camera actor when it's initialized.  This fixes cases of stale FOV values after playing camera anims that don't end with the FOV at it's base value.

	* Base FOV can now be edited in the CameraAnim properties.  This allows you to specify what the FOV keys are relative to.  Previously it was always using a base FOV of 90 degrees.

	#RB None
	#CodeReview Jeff.Farris
	#Tests Multiple camera animations in PIE

Change 3066508 on 2016/07/27 by Lina.Halper

	Smartname guid will be discarded during cooking, and once it's cooked, it's trusted to have correct name.

	#code review:Martin.Wilson, Benn.Gallagher
	#rb: Martin.Wilson
	#tests: cooked test map, run test map, PIE, saving content, loading standalone game

Change 3066246 on 2016/07/27 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: andrew.grant
	Fix for non-unity error
	#rb none
	#tests compiled

	#R@BOMERGE-SOURCE: CL 3066245 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3066167 on 2016/07/27 by Benn.Gallagher

	Fixed clothing corruption seen on Twinblast after mesh updates. We were copying a u32 index buffer into a multisize container but CopyIndexBuffer doesn't change the data size when copying - only when rebuilding.
	#rb Ori.Cohen
	#tests Editor, PIE, Applying clothing to characters.

Change 3065868 on 2016/07/27 by Michael.Noland

	Blueprints: Fixing non-editor build (missing WITH_EDITOR)
	#rb none
	#tests Compiled PS4

Change 3065749 on 2016/07/26 by Michael.Noland

	Blueprints: Prevent a crash on load in RemoveNodeAndPromoteChildren when removing a corrupted SCS node if it has no parent link (the children are moved to the root node instead)
	#codereview mike.beach, marc.audy
	#tests Loaded and recovered a corrupted Blueprint on Cameron's machine
	#rb Phillip.Kavan

Change 3065706 on 2016/07/26 by Josh.Markiewicz

	#UE4 - changed default values for bLogoutOnSessionTimeout for reservation beacons
	- fixed non shipping cmd line override to be correct
	#rb none
	#codereview andrew.grant, paul.moore
	#tests none

Change 3065359 on 2016/07/26 by Rob.Cannaday

	Limit external id querying to 100 ids per call.  The backend currently enforces this and is returning an error when we exceed this limit.
	Break up calls in batches of 100 ids.

	#jira OR-20674
	#rb ian.fox
	#tests login to front end with PC, PS4.  forced tests to simulate > 100 requests.

Change 3065197 on 2016/07/26 by Bart.Bressler

	Change how PS4 sessions work:
	- We now will only try to join somebody's PS4 session only if we accepted an invite from the PS4 system software. This means that an MCP party can have members in different PS4 sessions.
	- Refactored a lot of the delegates in UOrionParty to lambdas to try to make it more readable
	- Added comments, other misc. code cleanup.

	#rb josh.markiewicz, sam.zamani, rob.cannaday
	#tests created cross play parties with multiple pc + ps4 players
	#jira OR-20332

Change 3065158 on 2016/07/26 by Lina.Halper

	Fix the guid keep generated by adding to the database.

	- This caused worse problem with non-deterministic cooking -   This doesn't fix UE-33454 for 100%, but this was the main reason why this was so visible

	#rb: Martin.Wilson
	#jira: UE-33772, UE-33454
	#tests: cooked AI_Test map, editor rename curves

Change 3064735 on 2016/07/26 by Dmitry.Rekman

	Linux: added WebRTC libs.

	- Compiled against glibc 2.12 / CentOS 6.x environment (see howto in a separate doc).

	#rb none
	#tests Tested OrionClient in Dev-General, and UE4Editor in Dev-Platform.

	(Edigrating 3063715 from //UE4/Dev-Platform/... to //Orion/Dev-General/...)

Change 3064727 on 2016/07/26 by Dmitry.Rekman

	Fix crash on cooker exit (UE-33583).

	- Global/static tickable objects could outlive the collection and trigger asserts when removing themselves from it.

	#rb none
	#tests Compiled and ran Linux server and Linux client.

	(Edigrating 3058779 from //UE4/Dev-Platform/... to //Orion/Dev-General/...)

Change 3064725 on 2016/07/26 by Dmitry.Rekman

	Linux: use libc++ instead of libstdc++.

	- Needed to solve problems with third-party C++ libraries (e.g. WebRTC).
	- Bundled libc++ 3.8.1 (TPS cleared).
	- Turned off ICU compilation (needs recompile against libc++).
	- Some libraries (e.g. FBX sdk) still need libstdc++, so in practice it is going to be a mix.

	#rb none
	#tests Built and ran a number of Linux targets.

	(Edigrating 3057152 from //UE4/Dev-Platform/... to //Orion/Dev-General/...)

Change 3064572 on 2016/07/26 by Jason.Bestimt

	#R@BOMERGE-AUTHOR: jason.bestimt
	#ORION_MAIN - Merge 29.2 @ CL 3064545

	#RB:none
	#Tests:none

	#R@BOMERGE-SOURCE: CL 3064569 in //Orion/Main/...
	#R@BOMERGE-BOT: ORION (Main -> Dev-General)

Change 3064523 on 2016/07/26 by Jon.Lietz

	Fixing it so gameplay effects with execution none will no longer keep the BP in a dirty state. Only call EmptyArray() on CalculationModifiersArrayPropHandle if it has any elements.

	#RB none
	#tests BP compiles and stays not dirty
	#codereview dave.ratti@epicgames.com

[CL 3111290 by Andrew Grant in Main branch]
2016-09-01 21:20:38 -04:00

1277 lines
47 KiB
C#

// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Microsoft.Win32;
namespace UnrealBuildTool
{
class LinuxToolChain : UEToolChain
{
LinuxPlatformContext PlatformContext;
public LinuxToolChain(LinuxPlatformContext InPlatformContext)
: base(CPPTargetPlatform.Linux)
{
PlatformContext = InPlatformContext;
if (!CrossCompiling())
{
// use native linux toolchain
string[] ClangNames = { "clang++", "clang++-3.8", "clang++-3.7", "clang++-3.6", "clang++-3.5" };
foreach (var ClangName in ClangNames)
{
ClangPath = Which(ClangName);
if (!String.IsNullOrEmpty(ClangPath))
{
break;
}
}
GCCPath = Which("g++");
ArPath = Which("ar");
RanlibPath = Which("ranlib");
StripPath = Which("strip");
// if clang is available, zero out gcc (@todo: support runtime switching?)
if (!String.IsNullOrEmpty(ClangPath))
{
GCCPath = null;
}
}
else
{
// use cross linux toolchain if LINUX_ROOT is specified
BaseLinuxPath = Environment.GetEnvironmentVariable("LINUX_ROOT");
// don't register if we don't have an LINUX_ROOT specified
if (String.IsNullOrEmpty(BaseLinuxPath))
throw new BuildException("LINUX_ROOT environment variable is not set; cannot instantiate Linux toolchain");
BaseLinuxPath = BaseLinuxPath.Replace("\"", "");
// set up the path to our toolchains
GCCPath = "";
ClangPath = Path.Combine(BaseLinuxPath, @"bin\clang++.exe");
// ar and ranlib will be switched later to match the architecture
ArPath = "ar.exe";
RanlibPath = "ranlib.exe";
StripPath = "strip.exe";
}
if (!DetermineCompilerVersion())
{
throw new BuildException("Could not determine version of the compiler, not registering Linux toolchain.");
}
// refuse to use compilers that we know won't work
// disable that only if you are a dev and you know what you are doing
if (!UsingClang())
{
throw new BuildException("This version of the engine can only be compiled by clang - refusing to register the Linux toolchain.");
}
else if (CompilerVersionMajor == 3 && CompilerVersionMinor == 4)
{
throw new BuildException("clang 3.4.x is known to miscompile the engine - refusing to register the Linux toolchain.");
}
// prevent unknown clangs since the build is likely to fail on too old or too new compilers
else if ((CompilerVersionMajor * 10 + CompilerVersionMinor) > 38 || (CompilerVersionMajor * 10 + CompilerVersionMinor) < 35)
{
throw new BuildException(
string.Format("This version of the Unreal Engine can only be compiled with clang 3.8, 3.7, 3.6 and 3.5. clang {0} may not build it - please use a different version.",
CompilerVersionString)
);
}
}
protected static bool CrossCompiling()
{
return BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Linux;
}
protected static bool UsingClang()
{
return !String.IsNullOrEmpty(ClangPath);
}
private string Which(string name)
{
Process proc = new Process();
proc.StartInfo.FileName = "/bin/sh";
proc.StartInfo.Arguments = String.Format("-c 'which {0}'", name);
proc.StartInfo.UseShellExecute = false;
proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.RedirectStandardError = true;
proc.Start();
proc.WaitForExit();
string path = proc.StandardOutput.ReadLine();
Log.TraceVerbose(String.Format("which {0} result: ({1}) {2}", name, proc.ExitCode, path));
if (proc.ExitCode == 0 && String.IsNullOrEmpty(proc.StandardError.ReadToEnd()))
{
return path;
}
return null;
}
/// <summary>
/// Splits compiler version string into numerical components, leaving unchanged if not known
/// </summary>
private void DetermineCompilerMajMinPatchFromVersionString()
{
string[] Parts = CompilerVersionString.Split('.');
if (Parts.Length >= 1)
{
CompilerVersionMajor = Convert.ToInt32(Parts[0]);
}
if (Parts.Length >= 2)
{
CompilerVersionMinor = Convert.ToInt32(Parts[1]);
}
if (Parts.Length >= 3)
{
CompilerVersionPatch = Convert.ToInt32(Parts[2]);
}
}
/// <summary>
/// Queries compiler for the version
/// </summary>
private bool DetermineCompilerVersion()
{
CompilerVersionString = null;
CompilerVersionMajor = -1;
CompilerVersionMinor = -1;
CompilerVersionPatch = -1;
Process Proc = new Process();
Proc.StartInfo.UseShellExecute = false;
Proc.StartInfo.CreateNoWindow = true;
Proc.StartInfo.RedirectStandardOutput = true;
Proc.StartInfo.RedirectStandardError = true;
if (!String.IsNullOrEmpty(GCCPath) && File.Exists(GCCPath))
{
Proc.StartInfo.FileName = GCCPath;
Proc.StartInfo.Arguments = " -dumpversion";
Proc.Start();
Proc.WaitForExit();
if (Proc.ExitCode == 0)
{
// read just the first string
CompilerVersionString = Proc.StandardOutput.ReadLine();
DetermineCompilerMajMinPatchFromVersionString();
}
}
else if (!String.IsNullOrEmpty(ClangPath) && File.Exists(ClangPath))
{
Proc.StartInfo.FileName = ClangPath;
Proc.StartInfo.Arguments = " --version";
Proc.Start();
Proc.WaitForExit();
if (Proc.ExitCode == 0)
{
// read just the first string
string VersionString = Proc.StandardOutput.ReadLine();
Regex VersionPattern = new Regex("version \\d+(\\.\\d+)+");
Match VersionMatch = VersionPattern.Match(VersionString);
// version match will be like "version 3.3", so remove the "version"
if (VersionMatch.Value.StartsWith("version "))
{
CompilerVersionString = VersionMatch.Value.Replace("version ", "");
DetermineCompilerMajMinPatchFromVersionString();
}
}
}
else
{
// icl?
}
if (!CrossCompiling() && !ProjectFileGenerator.bGenerateProjectFiles)
{
Console.WriteLine("Using {0} version '{1}' (string), {2} (major), {3} (minor), {4} (patch)",
String.IsNullOrEmpty(ClangPath) ? "gcc" : "clang",
CompilerVersionString, CompilerVersionMajor, CompilerVersionMinor, CompilerVersionPatch);
}
return !String.IsNullOrEmpty(CompilerVersionString);
}
/// <summary>
/// Checks if compiler version matches the requirements
/// </summary>
private static bool CompilerVersionGreaterOrEqual(int Major, int Minor, int Patch)
{
return CompilerVersionMajor > Major ||
(CompilerVersionMajor == Major && CompilerVersionMinor > Minor) ||
(CompilerVersionMajor == Major && CompilerVersionMinor == Minor && CompilerVersionPatch >= Patch);
}
/// <summary>
/// Architecture-specific compiler switches
/// </summary>
static string ArchitectureSpecificSwitches(string Architecture)
{
string Result = "";
if (Architecture.StartsWith("arm"))
{
Result += " -fsigned-char";
// FreeType2's ftconfig.h will trigger this
Result += " -Wno-deprecated-register";
}
return Result;
}
static string ArchitectureSpecificDefines(string Architecture)
{
string Result = "";
if (Architecture.StartsWith("x86_64"))
{
Result += " -D_LINUX64";
}
return Result;
}
/// <summary>
/// Gets architecture-specific ar paths
/// </summary>
private static string GetArPath(string Architecture)
{
if (CrossCompiling())
{
return Path.Combine(Path.Combine(BaseLinuxPath, String.Format("bin/{0}-{1}", Architecture, ArPath)));
}
return ArPath;
}
/// <summary>
/// Gets architecture-specific ranlib paths
/// </summary>
private static string GetRanlibPath(string Architecture)
{
if (CrossCompiling())
{
return Path.Combine(Path.Combine(BaseLinuxPath, String.Format("bin/{0}-{1}", Architecture, RanlibPath)));
}
return RanlibPath;
}
/// <summary>
/// Gets architecture-specific strip path
/// </summary>
private static string GetStripPath(string Architecture)
{
if (CrossCompiling())
{
return Path.Combine(Path.Combine(BaseLinuxPath, String.Format("bin/{0}-{1}", Architecture, StripPath)));
}
return StripPath;
}
static string GetCLArguments_Global(CPPEnvironment CompileEnvironment)
{
string Result = "";
// build up the commandline common to C and C++
Result += " -c";
Result += " -pipe";
Result += " -nostdinc++";
Result += " -I" + UEBuildConfiguration.UEThirdPartySourceDirectory + "Linux/LibCxx/include/";
Result += " -I" + UEBuildConfiguration.UEThirdPartySourceDirectory + "Linux/LibCxx/include/c++/v1";
Result += " -Wall -Werror";
// test without this next line?
Result += " -funwind-tables"; // generate unwind tables as they seem to be needed for stack tracing (why??)
Result += " -Wsequence-point"; // additional warning not normally included in Wall: warns if order of operations is ambigious
//Result += " -Wunreachable-code"; // additional warning not normally included in Wall: warns if there is code that will never be executed - not helpful due to bIsGCC and similar
//Result += " -Wshadow"; // additional warning not normally included in Wall: warns if there variable/typedef shadows some other variable - not helpful because we have gobs of code that shadows variables
Result += ArchitectureSpecificSwitches(CompileEnvironment.Config.Target.Architecture);
Result += " -fno-math-errno"; // do not assume that math ops have side effects
Result += " -fno-rtti"; // no run-time type info
if (String.IsNullOrEmpty(ClangPath))
{
// GCC only option
Result += " -fno-strict-aliasing";
Result += " -Wno-sign-compare"; // needed to suppress: comparison between signed and unsigned integer expressions
Result += " -Wno-enum-compare"; // Stats2.h triggers this (ALIGNOF(int64) <= DATA_ALIGN)
Result += " -Wno-return-type"; // Variant.h triggers this
Result += " -Wno-unused-local-typedefs";
Result += " -Wno-multichar";
Result += " -Wno-unused-but-set-variable";
Result += " -Wno-strict-overflow"; // Array.h:518
}
else
{
// Clang only options
if (CrossCompiling())
{
Result += " -fdiagnostics-format=msvc"; // make diagnostics compatible with MSVC when cross-compiling
}
Result += " -Wno-unused-private-field"; // MultichannelTcpSocket.h triggers this, possibly more
// this hides the "warning : comparison of unsigned expression < 0 is always false" type warnings due to constant comparisons, which are possible with template arguments
Result += " -Wno-tautological-compare";
// this switch is understood by clang 3.5.0, but not clang-3.5 as packaged by Ubuntu 14.04 atm
if (CompilerVersionGreaterOrEqual(3, 5, 0))
{
Result += " -Wno-undefined-bool-conversion"; // hides checking if 'this' pointer is null
}
if (CompilerVersionGreaterOrEqual(3, 6, 0))
{
Result += " -Wno-unused-local-typedef"; // clang is being overly strict here? PhysX headers trigger this.
Result += " -Wno-inconsistent-missing-override"; // these have to be suppressed for UE 4.8, should be fixed later.
}
}
Result += " -Wno-unused-variable";
// this will hide the warnings about static functions in headers that aren't used in every single .cpp file
Result += " -Wno-unused-function";
// this hides the "enumeration value 'XXXXX' not handled in switch [-Wswitch]" warnings - we should maybe remove this at some point and add UE_LOG(, Fatal, ) to default cases
Result += " -Wno-switch";
Result += " -Wno-unknown-pragmas"; // Slate triggers this (with its optimize on/off pragmas)
// needed to suppress warnings about using offsetof on non-POD types.
Result += " -Wno-invalid-offsetof";
// we use this feature to allow static FNames.
Result += " -Wno-gnu-string-literal-operator-template";
if (CompileEnvironment.Config.bEnableShadowVariableWarning)
{
Result += " -Wshadow" + (BuildConfiguration.bShadowVariableErrors ? "" : " -Wno-error=shadow");
}
//Result += " -DOPERATOR_NEW_INLINE=FORCENOINLINE";
// shipping builds will cause this warning with "ensure", so disable only in those case
if (CompileEnvironment.Config.Target.Configuration == CPPTargetConfiguration.Shipping)
{
Result += " -Wno-unused-value";
Result += " -fomit-frame-pointer";
}
// switches to help debugging
else if (CompileEnvironment.Config.Target.Configuration == CPPTargetConfiguration.Debug)
{
Result += " -fno-inline"; // disable inlining for better debuggability (e.g. callstacks, "skip file" in gdb)
Result += " -fno-omit-frame-pointer"; // force not omitting fp
Result += " -fstack-protector"; // detect stack smashing
//Result += " -fsanitize=address"; // detect address based errors (support properly and link to libasan)
}
// debug info
// bCreateDebugInfo is normally set for all configurations, including Shipping - this is needed to enable callstack in Shipping builds (proper resolution: UEPLAT-205, separate files with debug info)
if (CompileEnvironment.Config.bCreateDebugInfo)
{
// libdwarf (from elftoolchain 0.6.1) doesn't support DWARF4
Result += " -gdwarf-3";
}
// optimization level
if (CompileEnvironment.Config.Target.Configuration == CPPTargetConfiguration.Debug)
{
Result += " -O0";
}
else
{
Result += " -O2"; // warning: as of now (2014-09-28), clang 3.5.0 miscompiles PlatformerGame with -O3 (bitfields?)
}
if (CompileEnvironment.Config.bIsBuildingDLL)
{
Result += " -fPIC";
// Use local-dynamic TLS model. This generates less efficient runtime code for __thread variables, but avoids problems of running into
// glibc/ld.so limit (DTV_SURPLUS) for number of dlopen()'ed DSOs with static TLS (see e.g. https://www.cygwin.com/ml/libc-help/2013-11/msg00033.html)
Result += " -ftls-model=local-dynamic";
}
if (CompileEnvironment.Config.bEnableExceptions || UEBuildConfiguration.bForceEnableExceptions)
{
Result += " -fexceptions";
Result += " -DPLATFORM_EXCEPTIONS_DISABLED=0";
}
else
{
Result += " -fno-exceptions"; // no exceptions
Result += " -DPLATFORM_EXCEPTIONS_DISABLED=1";
}
//Result += " -v"; // for better error diagnosis
Result += ArchitectureSpecificDefines(CompileEnvironment.Config.Target.Architecture);
if (CrossCompiling())
{
if (UsingClang())
{
Result += String.Format(" -target {0}", CompileEnvironment.Config.Target.Architecture); // Set target triple
}
Result += String.Format(" --sysroot=\"{0}\"", BaseLinuxPath);
}
return Result;
}
/// <summary>
/// Sanitizes a definition argument if needed.
/// </summary>
/// <param name="definition">A string in the format "foo=bar".</param>
/// <returns></returns>
internal static string EscapeArgument(string definition)
{
string[] splitData = definition.Split('=');
string myKey = splitData.ElementAtOrDefault(0);
string myValue = splitData.ElementAtOrDefault(1);
if (string.IsNullOrEmpty(myKey)) { return ""; }
if (!string.IsNullOrEmpty(myValue))
{
if (!myValue.StartsWith("\"") && (myValue.Contains(" ") || myValue.Contains("$")))
{
myValue = myValue.Trim('\"'); // trim any leading or trailing quotes
myValue = "\"" + myValue + "\""; // ensure wrap string with double quotes
}
// replace double quotes to escaped double quotes if exists
myValue = myValue.Replace("\"", "\\\"");
}
return myValue == null
? string.Format("{0}", myKey)
: string.Format("{0}={1}", myKey, myValue);
}
static string GetCompileArguments_CPP()
{
string Result = "";
Result += " -x c++";
Result += " -std=c++11";
return Result;
}
static string GetCompileArguments_C()
{
string Result = "";
Result += " -x c";
return Result;
}
static string GetCompileArguments_MM()
{
string Result = "";
Result += " -x objective-c++";
Result += " -fobjc-abi-version=2";
Result += " -fobjc-legacy-dispatch";
Result += " -fno-rtti";
Result += " -std=c++11";
return Result;
}
static string GetCompileArguments_M()
{
string Result = "";
Result += " -x objective-c";
Result += " -fobjc-abi-version=2";
Result += " -fobjc-legacy-dispatch";
Result += " -std=c++11";
return Result;
}
static string GetCompileArguments_PCH()
{
string Result = "";
Result += " -x c++-header";
Result += " -std=c++11";
return Result;
}
static string GetLinkArguments(LinkEnvironment LinkEnvironment)
{
string Result = "";
// 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.Config.bIsBuildingDLL)
{
Result += " -shared";
}
else
{
// ignore unresolved symbols in shared libs
Result += string.Format(" -Wl,--unresolved-symbols=ignore-in-shared-libs");
}
// RPATH for third party libs
Result += " -Wl,-rpath=${ORIGIN}";
Result += " -Wl,-rpath-link=${ORIGIN}";
Result += " -Wl,-rpath=${ORIGIN}/../../../Engine/Binaries/Linux";
Result += " -Wl,-rpath=${ORIGIN}/.."; // for modules that are in sub-folders of the main Engine/Binary/Linux folder
// FIXME: really ugly temp solution. Modules need to be able to specify this
Result += " -Wl,-rpath=${ORIGIN}/../../../Engine/Binaries/ThirdParty/ICU/icu4c-53_1/Linux/x86_64-unknown-linux-gnu";
Result += " -Wl,-rpath=${ORIGIN}/../../../Engine/Binaries/ThirdParty/Steamworks/Steamv132/Linux";
// Some OS ship ld with new ELF dynamic tags, which use DT_RUNPATH vs DT_RPATH. Since DT_RUNPATH do not propagate to dlopen()ed DSOs,
// this breaks the editor on such systems. See https://kenai.com/projects/maxine/lists/users/archive/2011-01/message/12 for details
Result += " -Wl,--disable-new-dtags";
if (CrossCompiling())
{
if (UsingClang())
{
Result += String.Format(" -target {0}", LinkEnvironment.Config.Target.Architecture); // Set target triple
}
string SysRootPath = BaseLinuxPath.TrimEnd(new char[] { '\\', '/' });
Result += String.Format(" \"--sysroot={0}\"", SysRootPath);
}
return Result;
}
static string GetArchiveArguments(LinkEnvironment LinkEnvironment)
{
return " rc";
}
public static void CrossCompileOutputReceivedDataEventHandler(Object Sender, DataReceivedEventArgs e)
{
Debug.Assert(CrossCompiling());
string Output = e.Data;
if (String.IsNullOrEmpty(Output))
{
return;
}
// format the string so the output errors are clickable in Visual Studio
// Need to match following for clickable links
string RegexFilePath = @"^[A-Z]\:([\\\/][A-Za-z0-9_\-\.]*)+\.(cpp|c|mm|m|hpp|h)";
string RegexLineNumber = @"\:\d+\:\d+\:";
string RegexDescription = @"(\serror:\s|\swarning:\s|\snote:\s).*";
// Get Matches
string MatchFilePath = Regex.Match(Output, RegexFilePath).Value.Replace("Engine\\Source\\..\\..\\", "");
string MatchLineNumber = Regex.Match(Output, RegexLineNumber).Value;
string MatchDescription = Regex.Match(Output, RegexDescription).Value;
// If any of the above matches failed, do nothing
if (MatchFilePath.Length == 0 ||
MatchLineNumber.Length == 0 ||
MatchDescription.Length == 0)
{
Console.WriteLine(Output);
return;
}
// Convert Path
string RegexStrippedPath = @"\\Engine\\.*"; //@"(Engine\/|[A-Za-z0-9_\-\.]*\/).*";
string ConvertedFilePath = Regex.Match(MatchFilePath, RegexStrippedPath).Value;
ConvertedFilePath = Path.GetFullPath("..\\.." + ConvertedFilePath);
// Extract Line + Column Number
string ConvertedLineNumber = Regex.Match(MatchLineNumber, @"\d+").Value;
string ConvertedColumnNumber = Regex.Match(MatchLineNumber, @"(?<=:\d+:)\d+").Value;
// Write output
string ConvertedExpression = " " + ConvertedFilePath + "(" + ConvertedLineNumber + "," + ConvertedColumnNumber + "):" + MatchDescription;
Console.WriteLine(ConvertedExpression); // To create clickable vs link
}
// cache the location of NDK tools
static string BaseLinuxPath;
static string ClangPath;
static string GCCPath;
static string ArPath;
static string RanlibPath;
static string StripPath;
/// <summary>
/// Version string of the current compiler, whether clang or gcc or whatever
/// </summary>
static string CompilerVersionString;
/// <summary>
/// Major version of the current compiler, whether clang or gcc or whatever
/// </summary>
static int CompilerVersionMajor = -1;
/// <summary>
/// Minor version of the current compiler, whether clang or gcc or whatever
/// </summary>
static int CompilerVersionMinor = -1;
/// <summary>
/// Patch version of the current compiler, whether clang or gcc or whatever
/// </summary>
static int CompilerVersionPatch = -1;
/// <summary>
/// Track which scripts need to be deleted before appending to
/// </summary>
private bool bHasWipedFixDepsScript = false;
private static List<FileItem> BundleDependencies = new List<FileItem>();
public override CPPOutput CompileCPPFiles(UEBuildTarget Target, CPPEnvironment CompileEnvironment, List<FileItem> SourceFiles, string ModuleName)
{
string Arguments = GetCLArguments_Global(CompileEnvironment);
string PCHArguments = "";
if (CompileEnvironment.Config.PrecompiledHeaderAction == PrecompiledHeaderAction.Include)
{
// Add the precompiled header file's path to the include path so Clang can find it.
// This needs to be before the other include paths to ensure Clang uses it instead of the source header file.
var PrecompiledFileExtension = UEBuildPlatform.GetBuildPlatform(UnrealTargetPlatform.Linux).GetBinaryExtension(UEBuildBinaryType.PrecompiledHeader);
PCHArguments += string.Format(" -include \"{0}\"", CompileEnvironment.PrecompiledHeaderFile.AbsolutePath.Replace(PrecompiledFileExtension, ""));
}
// Add include paths to the argument list.
foreach (string IncludePath in CompileEnvironment.Config.CPPIncludeInfo.IncludePaths)
{
Arguments += string.Format(" -I\"{0}\"", IncludePath);
}
foreach (string IncludePath in CompileEnvironment.Config.CPPIncludeInfo.SystemIncludePaths)
{
Arguments += string.Format(" -I\"{0}\"", IncludePath);
}
// Add preprocessor definitions to the argument list.
foreach (string Definition in CompileEnvironment.Config.Definitions)
{
Arguments += string.Format(" -D \"{0}\"", EscapeArgument(Definition));
}
var BuildPlatform = UEBuildPlatform.GetBuildPlatformForCPPTargetPlatform(CompileEnvironment.Config.Target.Platform);
// Create a compile action for each source file.
CPPOutput Result = new CPPOutput();
foreach (FileItem SourceFile in SourceFiles)
{
Action CompileAction = new Action(ActionType.Compile);
string FileArguments = "";
string Extension = Path.GetExtension(SourceFile.AbsolutePath).ToUpperInvariant();
// Add C or C++ specific compiler arguments.
if (CompileEnvironment.Config.PrecompiledHeaderAction == PrecompiledHeaderAction.Create)
{
FileArguments += GetCompileArguments_PCH();
}
else if (Extension == ".C")
{
// Compile the file as C code.
FileArguments += GetCompileArguments_C();
}
else if (Extension == ".CC")
{
// Compile the file as C++ code.
FileArguments += GetCompileArguments_CPP();
}
else if (Extension == ".MM")
{
// Compile the file as Objective-C++ code.
FileArguments += GetCompileArguments_MM();
}
else if (Extension == ".M")
{
// Compile the file as Objective-C code.
FileArguments += GetCompileArguments_M();
}
else
{
FileArguments += GetCompileArguments_CPP();
// only use PCH for .cpp files
FileArguments += PCHArguments;
}
// Add the C++ source file and its included files to the prerequisite item list.
AddPrerequisiteSourceFile(Target, BuildPlatform, CompileEnvironment, SourceFile, CompileAction.PrerequisiteItems);
if (CompileEnvironment.Config.PrecompiledHeaderAction == PrecompiledHeaderAction.Create)
{
var PrecompiledFileExtension = UEBuildPlatform.GetBuildPlatform(UnrealTargetPlatform.Linux).GetBinaryExtension(UEBuildBinaryType.PrecompiledHeader);
// Add the precompiled header file to the produced item list.
FileItem PrecompiledHeaderFile = FileItem.GetItemByFileReference(
FileReference.Combine(
CompileEnvironment.Config.OutputDirectory,
Path.GetFileName(SourceFile.AbsolutePath) + PrecompiledFileExtension
)
);
CompileAction.ProducedItems.Add(PrecompiledHeaderFile);
Result.PrecompiledHeaderFile = PrecompiledHeaderFile;
// Add the parameters needed to compile the precompiled header file to the command-line.
FileArguments += string.Format(" -o \"{0}\"", PrecompiledHeaderFile.AbsolutePath, false);
}
else
{
if (CompileEnvironment.Config.PrecompiledHeaderAction == PrecompiledHeaderAction.Include)
{
CompileAction.bIsUsingPCH = true;
CompileAction.PrerequisiteItems.Add(CompileEnvironment.PrecompiledHeaderFile);
}
var ObjectFileExtension = UEBuildPlatform.GetBuildPlatform(UnrealTargetPlatform.Linux).GetBinaryExtension(UEBuildBinaryType.Object);
// Add the object file to the produced item list.
FileItem ObjectFile = FileItem.GetItemByFileReference(
FileReference.Combine(
CompileEnvironment.Config.OutputDirectory,
Path.GetFileName(SourceFile.AbsolutePath) + ObjectFileExtension
)
);
CompileAction.ProducedItems.Add(ObjectFile);
Result.ObjectFiles.Add(ObjectFile);
FileArguments += string.Format(" -o \"{0}\"", ObjectFile.AbsolutePath, false);
}
// Add the source file path to the command-line.
FileArguments += string.Format(" \"{0}\"", SourceFile.AbsolutePath);
CompileAction.WorkingDirectory = UnrealBuildTool.EngineSourceDirectory.FullName;
if (!UsingClang())
{
CompileAction.CommandPath = GCCPath;
}
else
{
CompileAction.CommandPath = ClangPath;
}
CompileAction.CommandArguments = Arguments + FileArguments + CompileEnvironment.Config.AdditionalArguments;
CompileAction.CommandDescription = "Compile";
CompileAction.StatusDescription = Path.GetFileName(SourceFile.AbsolutePath);
CompileAction.bIsGCCCompiler = true;
// Don't farm out creation of pre-compiled headers as it is the critical path task.
CompileAction.bCanExecuteRemotely =
CompileEnvironment.Config.PrecompiledHeaderAction != PrecompiledHeaderAction.Create ||
BuildConfiguration.bAllowRemotelyCompiledPCHs;
// piping output through the handler during native builds is unnecessary and reportedly causes problems with tools like octobuild.
if (CrossCompiling())
{
CompileAction.OutputEventHandler = new DataReceivedEventHandler(CrossCompileOutputReceivedDataEventHandler);
}
}
return Result;
}
/// <summary>
/// Creates an action to archive all the .o files into single .a file
/// </summary>
public FileItem CreateArchiveAndIndex(LinkEnvironment LinkEnvironment)
{
// Create an archive action
Action ArchiveAction = new Action(ActionType.Link);
ArchiveAction.WorkingDirectory = UnrealBuildTool.EngineSourceDirectory.FullName;
bool bUsingSh = BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Win64 && BuildHostPlatform.Current.Platform != UnrealTargetPlatform.Win32;
if (bUsingSh)
{
ArchiveAction.CommandPath = "/bin/sh";
ArchiveAction.CommandArguments = "-c '";
}
else
{
ArchiveAction.CommandPath = "cmd.exe";
ArchiveAction.CommandArguments = "/c \"";
}
// this will produce a final library
ArchiveAction.bProducesImportLibrary = true;
// Add the output file as a production of the link action.
FileItem OutputFile = FileItem.GetItemByFileReference(LinkEnvironment.Config.OutputFilePath);
ArchiveAction.ProducedItems.Add(OutputFile);
ArchiveAction.CommandDescription = "Archive";
ArchiveAction.StatusDescription = Path.GetFileName(OutputFile.AbsolutePath);
ArchiveAction.CommandArguments += string.Format("\"{0}\" {1} \"{2}\"", GetArPath(LinkEnvironment.Config.Target.Architecture), GetArchiveArguments(LinkEnvironment), OutputFile.AbsolutePath);
// Add the input files to a response file, and pass the response file on the command-line.
List<string> InputFileNames = new List<string>();
foreach (FileItem InputFile in LinkEnvironment.InputFiles)
{
string InputAbsolutePath = InputFile.AbsolutePath.Replace("\\", "/");
InputFileNames.Add(string.Format("\"{0}\"", InputAbsolutePath));
ArchiveAction.PrerequisiteItems.Add(InputFile);
ArchiveAction.CommandArguments += string.Format(" \"{0}\"", InputAbsolutePath);
}
// add ranlib
ArchiveAction.CommandArguments += string.Format(" && \"{0}\" \"{1}\"", GetRanlibPath(LinkEnvironment.Config.Target.Architecture), OutputFile.AbsolutePath);
// Add the additional arguments specified by the environment.
ArchiveAction.CommandArguments += LinkEnvironment.Config.AdditionalArguments;
ArchiveAction.CommandArguments.Replace("\\", "/");
if (bUsingSh)
{
ArchiveAction.CommandArguments += "'";
}
else
{
ArchiveAction.CommandArguments += "\"";
}
// Only execute linking on the local PC.
ArchiveAction.bCanExecuteRemotely = false;
// piping output through the handler during native builds is unnecessary and reportedly causes problems with tools like octobuild.
if (CrossCompiling())
{
ArchiveAction.OutputEventHandler = new DataReceivedEventHandler(CrossCompileOutputReceivedDataEventHandler);
}
return OutputFile;
}
public FileItem FixDependencies(LinkEnvironment LinkEnvironment, FileItem Executable)
{
if (!LinkEnvironment.Config.bIsCrossReferenced)
{
return null;
}
Log.TraceVerbose("Adding postlink step");
bool bUseCmdExe = BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Win64 || BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Win32;
string ShellBinary = bUseCmdExe ? "cmd.exe" : "/bin/sh";
string ExecuteSwitch = bUseCmdExe ? " /C" : ""; // avoid -c so scripts don't need +x
string ScriptName = bUseCmdExe ? "FixDependencies.bat" : "FixDependencies.sh";
FileItem FixDepsScript = FileItem.GetItemByFileReference(FileReference.Combine(LinkEnvironment.Config.LocalShadowDirectory, ScriptName));
Action PostLinkAction = new Action(ActionType.Link);
PostLinkAction.WorkingDirectory = UnrealBuildTool.EngineSourceDirectory.FullName;
PostLinkAction.CommandPath = ShellBinary;
PostLinkAction.StatusDescription = string.Format("{0}", Path.GetFileName(Executable.AbsolutePath));
PostLinkAction.CommandDescription = "FixDeps";
PostLinkAction.bCanExecuteRemotely = false;
PostLinkAction.CommandArguments = ExecuteSwitch;
PostLinkAction.CommandArguments += bUseCmdExe ? " \"" : " -c '";
FileItem OutputFile = FileItem.GetItemByFileReference(FileReference.Combine(LinkEnvironment.Config.LocalShadowDirectory, Path.GetFileNameWithoutExtension(Executable.AbsolutePath) + ".link"));
// Make sure we don't run this script until the all executables and shared libraries
// have been built.
PostLinkAction.PrerequisiteItems.Add(Executable);
foreach (FileItem Dependency in BundleDependencies)
{
PostLinkAction.PrerequisiteItems.Add(Dependency);
}
PostLinkAction.CommandArguments += ShellBinary + ExecuteSwitch + " \"" + FixDepsScript.AbsolutePath + "\" && ";
string Touch = bUseCmdExe ? "echo \"\" >> \"{0}\" && copy /b \"{0}\" +,," : "touch \"{0}\"";
PostLinkAction.CommandArguments += String.Format(Touch, OutputFile.AbsolutePath);
PostLinkAction.CommandArguments += bUseCmdExe ? "\"" : "'";
System.Console.WriteLine("{0} {1}", PostLinkAction.CommandPath, PostLinkAction.CommandArguments);
// piping output through the handler during native builds is unnecessary and reportedly causes problems with tools like octobuild.
if (CrossCompiling())
{
PostLinkAction.OutputEventHandler = new DataReceivedEventHandler(CrossCompileOutputReceivedDataEventHandler);
}
PostLinkAction.ProducedItems.Add(OutputFile);
return OutputFile;
}
public override FileItem LinkFiles(LinkEnvironment LinkEnvironment, bool bBuildImportLibraryOnly)
{
Debug.Assert(!bBuildImportLibraryOnly);
List<string> RPaths = new List<string>();
if (LinkEnvironment.Config.bIsBuildingLibrary || bBuildImportLibraryOnly)
{
return CreateArchiveAndIndex(LinkEnvironment);
}
// Create an action that invokes the linker.
Action LinkAction = new Action(ActionType.Link);
LinkAction.WorkingDirectory = UnrealBuildTool.EngineSourceDirectory.FullName;
if (String.IsNullOrEmpty(ClangPath))
{
LinkAction.CommandPath = GCCPath;
}
else
{
LinkAction.CommandPath = ClangPath;
}
// Get link arguments.
LinkAction.CommandArguments = GetLinkArguments(LinkEnvironment);
// Tell the action that we're building an import library here and it should conditionally be
// ignored as a prerequisite for other actions
LinkAction.bProducesImportLibrary = LinkEnvironment.Config.bIsBuildingDLL;
// Add the output file as a production of the link action.
FileItem OutputFile = FileItem.GetItemByFileReference(LinkEnvironment.Config.OutputFilePath);
LinkAction.ProducedItems.Add(OutputFile);
LinkAction.CommandDescription = "Link";
LinkAction.StatusDescription = Path.GetFileName(OutputFile.AbsolutePath);
// Add the output file to the command-line.
LinkAction.CommandArguments += string.Format(" -o \"{0}\"", OutputFile.AbsolutePath);
// Add the input files to a response file, and pass the response file on the command-line.
List<string> InputFileNames = new List<string>();
foreach (FileItem InputFile in LinkEnvironment.InputFiles)
{
InputFileNames.Add(string.Format("\"{0}\"", InputFile.AbsolutePath.Replace("\\", "/")));
LinkAction.PrerequisiteItems.Add(InputFile);
}
FileReference ResponseFileName = GetResponseFileName(LinkEnvironment, OutputFile);
LinkAction.CommandArguments += string.Format(" -Wl,@\"{0}\"", ResponseFile.Create(ResponseFileName, InputFileNames));
if (LinkEnvironment.Config.bIsBuildingDLL)
{
LinkAction.CommandArguments += string.Format(" -Wl,-soname={0}", OutputFile);
}
// Start with the configured LibraryPaths and also add paths to any libraries that
// we depend on (libraries that we've build ourselves).
List<string> AllLibraryPaths = LinkEnvironment.Config.LibraryPaths;
foreach (string AdditionalLibrary in LinkEnvironment.Config.AdditionalLibraries)
{
string PathToLib = Path.GetDirectoryName(AdditionalLibrary);
if (!String.IsNullOrEmpty(PathToLib))
{
// make path absolute, because FixDependencies script may be executed in a different directory
string AbsolutePathToLib = Path.GetFullPath(PathToLib);
if (!AllLibraryPaths.Contains(AbsolutePathToLib))
{
AllLibraryPaths.Add(AbsolutePathToLib);
}
}
if ((AdditionalLibrary.Contains("Plugins") || AdditionalLibrary.Contains("Binaries/ThirdParty") || AdditionalLibrary.Contains("Binaries\\ThirdParty")) && Path.GetDirectoryName(AdditionalLibrary) != Path.GetDirectoryName(OutputFile.AbsolutePath))
{
string RelativePath = Utils.MakePathRelativeTo(Path.GetDirectoryName(AdditionalLibrary), Path.GetDirectoryName(OutputFile.AbsolutePath));
if (!RPaths.Contains(RelativePath))
{
RPaths.Add(RelativePath);
LinkAction.CommandArguments += string.Format(" -Wl,-rpath=\"${{ORIGIN}}/{0}\"", RelativePath);
}
}
}
LinkAction.CommandArguments += string.Format(" -Wl,-rpath-link=\"{0}\"", Path.GetDirectoryName(OutputFile.AbsolutePath));
// Add the library paths to the argument list.
foreach (string LibraryPath in AllLibraryPaths)
{
// use absolute paths because of FixDependencies script again
LinkAction.CommandArguments += string.Format(" -L\"{0}\"", Path.GetFullPath(LibraryPath));
}
// add libraries in a library group
LinkAction.CommandArguments += string.Format(" -Wl,--start-group");
List<string> EngineAndGameLibraries = new List<string>();
foreach (string AdditionalLibrary in LinkEnvironment.Config.AdditionalLibraries)
{
if (String.IsNullOrEmpty(Path.GetDirectoryName(AdditionalLibrary)))
{
// library was passed just like "jemalloc", turn it into -ljemalloc
LinkAction.CommandArguments += string.Format(" -l{0}", AdditionalLibrary);
}
else if (Path.GetExtension(AdditionalLibrary) == ".a")
{
// static library passed in, pass it along but make path absolute, because FixDependencies script may be executed in a different directory
string AbsoluteAdditionalLibrary = Path.GetFullPath(AdditionalLibrary);
if (AbsoluteAdditionalLibrary.Contains(" "))
{
AbsoluteAdditionalLibrary = string.Format("\"{0}\"", AbsoluteAdditionalLibrary);
}
LinkAction.CommandArguments += (" " + AbsoluteAdditionalLibrary);
LinkAction.PrerequisiteItems.Add(FileItem.GetItemByPath(AdditionalLibrary));
}
else
{
// Skip over full-pathed library dependencies when building DLLs to avoid circular
// dependencies.
FileItem LibraryDependency = FileItem.GetItemByPath(AdditionalLibrary);
var LibName = Path.GetFileNameWithoutExtension(AdditionalLibrary);
if (LibName.StartsWith("lib"))
{
// Remove lib prefix
LibName = LibName.Remove(0, 3);
}
string LibLinkFlag = string.Format(" -l{0}", LibName);
if (LinkEnvironment.Config.bIsBuildingDLL && LinkEnvironment.Config.bIsCrossReferenced)
{
// We are building a cross referenced DLL so we can't actually include
// dependencies at this point. Instead we add it to the list of
// libraries to be used in the FixDependencies step.
EngineAndGameLibraries.Add(LibLinkFlag);
if (!LinkAction.CommandArguments.Contains("--allow-shlib-undefined"))
{
LinkAction.CommandArguments += string.Format(" -Wl,--allow-shlib-undefined");
}
}
else
{
LinkAction.PrerequisiteItems.Add(LibraryDependency);
LinkAction.CommandArguments += LibLinkFlag;
}
}
}
LinkAction.CommandArguments += " -lrt"; // needed for clock_gettime()
LinkAction.CommandArguments += " -lm"; // math
// libc++ and its abi lib
LinkAction.CommandArguments += " -nodefaultlibs";
LinkAction.CommandArguments += " -L" + UEBuildConfiguration.UEThirdPartySourceDirectory + "Linux/LibCxx/lib/Linux/" + LinkEnvironment.Config.Target.Architecture + "/";
LinkAction.CommandArguments += " " + UEBuildConfiguration.UEThirdPartySourceDirectory + "Linux/LibCxx/lib/Linux/" + LinkEnvironment.Config.Target.Architecture + "/libc++.a";
LinkAction.CommandArguments += " " + UEBuildConfiguration.UEThirdPartySourceDirectory + "Linux/LibCxx/lib/Linux/" + LinkEnvironment.Config.Target.Architecture + "/libc++abi.a";
LinkAction.CommandArguments += " -lm";
LinkAction.CommandArguments += " -lc";
LinkAction.CommandArguments += " -lgcc_s";
LinkAction.CommandArguments += " -lgcc";
LinkAction.CommandArguments += " -Wl,--end-group";
// these can be helpful for understanding the order of libraries or library search directories
//LinkAction.CommandArguments += " -Wl,--verbose";
//LinkAction.CommandArguments += " -Wl,--trace";
//LinkAction.CommandArguments += " -v";
// Add the additional arguments specified by the environment.
LinkAction.CommandArguments += LinkEnvironment.Config.AdditionalArguments;
LinkAction.CommandArguments = LinkAction.CommandArguments.Replace("\\\\", "/");
LinkAction.CommandArguments = LinkAction.CommandArguments.Replace("\\", "/");
// prepare a linker script
FileReference LinkerScriptPath = FileReference.Combine(LinkEnvironment.Config.LocalShadowDirectory, "remove-sym.ldscript");
if (!LinkEnvironment.Config.LocalShadowDirectory.Exists())
{
LinkEnvironment.Config.LocalShadowDirectory.CreateDirectory();
}
if (LinkerScriptPath.Exists())
{
LinkerScriptPath.Delete();
}
using (StreamWriter Writer = File.CreateText(LinkerScriptPath.FullName))
{
Writer.WriteLine("UE4 {");
Writer.WriteLine(" global: *;");
Writer.WriteLine(" local: _Znwm;");
Writer.WriteLine(" _ZnwmRKSt9nothrow_t;");
Writer.WriteLine(" _Znam;");
Writer.WriteLine(" _ZnamRKSt9nothrow_t;");
Writer.WriteLine(" _ZdaPv;");
Writer.WriteLine(" _ZdaPvRKSt9nothrow_t;");
Writer.WriteLine(" _ZdlPv;");
Writer.WriteLine(" _ZdlPvRKSt9nothrow_t;");
// Hide ALL std:: symbols as they can collide
// with any c++ library out there (like LLVM)
// and this may lead to operator new/delete mismatches
Writer.WriteLine(" _ZNSt8*;");
// Hide OpenSSL symbols as they can collide with Steam runtime.
// @todo: hide all Steam runtime symbols
Writer.WriteLine(" DH_OpenSSL;");
Writer.WriteLine(" DSA_OpenSSL;");
Writer.WriteLine(" DSO_METHOD_openssl;");
Writer.WriteLine(" ECDH_OpenSSL;");
Writer.WriteLine(" ECDSA_OpenSSL;");
Writer.WriteLine(" OPENSSL_add_all_algorithms_noconf;");
Writer.WriteLine(" OpenSSL_add_all_ciphers;");
Writer.WriteLine(" OpenSSL_add_all_digests;");
Writer.WriteLine(" OPENSSL_asc2uni;");
Writer.WriteLine(" OPENSSL_atomic_add;");
Writer.WriteLine(" OPENSSL_cleanse;");
Writer.WriteLine(" OPENSSL_DIR_end;");
Writer.WriteLine(" OPENSSL_DIR_read;");
Writer.WriteLine(" openssl_dsa_meth;");
Writer.WriteLine(" openssl_ecdh_meth;");
Writer.WriteLine(" openssl_ecdsa_meth;");
Writer.WriteLine(" OPENSSL_gmtime;");
Writer.WriteLine(" OPENSSL_gmtime_adj;");
Writer.WriteLine(" OPENSSL_gmtime_diff;");
Writer.WriteLine(" OPENSSL_ia32_cpuid;");
Writer.WriteLine(" OPENSSL_ia32_rdrand;");
Writer.WriteLine(" OPENSSL_ia32_rdseed;");
Writer.WriteLine(" OPENSSL_ia32cap_loc;");
Writer.WriteLine(" OPENSSL_ia32cap_P;");
Writer.WriteLine(" OPENSSL_init;");
Writer.WriteLine(" OPENSSL_isservice;");
Writer.WriteLine(" OPENSSL_issetugid;");
Writer.WriteLine(" OPENSSL_load_builtin_modules;");
Writer.WriteLine(" OPENSSL_NONPIC_relocated;");
Writer.WriteLine(" OPENSSL_rdtsc;");
Writer.WriteLine(" OPENSSL_showfatal;");
Writer.WriteLine(" OPENSSL_stderr;");
Writer.WriteLine(" OPENSSL_uni2asc;");
Writer.WriteLine(" OPENSSL_wipe_cpu;");
Writer.WriteLine(" OpenSSLDie;");
Writer.WriteLine(" ui_openssl;");
Writer.WriteLine(" UI_OpenSSL;");
Writer.WriteLine("};");
};
LinkAction.CommandArguments += string.Format(" -Wl,--version-script=\"{0}\"", LinkerScriptPath);
// Only execute linking on the local PC.
LinkAction.bCanExecuteRemotely = false;
// Prepare a script that will run later, once all shared libraries and the executable
// are created. This script will be called by action created in FixDependencies()
if (LinkEnvironment.Config.bIsCrossReferenced && LinkEnvironment.Config.bIsBuildingDLL)
{
bool bUseCmdExe = BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Win64 || BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Win32;
string ScriptName = bUseCmdExe ? "FixDependencies.bat" : "FixDependencies.sh";
string FixDepsScriptPath = Path.Combine(LinkEnvironment.Config.LocalShadowDirectory.FullName, ScriptName);
if (!bHasWipedFixDepsScript)
{
bHasWipedFixDepsScript = true;
Log.TraceVerbose("Creating script: {0}", FixDepsScriptPath);
StreamWriter Writer = File.CreateText(FixDepsScriptPath);
if (bUseCmdExe)
{
Writer.Write("@echo off\n");
Writer.Write("rem Automatically generated by UnrealBuildTool\n");
Writer.Write("rem *DO NOT EDIT*\n\n");
}
else
{
Writer.Write("#!/bin/sh\n");
Writer.Write("# Automatically generated by UnrealBuildTool\n");
Writer.Write("# *DO NOT EDIT*\n\n");
Writer.Write("set -o errexit\n");
}
Writer.Close();
}
StreamWriter FixDepsScript = File.AppendText(FixDepsScriptPath);
string EngineAndGameLibrariesString = "";
foreach (string Library in EngineAndGameLibraries)
{
EngineAndGameLibrariesString += Library;
}
FixDepsScript.Write(string.Format("echo Fixing {0}\n", Path.GetFileName(OutputFile.AbsolutePath)));
if (!bUseCmdExe)
{
FixDepsScript.Write(string.Format("TIMESTAMP=`stat --format %y \"{0}\"`\n", OutputFile.AbsolutePath));
}
string FixDepsLine = LinkAction.CommandPath + " " + LinkAction.CommandArguments;
string Replace = "-Wl,--allow-shlib-undefined";
FixDepsLine = FixDepsLine.Replace(Replace, EngineAndGameLibrariesString);
string OutputFileForwardSlashes = OutputFile.AbsolutePath.Replace("\\", "/");
FixDepsLine = FixDepsLine.Replace(OutputFileForwardSlashes, OutputFileForwardSlashes + ".fixed");
FixDepsLine = FixDepsLine.Replace("$", "\\$");
FixDepsScript.Write(FixDepsLine + "\n");
if (bUseCmdExe)
{
FixDepsScript.Write(string.Format("move /Y \"{0}.fixed\" \"{0}\"\n", OutputFile.AbsolutePath));
}
else
{
FixDepsScript.Write(string.Format("mv \"{0}.fixed\" \"{0}\"\n", OutputFile.AbsolutePath));
FixDepsScript.Write(string.Format("touch -d \"$TIMESTAMP\" \"{0}\"\n\n", OutputFile.AbsolutePath));
}
FixDepsScript.Close();
}
if (CrossCompiling())
{
LinkAction.OutputEventHandler = new DataReceivedEventHandler(CrossCompileOutputReceivedDataEventHandler);
}
return OutputFile;
}
public override void CompileCSharpProject(CSharpEnvironment CompileEnvironment, FileReference ProjectFileName, FileReference DestinationFile)
{
throw new BuildException("Linux cannot compile C# files");
}
public override void SetupBundleDependencies(List<UEBuildBinary> Binaries, string GameName)
{
foreach (UEBuildBinary Binary in Binaries)
{
BundleDependencies.Add(FileItem.GetItemByFileReference(Binary.Config.OutputFilePath));
}
}
/// <summary>
/// Converts the passed in path from UBT host to compiler native format.
/// </summary>
public override string ConvertPath(string OriginalPath)
{
if (BuildHostPlatform.Current.Platform == UnrealTargetPlatform.Linux)
{
return OriginalPath.Replace("\\", "/");
}
else
{
return OriginalPath;
}
}
public override ICollection<FileItem> PostBuild(FileItem Executable, LinkEnvironment BinaryLinkEnvironment)
{
var OutputFiles = base.PostBuild(Executable, BinaryLinkEnvironment);
if (BinaryLinkEnvironment.Config.bIsBuildingDLL || BinaryLinkEnvironment.Config.bIsBuildingLibrary)
{
return OutputFiles;
}
FileItem FixDepsOutputFile = FixDependencies(BinaryLinkEnvironment, Executable);
if (FixDepsOutputFile != null)
{
OutputFiles.Add(FixDepsOutputFile);
}
return OutputFiles;
}
public override void StripSymbols(string SourceFileName, string TargetFileName)
{
File.Copy(SourceFileName, TargetFileName, true);
ProcessStartInfo StartInfo = new ProcessStartInfo();
StartInfo.FileName = GetStripPath(PlatformContext.GetActiveArchitecture());
StartInfo.Arguments = "--strip-debug \"" + TargetFileName + "\"";
StartInfo.UseShellExecute = false;
StartInfo.CreateNoWindow = true;
Utils.RunLocalProcessAndLogOutput(StartInfo);
}
}
}