Skip to content

Commit

Permalink
[build] extra -fdevirtualize-at-ltrans optimization for tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
avtolstoy committed Jun 19, 2024
1 parent dcf2c8f commit 700bfc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build/arm-tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ endif
# We are using newlib-nano for all the platforms
CFLAGS += --specs=nano.specs

ifneq ($(CFLAGS_USE_IPA_PTA),)
CFLAGS += -fipa-pta
LDFLAGS += -fipa-pta
ifneq ($(LTO_EXTRA_OPTIMIZATIONS),)
CFLAGS += -fipa-pta -fdevirtualize-at-ltrans
LDFLAGS += -fipa-pta -fdevirtualize-at-ltrans
endif

# Check if the compiler version is the minimum required
Expand Down
4 changes: 2 additions & 2 deletions modules/tracker/system-part1/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ BUILD_PATH_EXT = $(BUILD_TARGET_PLATFORM)
HAL_LINK :=
PLATFORM_DFU = 0x30000

# Add -fipa-pta to CFLAGS/LDFLAGS (interprocedural pointer analysis)
export CFLAGS_USE_IPA_PTA=1
# Add -fipa-pta and -fdevirtualize-at-ltrans to CFLAGS/LDFLAGS (interprocedural pointer analysis) + more aggressive virtual call optimizations
export LTO_EXTRA_OPTIMIZATIONS=1

DEPENDENCIES = newlib_nano modules/tracker/user-part modules/tracker/system-part1 dynalib services hal platform system wiring communication rt-dynalib crypto proto_defs wiring_globals
LIB_DEPENDENCIES = services system wiring communication hal platform crypto proto_defs wiring_globals
Expand Down

0 comments on commit 700bfc9

Please sign in to comment.