Is it possible to generate map files with clang-cl/lld-link?

Hi,

is it possible to generate map files with the clang-cl driver? I’d prefer if this works with the Clang version that comes with VS2019 or VS2022, but if not I’m also prepared to build it from source.

Looking at MSBuild’s Microsoft.Cpp.LldLink.Exclusion.props for example - included by Microsoft.Cpp.ClangCl.Common.targets -, it looks specifically like the <GenerateMapFile /> property isn’t available with lld-link and by extension clang-cl.

I looked over the command line option help and found nothing there either.

Is there a way to enable the generation of map files with lld-link/clang-cl?

Or is there perhaps a way I can use clang-cl.exe only for compilation, but link.exe (from MS) for linking all the while re-enabling the those options listed for Microsoft.Cpp.LldLink.Exclusion.props, since I am after all using link.exe in place of lld-link.exe?

One more thing to add: I am not particular to some specific format of the map file. So MSVC-compatibility is of no concern for this purpose.