Using master @ d73f37dda221835b5109ede1b84db2dc7c4b74a1.
The following seems incorrect, because
0make -C depends/ NO_QT=1 NO_WALLET=1 NO_ZMQ=1 -j18 CFLAGS="-O3" CXXFLAGS="-O3"
1cmake -B build --toolchain /root/ci_scratch/depends/aarch64-unknown-linux-gnu/toolchain.cmake
2<snip>
3C++ compiler flags .................... -O3 -O2 -g
4Linker flags .......................... -O3 -O2 -g
is overriding the user-provided -O3
.
If you configure by providing an explicit -DCMAKE_BUILD_TYPE=RelWithDebInfo
, you get:
0cmake -B build --toolchain /root/ci_scratch/depends/aarch64-unknown-linux-gnu/toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo
1C++ compiler flags .................... -O3
2Linker flags .......................... -O3
No -O2
at all, so the user provided -O3
is used (also missing -g
for debug info?).
If you configure with -DCMAKE_BUILD_TYPE=Release
:
0cmake -B build --toolchain /root/ci_scratch/depends/aarch64-unknown-linux-gnu/toolchain.cmake -DCMAKE_BUILD_TYPE=Release
1C++ compiler flags .................... -O3 -O2
2Linker flags .......................... -O3 -O2
Now we are back to (inconsistently) overriding the user.