You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was observed with vanilla Clang 16.0.6 built from source, and 16.0.5 distributed by MS with Visual Studio 2022 17.7.4, however the offending code is in the lower-level LLVM code, not Clang's. In
, which determines which characters in a symbol's name require it to be quoted within a linker directive, the $ and ? characters, both common in the MS ABI mangling scheme, are not exempted. This results in Clang emitting /EXPORT directives with the names quoted for most C++ symbols to be exported from a DLL. The MSVC linker has a massive performance issue with parsing .drectve sections when either linking a DLL or creating an import library from the Clang-built .OBJ files that becomes apparent when there are enough exported symbols. And since llvm-lib doesn't support the /DEF switch, using LIB.EXE from the MSVC toolchain (which just calls LINK.EXE /LIB) is required if the DLLs to be built have circular dependencies (see https://learn.microsoft.com/en-us/cpp/build/reference/using-an-import-library-and-export-file?view=msvc-170), which is the case for Unreal Editor.
The LLVM-side fix appears simple - don't trigger quoting names with '$' and '?' if (TT.isWindowsMSVCEnvironment()) and I can quickly create a PR with that fix - are there perhaps issues with that approach that I'm not seeing?