Closed ghost closed 3 years ago
请问有没有办法保留-O0?没有这个参数编译会太慢。
Is there a way to keep -O0? It would be too slow to compile without this option.
Hello, You can add -O0
to AM_CXXFLAGS
, or add it when invoke make as make CXXFLAGS=-O0
.
Note that the linked document said:
you should never redefine a user variable such as CPPFLAGS in Makefile.am
That's because CXXFLAGS
is after AM_CXXFLAGS
, user can choose override some AM_CXXFLAGS with CXXFLAGS (user may prefer -O3
over -O0
for possible compiler optimizations.)
Hope this helps, thank you!
Hello,
AM_CXXFLAGS
is for targets without their CXXFLAGS defined [1], sincelibekho_a_CXXFLAGS
is defined, we have to add it ourself for-DEKHO_DATA_PATH
.[1] https://www.gnu.org/software/automake/manual/html_node/Flag-Variables-Ordering.html
I also update
configure.ac
to make it passed for me.Thank you!