admin管理员组

文章数量:1315811

I'm considering building my code with clang/clang++ instead of clang-cl. I compile with /MT or /MTd depending on whether I'm making a debug or release build but it seems clang/clang++ always uses the non debug runtime as if compiled with /MT. I don't really know what the debug runtime does, is there anything I'll miss out on if I'm not using it?

I'm considering building my code with clang/clang++ instead of clang-cl. I compile with /MT or /MTd depending on whether I'm making a debug or release build but it seems clang/clang++ always uses the non debug runtime as if compiled with /MT. I don't really know what the debug runtime does, is there anything I'll miss out on if I'm not using it?

Share Improve this question asked Jan 30 at 1:42 HahaHortnessHahaHortness 1,6281 gold badge16 silver badges16 bronze badges
Add a comment  | 

1 Answer 1

Reset to default -1

The debug runtime differs primarily in a sightly different ABI for iterators, which prohibits mixture (both static linkage and dynamic linkage with STL based interface) of libraries compiled with debug/release. That's why some of the frontends will avoid the debug runtime at any cost.

Those extra features are primarily for iterator validation, and iterator validation is therefore unavailable with the release runtime.

That be said - the use of ASAN can replace iterator validation entirely, so you are not actually loosing anything of worth.

All of the other "debug" or "validation" features like debug-heaps etc. are available in the "release" version of the runtime too.

本文标签: debuggingWhat does the MSVC Debug Runtime doStack Overflow