diff --git a/CMakeLists.txt b/CMakeLists.txt index 338cecc..edfd6a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,13 +2,6 @@ cmake_minimum_required(VERSION 3.28) project(tsb_libavr LANGUAGES CXX) -# CMake's GNU compiler module appends "-O3 -DNDEBUG" to CMAKE_CXX_FLAGS_RELEASE -# after the libavr toolchain sets "-Os", and the later -O3 wins — so a Release -# build is silently -O3, ~15-20 % larger than -Os. For a boot loader measured to -# the byte that is fatal, so strip it and get the size build the design intends. -# (The same leak affects libavr's own Release builds; a fix belongs upstream.) -string(REPLACE "-O3" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") - # libavr from a local checkout (LIBAVR_ROOT) or the forge; the toolchain file # comes from the same checkout via CMakePresets.json. include(FetchContent)