On Windows MSVC -gcodeview is required in addition to -g in order to generate full debug symbols. This enables debugging Objective-C code with native Windows debugging tools such as Visual Studio or WinDBG (more info about CodeView support in LLVM can e.g. be found here).
This change always adds the flag if -g is found in OPTFLAG.
I’ve tweaked the MSVC toolchain scripts to always specify CFLAGS to include -g -gcodeview, but I still think it makes sense for tools-make to add -gcodeview if -g is set, as -g without -gcodeview does not generate usable debug symbols on Windows.
On Windows MSVC
-gcodeview
is required in addition to-g
in order to generate full debug symbols. This enables debugging Objective-C code with native Windows debugging tools such as Visual Studio or WinDBG (more info about CodeView support in LLVM can e.g. be found here).This change always adds the flag if
-g
is found inOPTFLAG
.