HomePhabricator

Reset default -g -O2 flags when enable debug

Description

Reset default -g -O2 flags when enable debug

Summary:
9882d1f044133832b3c0809676d5f26a861b9f44 Reset default -g -O2 flags when enable debug (Chun Kuan Lee)

Pull request description:

The default CXXFLAGS is -g -O2, this should not appear when enable debug.
fixes #13432

Tree-SHA512: 79447f3e1fab9e6cd12f5ca49b3d42187e856e0c159ed01140ea93d6ef1fbb1af3d65b338308566330491052c0177d12abe26796513502ddde31692665a0dbb4

This is a port of core PR #13445

Test Plan: ./autogen.sh && ./configure --enable-debug then check that CXXFLAGS starts with "-g3 -O0" and does not contain "-O2`

Reviewers: #bitcoin_abc, deadalnix, Fabien

Reviewed By: #bitcoin_abc, deadalnix, Fabien

Subscribers: teamcity, schancel

Differential Revision: https://reviews.bitcoinabc.org/D2556