Commit Graph

87 Commits

Author SHA1 Message Date
josh adams
7e0ec5711d - Changed Hybrid project checking to always check all enabled platforms to see if any need to be hybrid. This helps address an issue where a single-platform (say IOS) plugin was causing packaging to fail because the host platform (Mac) to clean up the hybrid target files, so then packaging for IOS would fail to find the compiled hybrid targets
#rb Chris.Babcock
#jira UE-224099

[CL 36758053 by josh adams in 5.5 branch]
2024-10-01 19:35:42 -04:00
joe kirchoff
5f5a8a703e UnrealBuildTool: Move several helper functions to EpicGames.Build
#rnx

[CL 33815711 by joe kirchoff in ue5-main branch]
2024-05-21 19:32:34 -04:00
flo schar
e5191ea82f Rollback - Throw a build exception when trying to build hybrid content only projects within a Templates folder - Avoid impacts on TP_VirtualRealityBP and possibly other projects without further considerations
#jira UE-214703

[CL 33585287 by flo schar in ue5-main branch]
2024-05-10 15:54:12 -04:00
flo schar
8a582c858b Throw a build exception when trying to build hybrid content only projects within a Templates folder
#jira UE-192821
#rb Josh.Adams
[FYI] Josh.Adams

[CL 33511104 by flo schar in ue5-main branch]
2024-05-08 09:36:20 -04:00
joe kirchoff
1975bacb57 UnrealBuildTool: Add support for studio telemetry. Requires connection info to be defined in a BaseEngine.ini config, as well as opting into those providers via a BuildConfiguration.xml setting
#jira UE-210668

#ushell-cherrypick of 32521294 by Joe.Kirchoff

[CL 32550524 by joe kirchoff in ue5-main branch]
2024-03-27 14:05:42 -04:00
joe kirchoff
1455fc9ca4 UnrealBuildTool: Fix some editorconfig errors
#rnx

[CL 30435211 by joe kirchoff in ue5-main branch]
2023-12-21 18:50:32 -05:00
jeremie roy
91accfeb2a Add option to build dependant plugins when building a foreign plugin in ubt
#rb joe.kirchoff

[CL 29487913 by jeremie roy in ue5-main branch]
2023-11-06 10:09:21 -05:00
jeff fisher
d5fbfa08db UE-189611 ARImageDetection Fails to Launch on Android - Error: Unable to load plugin 'XRBase'
-The logic in NativeProjects.cs IsHybridContentOnlyProject which decides whether we need to build an executable for a project was always using the buildhost platform (usually win64) to decide which plugins were active.  This caused it to miss enabled code plugins that build for the actual target platform but not the host platform and potentially not do an executible build when one is required.
-Now we pass the TargetPlatforms for the current build into ConditionalMakeTempTargetForHybridProject so that we can test against them.  If any project in this list needs code built we will make a temp target.
#jira UE-189611 UE-192833
#rb Josh.Adams

[CL 27101769 by jeff fisher in ue5-main branch]
2023-08-15 10:07:26 -04:00
chris constantinescu
199373a78d UBT new plugin test - generate solution doesn't include create new target
#rb Jerome.Delattre, Eric.Day
#jira UE-192402

[CL 26919864 by chris constantinescu in ue5-main branch]
2023-08-08 12:26:25 -04:00
christopher waters
cabaf593a1 NonUnity command line arguments should be per-target while build configuration XML settings should be global.
#rb joe.kirchoff

[CL 26590366 by christopher waters in ue5-main branch]
2023-07-25 17:44:34 -04:00
christopher waters
47426db352 Adding UnrealIntermediateEnvironment to allow different intermediate paths based on build settings.
This removes the old hack that renames the target based on nonunity being set while also adding a new intermediates folder for IWYU.

#jira UE-190274
#rb joe.kirchoff

[CL 26514944 by christopher waters in ue5-main branch]
2023-07-21 12:08:09 -04:00
josh adams
305c260069 - Moved SDK versions (MainVersion and Min/Max SDK version) from C# strings to SDK.json files in the Platform's Config folder
- Allow for per-project override in a project's platform's config folder (this is merging with my other work on per-project SDKs and validation of multi-target builds)
- More versions will move over after this
#rb david.harvey

[CL 26150552 by josh adams in ue5-main branch]
2023-06-21 11:21:01 -04:00
bryan sefcik
450934b44f Support to compile separate files in VS using the "Compile" menu item when you right click on the files.
[FYI] joe.kirchoff
#rb christopher.waters
#jira

[CL 25829893 by bryan sefcik in ue5-main branch]
2023-06-06 17:48:11 -04:00
josh adams
f6381544e2 - Allow a project to override the Main SDK version for a platform (the platform's project Engine.ini would set
[OverrideSDK]
  SDKVersion=x.y.z
and AutoSDK, or anything using GetMainVersion(), would use that version string instead
- If multiple targets are built in one run of UBT/UAT, it will error out because there is no support to switch SDKs (and builds happen in parallel, etc)
- This is not a complete solution, because it can cause problems with shared tools like ShaderCompileWorker, when different projects are on different SDKs and they have one SCW to share
- Renamed GetMainVersion to GetMainVersionInternal(), and wrapped that in a new non-vitual GetMainVersion() that calls GetMainVersionInternal() (and handles the ini overrides)
#rb david.harvey,dave.barrett
#jira UE-185364
#preflight 647a12e7b0670733186c928e

[CL 25767233 by josh adams in ue5-main branch]
2023-06-02 13:42:59 -04:00
joe kirchoff
acacd6a8de UnrealBuildTool: More automated code cleanup
* Use object type rather than var
* Remove double newlines
* Use pattern matching

#rnx
#preflight 647780095d23eca37d28a387

[CL 25706751 by joe kirchoff in ue5-main branch]
2023-05-31 13:37:21 -04:00
joe kirchoff
acf80ab609 [Backout] - CL25694851
[FYI] Joe.Kirchoff
Original CL Desc
-----------------------------------------------------------------
UnrealBuildTool: More automated code cleanup

#rnx

[CL 25695155 by joe kirchoff in ue5-main branch]
2023-05-30 19:55:37 -04:00
joe kirchoff
7ed1a39679 UnrealBuildTool: More automated code cleanup
#rnx

[CL 25694864 by joe kirchoff in ue5-main branch]
2023-05-30 19:36:05 -04:00
joe kirchoff
c04da27b3b UnrealBuildTool: More automated code cleanup
#rnx
#preflight 64767efb4b1ead7c7f428c7a

[CL 25693857 by joe kirchoff in ue5-main branch]
2023-05-30 18:59:32 -04:00
joe kirchoff
36d266e932 UnrealBuildTool: Automated code cleanup
#rnx
#preflight 6476799e947ff6973c225619

[CL 25693241 by joe kirchoff in ue5-main branch]
2023-05-30 18:38:07 -04:00
Josh Adams
9d4caec55a - Brought the idea of hybrid/temp targets for content only projects that need to be treated as code, to UBT instead of UAT. Generate temp targets when building or generating projects
- Only active when the project generator says it supports ContentOnly projects, although that is just for now until Xcode can test it out, in case it causes Visual Studio issues
#rb joe.kirchoff
#preflight 64638f4a4404e3cdd240327f

[CL 25490732 by Josh Adams in ue5-main branch]
2023-05-16 11:49:47 -04:00
mic rooney
8d82fa54b6 Allowing UBT to build individual plugins as though they were local.
* Also reverting a previous change that was building the whole project when adding new plugins.

#jira UE-171182
[REVIEW] [at]Josh.Adams, [at]Joe.Kirchoff
#preflight 640f5e7380540a5a36edb89d

[CL 24641918 by mic rooney in ue5-main branch]
2023-03-14 15:24:13 -04:00
Joe Kirchoff
eb868d8709 UnrealBuildTool: Fix issues with Modified Files Only compiles
#rnx
#rb tivial
#preflight 640294741d304a5471217842

[CL 24511169 by Joe Kirchoff in ue5-main branch]
2023-03-03 19:51:51 -05:00
henrik karlsson
fcb86aef13 [UnrealBuildTool]
* Change so SingleFile will not build dependents by default. This can be enabled with -SingleFileBuildDependents

#preflight skipped
#rb joe.kirchoff

[CL 24344617 by henrik karlsson in ue5-main branch]
2023-02-21 13:37:57 -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
josh adams
1610c3bee3 UnrealArch/UnrealArchitectures changes
- Creates the UnrealArchitectures class, which wraps a list of UnrealArch objects
 - UnrealArch is a single architecture, expandable enum-like struct
 - There is no more concept of "no/default architecture", there is always a valid active architecture when building
 - Most uses of "string Architecture" are replaced with one of the two above, depending if multiple architectures are supported or not
 - UnrealArch has some platform-extensions for platform-specific naming (like Linux adds in LinuxName that turns, for instance, Arm64 -> aarch64-unknown-linux-gnueabi, which is used in folder names, etc)
 - UnrealArch has bIsX64 which can be used determine intel instruction set (as opposed to arm)
 - TargetRules class has an "Architecture" accessor that will return a single architecture if the active architectures is a single architecture, or throw an exception if multiple. This is useful in a majority of the cases where a paltform can only have a single architecture active in TargetRules (microsoft platforms, for instance, will create separate targets when compiling multiple architectures at once)
 - Added UnrealArchitectureConfig class, which contains all the architecture information for a platform (what architectures are supported, what ones are currently active for given project, etc)

#preflight 63c81fb5b065224750a1759e
#rb mike.fricker,roman.dzieciol,joe.kirchoff,dmytro.vovk,brandon.schaefer [various parts]
#p4v-preflight-copy 23562471

[CL 23829977 by josh adams in ue5-main branch]
2023-01-24 09:30:28 -05:00