Skip to content

utils.zsh: Enable debug symbols for ObjC#313

Merged
RytoEX merged 1 commit into
obsproject:masterfrom
PatTheMav:qt-objc-debug
May 6, 2026
Merged

utils.zsh: Enable debug symbols for ObjC#313
RytoEX merged 1 commit into
obsproject:masterfrom
PatTheMav:qt-objc-debug

Conversation

@PatTheMav
Copy link
Copy Markdown
Member

Description

Adds necessary compiler arguments to emit debug symbols in release builds for ObjC and ObjC++.

Motivation and Context

To force CMake-based projects to emit debug symbols even in release configuration, the -g argument needs to be explicitly added to the global CMAKE_<LANGUAGE>_FLAGS_RELEASE variable.

This was done for C and C++ already, but not for ObjC and ObjC++ (which are correctly treated as separate languages by CMake). This is required to make Qt plugins like the cocoa platform plugin "debuggable" with dSYM files loaded into a debugger.

How Has This Been Tested?

Built Qt locally and confirmed that functions called within the Cocoa platform plugin were correctly debuggable with source code available on the local machine.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

To force CMake-based projects to emit debug symbols even in release
configuration, the -g argument needs to be explicitly added to the
global CMAKE_<LANGUAGE>_FLAGS_RELEASE variable.

This was done for C and C++ already, but not for ObjC and ObjC++ (which
are correctly treated as separate languages by CMake). This is required
to make Qt plugins like the cocoa platform plugin "debuggable" with
dSYM files loaded into a debugger.
@RytoEX RytoEX merged commit 9784b1b into obsproject:master May 6, 2026
22 checks passed
@PatTheMav PatTheMav deleted the qt-objc-debug branch May 6, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants