The code for hot reload constructors is causing a compile error in 4.8 Preview when a class has a non-empty ctor.

To workaround this bug and disable the offending code, how can I disable the macro WITH_HOT_RELOAD_CTORS (assuming that that is possible)?

You can desable hotload from editor settings

Yes, but that requires a successful editor compilation, which is impossible because of the bug.

You can do it from config.
C:\Users[NAME]\Documents\Unreal Projects[MyProject]\Saved\Config\Windows\EditorPerProjectUserSettings.ini
Line 129: EditorPerProjectUserSettings.HotReload=True

and other
C:\Users[User]\Documents\Unreal Projects[MyProject]\Intermediate\Config\CoalescedSourceConfigs\EditorPerProjectUserSettings.ini

Aren’t the ini files loaded only at runtime too?

I tried adding the following to UE4Editor.Target.cs:

    public override void SetupGlobalEnvironment(
        TargetInfo Target,
        ref LinkEnvironmentConfiguration OutLinkEnvironmentConfiguration,
        ref CPPEnvironmentConfiguration OutCPPEnvironmentConfiguration
        // added this line to the existing method

But it didn’t work, I kept on having the same problem. So I tried adding to the projectEditor.Target.cs, and had no success.

Any other ideas?

The 4.8 release notes got out with these instructions:

Auto-generation of the new constructors can be disabled by defining WITH_HOT_RELOAD_CTORS macro to 0 and setting [Core.System] UseVTableConstructors to False in BaseEngine.ini.

Note that disabling this feature may result in crashes when performing hot reload.

Apparently, I was missing the additional ini setting.

Was wondering where/how do you define WITH_HOT_RELOAD_CTORS macro to 0?

I found the solution, define your macros in the constructor of MyProject.Build.cs ,like this:

public class MyProj : ModuleRules  
    public MyProj(TargetInfo Target)  
        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "Slate", "SlateCore" });  
        PrivateDependencyModuleNames.AddRange(new string[] {  });  

also can see example here: