diff --git a/firmware/application/CMakeLists.txt b/firmware/application/CMakeLists.txt index 4c50ccfe..fe6b2be8 100644 --- a/firmware/application/CMakeLists.txt +++ b/firmware/application/CMakeLists.txt @@ -44,7 +44,7 @@ if(cpp20_supported) else() set(USE_CPPOPT "-std=c++17") endif() -set(USE_CPPOPT "${USE_CPPOPT} -fno-rtti -fno-exceptions -Weffc++ -Wuninitialized -Wno-volatile") +set(USE_CPPOPT "${USE_CPPOPT} -flto -fno-rtti -fno-exceptions -Weffc++ -Wuninitialized -Wno-volatile") # Enable this if you want the linker to remove unused code and data set(USE_LINK_GC yes) diff --git a/firmware/baseband/CMakeLists.txt b/firmware/baseband/CMakeLists.txt index 53262b06..f0490b00 100644 --- a/firmware/baseband/CMakeLists.txt +++ b/firmware/baseband/CMakeLists.txt @@ -32,7 +32,7 @@ include(CheckCXXCompilerFlag) project(baseband_shared) # Compiler options here. -set(USE_OPT "-O2 -g -falign-functions=16 -fno-math-errno --specs=nano.specs") +set(USE_OPT "-O3 -g -falign-functions=16 -fno-math-errno --specs=nano.specs") # C specific options here (added to USE_OPT). set(USE_COPT "-std=gnu99") @@ -44,7 +44,7 @@ if(cpp20_supported) else() set(USE_CPPOPT "-std=c++17") endif() -set(USE_CPPOPT "${USE_CPPOPT} -fno-rtti -fno-exceptions -Weffc++ -Wuninitialized -Wno-volatile") +set(USE_CPPOPT "${USE_CPPOPT} -flto -fno-rtti -fno-exceptions -Weffc++ -Wuninitialized -Wno-volatile") # Enable this if you want the linker to remove unused code and data set(USE_LINK_GC yes)