4.25.1-release engine compile error vs2019

windows 10 build from source 4.25.1-release compile error.
winver:1909 18363.900
visual studio version: 16.6.2 Community 2019
.net framework version:4.8.03752
windows sdk version: Windows 10.0.18362.0 SDK
full error:

1>------ Build started: Project: UE4, Configuration: Development_Editor x64 ------
1>Using 'git status' to determine working set for adaptive non-unity build (F:\ue\ue425).
1>Building UE4Editor and ShaderCompileWorker...
1>Using Visual Studio 2019 14.26.28806 toolchain (D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
1>Building 6 actions with 8 processes...
1>  [1/6] Module.MeshProcessingLibrary.gen.cpp
1>F:\ue\ue425\Engine\Source\Runtime\Core\Public\Containers/Map.h(184): fatal error C1001: Internal compiler error.
1>  (compiler file 'msc1.cpp', line 1533)
1>   To work around this problem, try simplifying or changing the program near the locations listed above.
1>  If possible please provide a repro here: https://developercommunity.visualstudio.com
1>  Please choose the Technical Support command on the Visual C++
1>   Help menu, or open the Technical Support help file for more information
1>  F:\ue\ue425\Engine\Source\Runtime\Core\Public\Containers/Map.h(930): note: see reference to class template instantiation 'TMapBase<KeyType,ValueType,SetAllocator,KeyFuncs>' being compiled
1>          with
1>          [
1>              KeyType=FWeakObjectPtr,
1>              ValueType=TMap<FName,FString,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FName,FString,false>>,
1>              SetAllocator=FDefaultSetAllocator,
1>              KeyFuncs=TDefaultMapHashableKeyFuncs<FWeakObjectPtr,TMap<FName,FString,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FName,FString,false>>,false>
1>          ]
1>  F:\ue\ue425\Engine\Source\Runtime\Core\Public\Containers/Map.h(1059): note: see reference to class template instantiation 'TSortableMapBase<KeyType,ValueType,SetAllocator,KeyFuncs>' being compiled
1>          with
1>          [
1>              KeyType=FWeakObjectPtr,
1>              ValueType=TMap<FName,FString,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FName,FString,false>>,
1>              SetAllocator=FDefaultSetAllocator,
1>              KeyFuncs=TDefaultMapHashableKeyFuncs<FWeakObjectPtr,TMap<FName,FString,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FName,FString,false>>,false>
1>          ]
1>  F:\ue\ue425\Engine\Source\Runtime\CoreUObject\Public\UObject/MetaData.h(25): note: see reference to class template instantiation 'TMap<FWeakObjectPtr,TMap<FName,FString,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<KeyType,ValueType,false>>,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<FWeakObjectPtr,TMap<KeyType,ValueType,FDefaultSetAllocator,TDefaultMapHashableKeyFuncs<KeyType,ValueType,false>>,false>>' being compiled
1>          with
1>          [
1>              KeyType=FName,
1>              ValueType=FString
1>          ]
1>  INTERNAL COMPILER ERROR in 'D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe'
1>      Please choose the Technical Support command on the Visual C++
1>      Help menu, or open the Technical Support help file for more information
1>  [2/6] Module.MeshProcessingLibrary.cpp
1>F:\ue\ue425\Engine\Source\Runtime\Core\Public\Templates/AndOrNot.h(46): fatal error C1001: Internal compiler error.
1>  (compiler file 'msc1.cpp', line 1533)
1>   To work around this problem, try simplifying or changing the program near the locations listed above.
1>  If possible please provide a repro here: https://developercommunity.visualstudio.com
1>  Please choose the Technical Support command on the Visual C++
1>   Help menu, or open the Technical Support help file for more information
1>  F:\ue\ue425\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(463): note: see reference to class template instantiation 'TOrValue<false,TIsPointer<T>,TIsArithmetic<T>>' being compiled
1>          with
1>          [
1>              T=FAttributesSetEntry
1>          ]
1>  F:\ue\ue425\Engine\Source\Runtime\MeshDescription\Public\MeshAttributeArray.h(713): note: see reference to class template instantiation 'TUseBitwiseSwap<FAttributesSetEntry>' being compiled
1>  F:\ue\ue425\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(483): note: see reference to function template instantiation 'TEnableIf<!TUseBitwiseSwap<T>::Value,void>::Type Swap(T &,T &)' being compiled
1>  INTERNAL COMPILER ERROR in 'D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.exe'
1>      Please choose the Technical Support command on the Visual C++
1>      Help menu, or open the Technical Support help file for more information
1>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(46,5): error MSB3073: The command "chcp 65001 >NUL && ..\..\Build\BatchFiles\Build.bat -Target="UE4Editor Win64 Development" -Target="ShaderCompileWorker Win64 Development -Quiet" -WaitMutex -FromMsBuild" exited with code 6.
1>Done building project "UE4.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

Is this the unreal engine’s error, or the visual studio community 2019’s bug?

Same issue here. Installed VS 2017 as a wrokaround.

I seem to be having this issue with engine source build on VS 2019 (v16.7.6, MSVC v14.27) and UE4 (v4.25.4). Not sure exactly what to do here to fix this.

EDIT: Also, weirdly my builds succeed in VS but fail in RunUAT.bat