gnustep / tools-make

The makefile package is a simple, powerful and extensible way to write makefiles for a GNUstep-based project.
https://www.gnustep.org/
GNU General Public License v3.0
28 stars 43 forks source link

Ensure -gcodeview on Windows MSVC #39

Closed triplef closed 9 months ago

triplef commented 9 months ago

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.

triplef commented 9 months ago

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.