Commit Graph

1830 Commits

Author SHA1 Message Date
zach harris
aa6cca6f27 Fixing the LinkEnvironment copy constructor to resolve an issue with the merged pgd filename not being passed to the VC toolchain.
#tests Ran a PF with the change, issue of the missing value no longer occurs.

[CL 32510651 by zach harris in ue5-main branch]
2024-03-26 11:36:46 -04:00
zach harris
05624440e6 Modifying how we grab pgd and pgc files on Windows to account for the new merged pgd pipeline.
#rb adolf.stary

[CL 32490681 by zach harris in ue5-main branch]
2024-03-25 18:58:08 -04:00
joe kirchoff
517c200725 Remove some obsolete command line args
#rnx

[CL 32410750 by joe kirchoff in ue5-main branch]
2024-03-21 15:33:55 -04:00
christopher waters
7b31a51fb0 Headers that use UE_DEPRECATED_HEADER shouldn't be included in header units.
#rb Joe.Kirchoff

[CL 32365709 by christopher waters in ue5-main branch]
2024-03-20 10:38:05 -04:00
joe kirchoff
aa3ad552aa UHT: plugin/Source is also a valid base directory for include paths
#rnx

[CL 32332491 by joe kirchoff in ue5-main branch]
2024-03-19 14:04:57 -04:00
russell johnston
09f35473e4 VerseVM Await and sync expressions
Bind the `task` class to `VTask` with a native `Await` method. For tasks created before this binding, `VTask` uses a trivial emergent type and shape, so code that runs in this context (i.e. module top-levels) does not support structured concurrency.

Each `sync` arm spawns a new task, and the overall expression `Await`s each of them in turn to collect their results. These tasks may need to remain active when the outer `sync` expression suspends, which conflicts with the way lenient suspension forcibly suspends child tasks - to resolve this, suspenion no longer affects child tasks (in fact child tasks are no longer tracked at all) and instead `EndTask` (really any time the current task changes) must check for an already-suspended `YieldTask`.

Also adjust the bytecode of `for` loops so that the body runs outside of any failure context, rather than forwarding failures. This enables `<suspends>` calls in `for` loop bodies.

#rb Markus.Breyer

[CL 32277546 by russell johnston in ue5-main branch]
2024-03-15 12:58:08 -04:00
tim smith
794352ece3 Add support for "import_as_attribute" to the new VM code generator.
#rb russell.johnston

[CL 32216098 by tim smith in ue5-main branch]
2024-03-13 11:52:26 -04:00
tim smith
8dd06e0022 Migrated the existing verse package and class UE names to new VM
#rb Markus.Breyer

[CL 32207762 by tim smith in ue5-main branch]
2024-03-13 06:00:33 -04:00
russell johnston
7344f83d62 Native methods and FVerseValue fields in VerseVM
Replace `TVerseFunction` and its `FProperty` with a `VRestValue`.
Unify `TVerseFunction` and `FInteropUtils::TryInvoke...` for calling methods vs module/interface functions. (This includes fixing named non-defaulted parameters in the `TVerseFunction` path, apparently previous unused.)
Wrap the `verse::task*` result of `<native_callable>` APIs in `FVerseTask`; remove `Cancel` from `TVerseCall` (see SOL-6056).

Switch to decorated but unmangled names in VNI-generated binding glue.
Switch to decorated method names in VerseVM to match the binding glue.
Run `UVerseVMClass` CDO initialization after binding glue computes class layout.

Always create a `UObject` for `<native>` classes, now that their methods are bound.

#rb markus.breyer, tim.smith
#okforversepublic

[CL 32004566 by russell johnston in ue5-main branch]
2024-03-04 18:32:21 -05:00
saam barati
0b729bc858 Generate bytecode for instantiating top-level module code
#rb russell.johnston
#okforversepublic

Top-level code is allowed to have mostly arbitrary expressions in it. For example, you could have `X:int = 1+2` at the top level. Prior to this patch, we had a janky AST interpreter that pattern matched code at the top level. It only worked for things that were constant to the degree it understood. However, it's cleaner to just generate bytecode for top-level code that uses the normal interperter and binds evaluation results to variables.

[CL 31833870 by saam barati in ue5-main branch]
2024-02-27 03:10:19 -05:00
will brown
89e769075b In editor, optional plugin dependencies need to be compiled enabled or command line enabled otherwise they are ignored. Updated UBT to write out the BuildPlugins names to the target receipt or compiled into the executable.
#rb Joe.Kirchoff, Justin.Marcus
[FYI] Eric.Knapik

[CL 31774544 by will brown in ue5-main branch]
2024-02-23 15:23:25 -05:00
joe kirchoff
82c1feac08 UnrealBuildTool: Speedup VSWorkspace geneation
#rnx

[CL 31703982 by joe kirchoff in ue5-main branch]
2024-02-21 18:49:33 -05:00
shawn mcgrath
a5212363c3 #rb saam.barati #preflight 65d57453fa3e8ce24173ea4c
#okforversepublic

VerseVM:
 - named & default params
 - variadic immediate support in VVM code generator

[CL 31679794 by shawn mcgrath in ue5-main branch]
2024-02-21 08:56:45 -05:00
josh adams
ddf367b168 - Set all *TargetPlatform.Build.cs's to set the new SDKVersionRelevantPlatforms list so that per-project SDK version overrides will compile unique versions of those modules when that platform's SDK version of overridden
[FYI] Florin.Pascu
#rb Joe.Kirchoff

[CL 31665032 by josh adams in ue5-main branch]
2024-02-20 20:01:11 -05:00
josh adams
c0f2905ce7 - Added a method for Shared build environment builds to have certain modules marked as caring about SDK version overrides for some platforms - if any of those platforms are overridden, the DLL will be written to the project Binaries dir instead of Engine (set bAllowSDKOverrideModulesWithSharedEnvironment = true in a Target.cs)
- Added ability to optionally skip SDK validation when making a Target instance even if we don't want to skip Target validation (used when we make the base UnrealEditor target to compare to project's Editor target - we don't need to manage SDK for that temporary UnrealEditor target).
- ShaderCompileWorker is now BuildEnvironment.UniqueIfNeeded, which will build into the project binaries dir if needed (based on per-project SDK override)
- UnrealPak is marked as not caring about an SDK versions so it can be built along with SCW that does care
- Added $(BinaryDir) variable to UEBuildTarget, etc, for the location of the first Binary in the output binaries
#rb David.Harvey, Joe.Kirchoff

[CL 31661939 by josh adams in ue5-main branch]
2024-02-20 18:39:20 -05:00
joe kirchoff
f894052e4f Remove some old references to mono
#rnx
#jira UE-206585, UE-206586
#rb ryan.hummer

[CL 31634408 by joe kirchoff in ue5-main branch]
2024-02-19 19:18:28 -05:00
josh adams
67d747d50a - Moved all versions from *SDK.Versions.cs files to *_SDK.json files
- Some static variables made it tricky, so added some support to make it simpler on users of the static variables
#rb David.Harvey

[CL 31431441 by josh adams in ue5-main branch]
2024-02-13 11:51:53 -05:00
joe barnes
ca39c2dee3 [Switch] Add automatic --defragment-size calculation for Switch patches when --defragment is in use. Uses PatchDefragmentThreshold from [Packaging] in SwitchEngine.ini as the target patch fragmentation to hit. Tests --defragment-sizes of 0,32,64,128,256,512. Picks the largest one that generates fragmentation below PatchDefragmentationThreshold. Can be run using the UpdateSwitchPatchParameters stage of NightlyBuild, which will update the PatchDefragmentBlockSize setting in the [Packaging] section of SwitchEngine.ini. Also can be run when patch is generated if -AutoDefragment is supplied as an additional option when creating a patch.
#rb ben.woodhouse, gwennael.arbona
#rnx

[CL 31422626 by joe barnes in ue5-main branch]
2024-02-13 08:46:05 -05:00
tim smith
e3a69ec9d8 Added support for procedure and constructor.
Added support for Visit template specialization.  This allows for C++ structures to have visitors defined without having to modify the visitor objects.  Work in progress.

#rnx
#rb yiliang.siew

[CL 31288348 by tim smith in ue5-main branch]
2024-02-08 08:10:38 -05:00
michael wanderson
442065010d Undo backout CL-31249033
Expose RuntimeDependencies to ToolChain ModifyBuildProducts and LinkFiles methods. This is required to properly bundle DLLs on some platforms.

#Jira UE-199874
#rb David.Harvey

[CL 31277174 by michael wanderson in ue5-main branch]
2024-02-07 18:34:43 -05:00
rafa lecina
aa8a82d45a Do not ignore default value on setInFromProperty in UPL
[REVIEW] [at]Chris.Babcock
#rb Chris.Babcock

[CL 31263240 by rafa lecina in ue5-main branch]
2024-02-07 12:56:33 -05:00
bob tellez
1b52ec8938 [Backout] - CL31242703
[FYI] michael.wanderson
Original CL Desc
-----------------------------------------------------------------
Expose RuntimeDependencies to ToolChain ModifyBuildProducts and LinkFiles methods. This is required to properly bundle DLLs on some platforms.

#Jira UE-199874
#rb David.Harvey


#changelist validated
#virtualized

[CL 31249061 by bob tellez in ue5-main branch]
2024-02-07 01:15:42 -05:00
michael wanderson
8497503f5a Expose RuntimeDependencies to ToolChain ModifyBuildProducts and LinkFiles methods. This is required to properly bundle DLLs on some platforms.
#Jira UE-199874
#rb David.Harvey


#changelist validated
#virtualized

[CL 31243629 by michael wanderson in ue5-main branch]
2024-02-06 20:39:23 -05:00
joe kirchoff
e294f152e8 UnrealBuildTool: bTreatAsEngine module creates a pch variant, clean up some unneeded logic
#rnx
#rb christopher.waters, henrik.karlsson

[CL 31070432 by joe kirchoff in ue5-main branch]
2024-01-31 17:57:54 -05:00
russell johnston
32e3ad93e8 Coroutine suspend and resume
A new VTask object tracks a chain of the VFrames, from the point where the task was spawned to the point where it suspended. This task boundary is recorded by a pair of BeginTask/EndTask instructions. Individual <suspends> function calls in the new VM do not have distinct tasks, and <suspends> does not change how bytecode is generated.

Native functions may suspend the current task by returning a new FOpResult of kind Yield, at which point the current PC is saved to the VTask, its VFrames are detached from the stack, and execution continues in the parent task. Native code may resume a task with a new VTask::ResumeInTransaction API, which re-attaches these VFrames to the top of the stack and continues execution from the saved PC.

VNI functions continue to use the verse::continuation API, which now wraps a VTask pointer and thus must be accounted for during GC tracing.

#rb Markus.Breyer, saam.barati
#okforversepublic

[CL 30978163 by russell johnston in ue5-main branch]
2024-01-29 16:43:30 -05:00