Commit Graph

207 Commits

Author SHA1 Message Date
avudnez
ed061d2ae4 PR #10269: Add TargetRules.bWarnAboutMonolithicHeadersIncluded to control UE_IS_? (Contributed by avudnez)
#preflight 6419e728bb1320be412c3fbd

[CL 24734730 by avudnez in ue5-main branch]
2023-03-21 13:24:47 -04:00
Joe Kirchoff
0846b9bf69 UnrealBuildTool: Only -SingleFile compile files if they are included in the target. Requires storing the header list in the makefile
#rnx
#rb Josh.Adams
#rb Henril.Karlsson
#preflight 64125819bf53fdee19bbc593

[CL 24665702 by Joe Kirchoff in ue5-main branch]
2023-03-15 20:07:14 -04:00
joe kirchoff
88c89989cd UnrealBuildTool: Update -Deterministic to not have a per module setting as this doesn't work due to PCH requirements and instead add a setting to control warning level
#rb Henrik.Karlsson

[CL 24647188 by joe kirchoff in ue5-main branch]
2023-03-14 19:43:44 -04:00
Joe Kirchoff
0ad148be67 UnrealBuildTool: ModuleRules CppStandardVersion should be nullable so we can detect when it's actually overridden
#preflight 64066ea48832f48a4ddaee26

[CL 24532882 by Joe Kirchoff in ue5-main branch]
2023-03-06 18:04:01 -05:00
joe kirchoff
01501efcf9 [Backout] - CL24530832
#fyi Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
UnrealBuildTool: Module CppStandard needs to be overridden if it doesn't match the target, rather than if it doesn't match the default
#preflight 640659f02559570cc77b55ed

[CL 24532448 by joe kirchoff in ue5-main branch]
2023-03-06 17:40:10 -05:00
Joe Kirchoff
d39367f0ef UnrealBuildTool: Module CppStandard needs to be overridden if it doesn't match the target, rather than if it doesn't match the default
#preflight 640659f02559570cc77b55ed

[CL 24530832 by Joe Kirchoff in ue5-main branch]
2023-03-06 16:37:42 -05:00
Josh Adams
864b1270f6 - Skip hidden source files
#preflight 64060c6b2559570cc75368a8
#rb henry.falconer

[CL 24523412 by Josh Adams in ue5-main branch]
2023-03-06 11:07:00 -05:00
Joe Kirchoff
029b190e08 UnrealBuildTool: Allow overriding bWarningsAsErrors on a per module basis
#rb christopher.waters
#preflight 63ff840ca134e0b0590f38a5

[CL 24464453 by Joe Kirchoff in ue5-main branch]
2023-03-01 12:12:31 -05:00
bryan sefcik
a9014116de Replaced the target rule bool "bMergeModuleAndGeneratedUnityFiles" with a list of modules that disable the functionality of merging the module and generated cpp files(DisableMergingModuleAndGeneratedFilesInUnityFiles). The engine modules will depend on merging the module and generated cpp files being in the same unity files very soon so we can't allow turning off the functionality across all the code. This change allows licensees to disable the merging of a specific module if it is needed.
#rb joe.kirchoff
#preflight 63fe7a3c437ce3e7f3b53617

[CL 24453378 by bryan sefcik in ue5-main branch]
2023-02-28 17:39:01 -05:00
bryan sefcik
798f48c9f9 Removed the ability to disable inlining gen.cpp files. The engine code relies on this feature and can't compile without it now.
#fyi joe.kirchoff
#preflight 63fd48de2b1a2765f9a987a5

[CL 24447101 by bryan sefcik in ue5-main branch]
2023-02-28 13:50:14 -05:00
josh adams
4d71aa084a - Fixed .precompiled file location to be architcture independent
- Added IntermediateDirectoryNoArch to UEBuildModule (we can use this in the future to put generated definitions headers, which can help reduce rebuilds going between multi- and single-arch)
#rb Joe.kirchoff
#jira UE-178211,UE-178589
#preflight 63fd3cb72b1a2765f9a46322

[CL 24441385 by josh adams in ue5-main branch]
2023-02-28 09:01:08 -05:00
bryan sefcik
4522523cb7 Fixed a PCH issue when compiling with multiple architectures at the same time.
#preflight 63eebdc13c1eb56f05661567

[CL 24272931 by bryan sefcik in ue5-main branch]
2023-02-16 18:55:59 -05:00
bryan sefcik
7dc0758263 Updated UBT to create the shared PCH instances before setting up the modules so all the PCHs and parent PCHs are setup beforehand.
#preflight 63eeb441977ceed915cb4207
#rb joe.kirchoff

[CL 24272192 by bryan sefcik in ue5-main branch]
2023-02-16 18:31:35 -05:00
bryan sefcik
0ef675123b Possible fix for SNDBS when compiling with PCH chains.
#jira
#rb joe.kirchoff
#preflight 63ed1d817d2ec3d2fd4c3452

[CL 24251837 by bryan sefcik in ue5-main branch]
2023-02-16 02:02:35 -05:00
joe kirchoff
ab11875d50 UnrealBuildTool: Always make a unity file for small modules when enabled unless requested to not do so
#rnx
#rb trivial

[CL 24225341 by joe kirchoff in ue5-main branch]
2023-02-14 20:53:25 -05:00
ben woodhouse
982c48de6a Add support for overriding module optimization mode from a target. This allows game projects to override engine module optimization modes.
Note: This also implicitly disables PCH usage if a private PCH isn't set (this was previously fatal, but we need to be more flexible if we're overriding from the target).

#rb joe.kirchoff

[CL 24225336 by ben woodhouse in ue5-main branch]
2023-02-14 20:53:08 -05:00
bryan sefcik
592942fad7 Added support for Clang PCH chaining
https://clang.llvm.org/docs/PCHInternals.html#chained-precompiled-headers

Linux - EngineTestEditor -allmodules
Before:
Total PCH Size: 3.41 GB

After:
Total PCH Size: 2.65 GB

#jira
#rb joe.kirchoff
#preflight 63e57da9636f66aac7dc1818

[CL 24114121 by bryan sefcik in ue5-main branch]
2023-02-09 22:37:30 -05:00
henrik karlsson
8238c1d56b [UBT]
* Fixed so .gen.cpp files are also using shared rsp. Also made code a little bit simpler

#preflight 63e49b72ea7ad6869855fccd
#rb joe.kirchoff

[CL 24106316 by henrik karlsson in ue5-main branch]
2023-02-09 16:24:11 -05:00
henrik karlsson
5f74d114d5 [UBT]
Changed how single files are built. We don't want to invalidate makefile everytime we build single files since it destroys turnaround times. With this change a single file compile can take 2s (+ the actual compile time).

The new behavior injects a special action per module when creating the makefile. These actions can be used to on-the-fly create a proper compile action that follows the rules of the module that the specific file belongs to.. In a normal build these actions are ignored since the logic deciding which actions to build is backtraced from which binaries we want to create.

When a specific file compile is triggered, the logic deciding which files to build search up all these special actions and create a lookup based on which folders the special actions handle. It then try to find the special action that handles the specific file. The matching special action then creates a compile action that can handle that specific file and then queue up the action for execution. If no special action is found it falls back to try to use actions that have this specific file as input (ispc files for example)

Details:
* Removed lots of custom code for "specific files" handling
* Changed so pch (both private and shared) always use definition file. Added #pragma once and change so pch wrapper file include definition file. This made the adaptive path and specific file easy to implement (just disable pch in compile environment and it will just work)
* Added SingleFileAction for both VCToolChain and ClangToolChain. It now works to compile specific headers and cpp files. (It creates wrapper files on the fly to be able to compile all header files (compiling headers directly blow up if there are circular includes)
* Fixed so GenerateClangDatabase mode works with new changes
* Moved the logic that makes sure all (directly) depending cpp files are recompiled when .h are included in the singlefile option

#preflight 63dcc46f78716a01e8069649
#rb joe.kirchoff

[CL 24094027 by henrik karlsson in ue5-main branch]
2023-02-09 04:20:43 -05:00
henrik karlsson
1a528a125b [UBT]
* Changed so code generating unity file is modifying the right compile environment when adding lookup for source file -> .gen.cpp

Fixes a bug where sndbs fails to remotely build unity files properly

#preflight skipped
#rb joe.kirchoff

[CL 24092753 by henrik karlsson in ue5-main branch]
2023-02-08 23:59:58 -05:00
joe kirchoff
0e0c85e015 UnrealBuildTool: Use a force include define header for .ixx compiles
#rnx
#rb Henrik.Karlsson
#jira UE-175773
#preflight 63e2a028c2257e56f40f5b85

[CL 24058078 by joe kirchoff in ue5-main branch]
2023-02-07 15:41:28 -05:00
henrik karlsson
0de807f1a8 [UBT]
* Added support for additional response files (will be used by header units)
* Added support for shared response files and changed so normal cpp/h build path uses it if toolchain supports it.
* Enabled shared response files on all platforms but android (which doesnt seem to support reponse files including response files)
* Some cleanup in the iwyu toolchain related to shared rsp files

#preflight 63d9af169b3bb6a66cec9a8e
#rb joe.kirchoff

[CL 23943501 by henrik karlsson in ue5-main branch]
2023-01-31 21:24:28 -05:00
ben woodhouse
61d6a27216 Add support for overriding an individual module's optimization level via a new OptimizationLevel property. This requires either a private PCH, or PCHUsageMode=NoPCHs (not recommended) because Clang requires that a PCH's optimization flags match the compile unit.
#rb Joe.Kirchoff

[CL 23933583 by ben woodhouse in ue5-main branch]
2023-01-31 14:12:11 -05:00
henrik karlsson
15e7512ecf [UBT]
* Changed a bunch of code to use StringBuilder instead of TextWriter. Based on superluminal profiling data

#preflight 63d8bb903656ea96dc4ef1bf
#rb none

[CL 23924725 by henrik karlsson in ue5-main branch]
2023-01-31 03:23:17 -05:00
henrik karlsson
047beba924 [UBT]
* Changed so code related to inlined .gen.cpp is using FileItems etc to reduce number of sys calls

#preflight 63d8a8c5ba4fadeef05749cb
#rb none

[CL 23924497 by henrik karlsson in ue5-main branch]
2023-01-31 01:45:05 -05:00