Skip to content

feat: introduces optimized debug option - #150

Merged
EnriqueParodi merged 2 commits into
mainfrom
SEN-1680-optimize-sen-debug-experience
Sep 10, 2026
Merged

feat: introduces optimized debug option#150
EnriqueParodi merged 2 commits into
mainfrom
SEN-1680-optimize-sen-debug-experience

Conversation

@lolito93

Copy link
Copy Markdown
Collaborator

With the SEN_USER_SIZE_OPTIMIZED_DEBUG users can now control whether they want a smaller and better optimized debug build that is fast and has reliable debug information.

Resolves SEN-1680

@EnriqueParodi EnriqueParodi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "Override options" but the code appends. gcc and clang take the last optimisation flag, but nothing is overridden and -fno-omit-frame-pointer is passed twice.

Choosing the flags once before the list avoids both:

# -Og with compressed debug info builds smaller and runs faster than -O0, at the
# cost of some variables being optimised away.
if(SEN_OPTIMIZED_DEBUG)
  set(debug_options_ -Og -gz)
else()
  set(debug_options_ -O0 -g)
endif()

set(common_clang_gcc_options_
  ...
  "$<$<CONFIG:Debug>:${debug_options_};-fno-omit-frame-pointer>"
  "$<$<CONFIG:Release>:-O3>"
)

and the if(SEN_USER_SIZE_OPTIMIZED_DEBUG) block below goes away.

The option name would be more aligned with the others by using SEN_OPTIMIZED_DEBUG. The conan option would become with_optimized_debug to match.

Thanks!

@lolito93

Copy link
Copy Markdown
Collaborator Author

Good morning @EnriqueParodi, thanks for the review. I aligned the naming of the CMake option and factored out how the compiler flags are set.

EnriqueParodi
EnriqueParodi previously approved these changes Aug 27, 2026
@EnriqueParodi
EnriqueParodi dismissed their stale review August 27, 2026 10:33

The merge-base changed after approval.

@EnriqueParodi
EnriqueParodi force-pushed the SEN-1746-test-dead-reckoner-quaternion-vec3-implementation branch from 9afa3af to 53ebb21 Compare August 27, 2026 10:33
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1680-optimize-sen-debug-experience branch from 046df95 to 1bdfbbf Compare August 27, 2026 10:33
@EnriqueParodi
EnriqueParodi marked this pull request as draft August 27, 2026 14:29
@EnriqueParodi
EnriqueParodi marked this pull request as ready for review August 27, 2026 14:29
@EnriqueParodi
EnriqueParodi marked this pull request as draft August 27, 2026 15:15
@EnriqueParodi
EnriqueParodi marked this pull request as ready for review August 27, 2026 15:15
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1746-test-dead-reckoner-quaternion-vec3-implementation branch from 53ebb21 to ea352de Compare August 27, 2026 18:04
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1680-optimize-sen-debug-experience branch from 1bdfbbf to db24cc7 Compare August 27, 2026 18:04
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1746-test-dead-reckoner-quaternion-vec3-implementation branch from ea352de to d5bb17d Compare August 27, 2026 18:25
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1680-optimize-sen-debug-experience branch from db24cc7 to ba16eb9 Compare August 27, 2026 18:25
@lolito93
lolito93 force-pushed the SEN-1680-optimize-sen-debug-experience branch from ba16eb9 to add4734 Compare September 1, 2026 11:07
@lolito93
lolito93 changed the base branch from SEN-1746-test-dead-reckoner-quaternion-vec3-implementation to main September 1, 2026 11:29
@lolito93
lolito93 dismissed luisgutierrezpereda’s stale review September 1, 2026 11:29

The base branch was changed.

@lolito93

lolito93 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Can be re-approved and merged.

@EnriqueParodi
EnriqueParodi self-requested a review September 2, 2026 07:00
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1680-optimize-sen-debug-experience branch from 8831db8 to 6b48d69 Compare September 10, 2026 08:55
With the `SEN_USER_SIZE_OPTIMIZED_DEBUG` users can now control whether they
want a smaller and better optimized debug build that is fast and has reliable
debug information.

Resolves SEN-1680
The option becomes `SEN_OPTIMIZED_DEBUG`, dropping the `USER_SIZE` part of the
name it was introduced with, and the flags it turns on are set in one place in
sen_misc_utils.cmake rather than being spelled out where they are used.

Resolves SEN-1680
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1680-optimize-sen-debug-experience branch from 6b48d69 to beb44e0 Compare September 10, 2026 09:45
@EnriqueParodi
EnriqueParodi added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit d7b353f Sep 10, 2026
17 checks passed
@EnriqueParodi
EnriqueParodi deleted the SEN-1680-optimize-sen-debug-experience branch September 10, 2026 10:42
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.

3 participants