* Update GenerateISPCHeaders & CompileISPCFiles to work the same as CompileCppFiles, handling multiple arch
* GenerateISPCHeaders & CompileISPCFiles is now protected
* Simplify platform and arch logic in ISPCToolchain
* Remove need to override ISPC compile functions for Android
[CL 36038490 by joe kirchoff in ue5-main branch]
The compiler can inline function calls before the AutoRTFMCompilerPass splits functions into open and closed variants, which can lead to incorrect RTFM behaviour.
When AutoRTFM is enabled (clang-verse with -fautortfm) remove the implementation of autortfm_is_closed(). This prevents the compiler from inlining the function (as there is nothing to inline).
Replace the use of UE_AUTORTFM_AUTORTFM() with function bodies that explicitly branches on autortfm_is_closed(), calling either a UE_AUTORTFM_ALWAYS_OPEN annotated closed function, or instead performing the open logic. Because the function body calls autortfm_is_closed() (which cannot be inlined), these functions should avoid the premature inlining problem.
When AutoRTFM is not enabled (clang-verse with -fautortfm, or a different compiler) the AutoRTFM core functions are stubbed with `static inline` implementations. The static qualifier should be sufficient to prevent this implementation leaking into other modules with AutoRTFM enabled.
Change BENIGN_LANGOPT(AutoRTFM, ...) to LANGOPT(AutoRTFM, ...). This makes Clang consider the flag as incompatible when mixing -fautortfm / no -fautortfm between precompiled headers and users. This is important as the new __AUTORTFM_ENABLED macro will be baked into the PCH.
Error if both -fautortfm and exceptions are enabled on the compiler.
Update the UnrealBuildTool to separate PCHs with -fautortfm enabled and without.
#rb neil.henning
[CL 35333537 by ben clayton in ue5-main branch]
[FYI] ben.clayton
Original CL Desc
-----------------------------------------------------------------
[AutoRTFM] Prevent premature inlining of RTFM core functions and prevent mixed -fautortfm PCHs
The compiler can inline function calls before the AutoRTFMCompilerPass splits functions into open and closed variants, which can lead to incorrect RTFM behaviour.
When AutoRTFM is enabled (clang-verse with -fautortfm) remove the implementation of autortfm_is_closed(). This prevents the compiler from inlining the function (as there is nothing to inline).
Replace the use of UE_AUTORTFM_AUTORTFM() with function bodies that explicitly branches on autortfm_is_closed(), calling either a UE_AUTORTFM_ALWAYS_OPEN annotated closed function, or instead performing the open logic. Because the function body calls autortfm_is_closed() (which cannot be inlined), these functions should avoid the premature inlining problem.
When AutoRTFM is not enabled (clang-verse with -fautortfm, or a different compiler) the AutoRTFM core functions are stubbed with `static inline` implementations. The static qualifier should be sufficient to prevent this implementation leaking into other modules with AutoRTFM enabled.
Change BENIGN_LANGOPT(AutoRTFM, ...) to LANGOPT(AutoRTFM, ...). This makes Clang consider the flag as incompatible when mixing -fautortfm / no -fautortfm between precompiled headers and users. This is important as the new __AUTORTFM_ENABLED macro will be baked into the PCH.
Update the UnrealBuildTool to separate PCHs with -fautortfm enabled and without.
#rb michael.nicolella
[CL 35070269 by justin peterson in ue5-main branch]
The compiler can inline function calls before the AutoRTFMCompilerPass splits functions into open and closed variants, which can lead to incorrect RTFM behaviour.
When AutoRTFM is enabled (clang-verse with -fautortfm) remove the implementation of autortfm_is_closed(). This prevents the compiler from inlining the function (as there is nothing to inline).
Replace the use of UE_AUTORTFM_AUTORTFM() with function bodies that explicitly branches on autortfm_is_closed(), calling either a UE_AUTORTFM_ALWAYS_OPEN annotated closed function, or instead performing the open logic. Because the function body calls autortfm_is_closed() (which cannot be inlined), these functions should avoid the premature inlining problem.
When AutoRTFM is not enabled (clang-verse with -fautortfm, or a different compiler) the AutoRTFM core functions are stubbed with `static inline` implementations. The static qualifier should be sufficient to prevent this implementation leaking into other modules with AutoRTFM enabled.
Change BENIGN_LANGOPT(AutoRTFM, ...) to LANGOPT(AutoRTFM, ...). This makes Clang consider the flag as incompatible when mixing -fautortfm / no -fautortfm between precompiled headers and users. This is important as the new __AUTORTFM_ENABLED macro will be baked into the PCH.
Update the UnrealBuildTool to separate PCHs with -fautortfm enabled and without.
#rb michael.nicolella
[CL 35058925 by ben clayton in ue5-main branch]
* Fixed so PerModule cpp file creates its own translation unit if module merging is enabled
* Fixed so only one translation unit of PerModule.cpp is added per binary if module merging is enabled
[CL 33735442 by henrik karlsson in ue5-main branch]
If a module depends on Core and does not want the overloads it needs to add the private define SUPPRESS_PER_MODULE_INLINE_FILE or set PER_MODULE_INLINE_FILE to point to a different file
[CL 33709297 by henrik karlsson in ue5-main branch]