Commit Graph

8 Commits

Author SHA1 Message Date
Mike Fricker
47381d84ea UnrealBuildTool: Cleaning up UBT Makefile support in preparation for wide testing
- Collapsed and renamed some of the new UBT settings for fast build iteration
- New 'BuildConfiguration.bUseUBTMakefiles' that replaces the old experimental settings (defaults to off in this changelist.)
- Cleaned up some comments
- No effective changes

[CL 2400071 by Mike Fricker in Main branch]
2015-01-07 14:16:46 -05:00
Ben Marsh
149375b14b Update copyright notices to 2015.
[CL 2379638 by Ben Marsh in Main branch]
2014-12-07 19:09:38 -05:00
Mikolaj Sieluzycki
176498455f Fix UBT file dependency mismatch on case insensitive filesystems.
https://udn.unrealengine.com/questions/222717/unrealbuildtool-file-dependency-mismatch.html#answer-222848
https://answers.unrealengine.com/questions/108671/rebuilding-engine-when-creating-first-project.html
#codereview Robert.Manuszewski

[CL 2331715 by Mikolaj Sieluzycki in Main branch]
2014-10-16 11:38:08 -04:00
Mike Fricker
0031e06f21 Experimental UnrealBuildTool makefile support
UnrealBuildTool 'Makefiles' allow for very fast iterative builds.
    - New BuildConfiguration.xml setting added: "bUseExperimentalFastBuildIteration"   (disabled by default)
    - Turning this on causes Unreal Build Tool to emit 'UBT Makefiles' for targets when they're built the first time.
    - Subsequent builds will load these Makefiles and begin outdatedness checking and build invocation very quickly.
    - The caveat is that if source files are added or removed to the project, UBT will need to gather information about those in order for your build to complete successfully.
    - Currently, you must run the project file generator after adding/removing source files to tell UBT to re-gather this information.
    - Events that can invalidate the 'UBT Makefile':
           - Adding/removing .cpp files
           - Adding/removing .h files with UObjects
           - Adding new UObject types to a file that didn't previously have any
           - Changing global build settings (most settings in this file qualify.)
           - Changed code that affects how Unreal Header Tool works
    - You can force regeneration of the 'UBT Makefile' by passing the '-Gather' argument, or simply regenerating project files
    - New command-line parameters added:
           - "-Gather": Tells UBT to always perform the gather step (slower but will catch project structural changes)
           - "-NoGather": Disables the gather step, unless UBT detects that it must be done.  This is the default when bUseExperimentalFastBuildIteration is enabled
           - "-GatherOnly": Runs the gather step and saves a UBTMakefile, but doesn't build anything
           - "-Assemble": Tells UBT to also assemble build products.  This always defaults to enabled
           - "-NoAssemble": Tells UBT to skip the assemble step, whether we gathered build products or not
           - "-AssembleOnly": Tells UBT to only assemble build products and not to gather, unless UBT determines it must

Other changes:
- UBT now keeps track of which targets it was building in an intermediate file, to help it invalidate cached includes in subsequent runs when the targets are different
- C++ includes are now stored in a class separate from the C++ compile enviroment (for easier serialization)
- The method that UBT uses to find the CoreUObject module timestamp was rewritten
- Various '@todo ubtmake' comments added to tag possible remaining Makefile tasks
- The 'FileItem' class had some member variable comments and code cleaned up, while making it serializable
- Cleaned up the comments and member variables in the "Action" class, while making it serializable
- Some UBT classes are now "serializable".  This is because we need to store the data in UBTMakefiles.
- Removed support for Actions to tinker with Stdout and Stderror (was not used for anything)
- Moved PrecompileHeaderEnvironment class to the UEBuildModule.cs source file
- Plugin intermediate include directories are now selected on demand rather than cached early
- Toolchain code for gathering prerequisite headers is now shared in a single function (AddPrerequisiteSourceFile)
- Removed Action.StatusDetailedDescription, was not used for anything
- Removed UEBuildConfiguration.bExcludePlugins, was not used for anything
- Removed ECompilationResult.FailedDueToHeaderChange, was not used for anything

[CL 2254472 by Mike Fricker in Main branch]
2014-08-13 08:17:43 -04:00
Mike Fricker
80f6dc9362 UnrealBuildTool: Experimental fast C++ include dependency scanning
- Adds experimental super-fast C++ outdated file checking
- This feature is turned off for now as we continue to test and improve it
      - You can try it out by enabling "bUseExperimentalFastDependencyScan" option in your BuildConfiguration.xml
- Here is the basic idea:
     - We no longer exhaustively scan all includes and build up a big graph every invocation
     - Instead, source files whose build products are missing have their includes scanned asynchronously while being compiled
     - The flat list of dependent includes for every outdated C++ is saved into a new cache file ("FlatCPPIncludes.bin")
     - On the next run, we quickly load that up and "just know" which files to check timestamps on to determine what is out of date
- Lots of "@todo fastubt" comments were added to UnrealBuildTool for potential performance optimizations and further improvements on this feature.

UnrealBuildTool: Determination of which modules have UObjects is now faster
- We now cache which modules have UObjects and load those for the next session

UnrealBuildTool: Module "shared" precompiled header determination is now much faster
- We no longer scan all C++ includes for a module to figure out which "shared" PCH to use
- Instead, we use the module dependencies specified in the module's *.Build.cs file
- For example, if your module depends on "Engine" and "UnrealEd", we choose "UnrealEd"'s shared PCH

Other UBT optimizations:
- Reduced calls to string formatting functions when setting up API definitions for all modules
- Added new performance diagnostics when bPrintPerformanceInfo is enabled in BuildConfiguration.xml
- We no longer check for "external" headers when scanning includes (this code didn't work at all)
- Optimized CleanDirectorySeparators() utility function to avoid string copies

Fixed UnrealBuildTool not saving DependencyCache under a platform-named folder

[CL 2238266 by Mike Fricker in Main branch]
2014-07-31 09:34:11 -04:00
Mike Fricker
120b80ad3d Removed obsoleted UObject source file checking code
- This hasn't been needed for a few months, since the new GetUHTModuleInfo() implementation

[CL 2223479 by Mike Fricker in Main branch]
2014-07-18 10:25:51 -04:00
Steve Robb
8d7fb2159a Fix for UTF-8-encoded files written by UBT.
#fix FileItem.CreateIntermediateTextFile now creates the text file in UTF-8 if the contents string contains non-ASCII characters.
#change ResponseFile.Create now calls FileItem.CreateIntermediateTextFile.

This fix was made in relation to TTP# 334906, even though that problem was not fixed in the end.

#codereview robert.manuszewski

[CL 2075498 by Steve Robb in Main branch]
2014-05-16 09:52:22 -04:00
Tim Sweeney
324683ce78 Engine source (Main branch up to CL 2026164) 2014-03-14 14:13:41 -04:00