llvm-mingw
                                
                                 llvm-mingw copied to clipboard
                                
                                    llvm-mingw copied to clipboard
                            
                            
                            
                        libc++ with debug checks
Is it possible to include both a normal version of libc++ and a version with extra debug checks in the same package, similar to how MS-STL is shipped, or would that blow up the package size too much?
There are some ABI issues with debug builds mentioned here https://github.com/llvm/llvm-project/blob/main/libcxx/docs/DesignDocs/DebugMode.rst
Is it possible to include both a normal version of libc++ and a version with extra debug checks in the same package, similar to how MS-STL is shipped, or would that blow up the package size too much?
It probably wouldn't affect the total package size much at all (the libc++ is a quite miniscule part of the whole toolchain, size wise). Right now it probably would be quite clunky to use though. (It's maybe possible that it could be autoselected based on some compiler flag if we'd switch to the newer "per-target runtime directory" layout mechanism - if the libc++ debug mode can be switched with a compiler flag and if that translates to a selection criterion among in the runtime directory selection logic. I guess it would be sanest to only use it statically linked in that form, since the ABI is defined to be unstable.)
libc++ has switched to a different mechanism for enabling debug checks, called Hardening Modes, which will not affect the ABI.
Now, it's only a question of whether there's a benefit in building libc++ with _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG, since the probability of misusing the prebuilt components is rather small (who's going to misuse iostream?), but maybe I'm being too optimistic.