doc: Override -g
properly to skip debugging information
#29756
Merged
-g
properly to skip debugging information
#29756