mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:45:15 +00:00
[benchmark] Use -Os to match firmware optimization level (#15688)
This commit is contained in:
@@ -26,12 +26,11 @@ CORE_BENCHMARKS_DIR: Path = Path(root_path) / "tests" / "benchmarks" / "core"
|
|||||||
STUBS_DIR: Path = Path(root_path) / "tests" / "benchmarks" / "stubs"
|
STUBS_DIR: Path = Path(root_path) / "tests" / "benchmarks" / "stubs"
|
||||||
|
|
||||||
PLATFORMIO_OPTIONS = {
|
PLATFORMIO_OPTIONS = {
|
||||||
"build_unflags": [
|
|
||||||
"-Os", # remove default size-opt
|
|
||||||
],
|
|
||||||
"build_flags": [
|
"build_flags": [
|
||||||
"-O2", # optimize for speed (CodSpeed recommends RelWithDebInfo)
|
"-Os", # match firmware optimization level (detects inlining regressions)
|
||||||
"-g", # debug symbols for profiling
|
"-g", # debug symbols for profiling
|
||||||
|
"-ffunction-sections", # required for dead-code stripping with -Os
|
||||||
|
"-fdata-sections", # required for dead-code stripping with -Os
|
||||||
"-DUSE_BENCHMARK", # disable WarnIfComponentBlockingGuard in finish()
|
"-DUSE_BENCHMARK", # disable WarnIfComponentBlockingGuard in finish()
|
||||||
f"-I{STUBS_DIR}", # stub headers for ESP32-only components
|
f"-I{STUBS_DIR}", # stub headers for ESP32-only components
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user