Skip to content

Commit

Permalink
ARM: Apply -fmerge-all-constants to the build (saves ~1kb)
Browse files Browse the repository at this point in the history
fmerge-constants appears to be the default, but while it says it will merge strings it doesn't appear to do this always, for instance for jswSymbols_InternalError_proto_str and jswSymbols_ReferenceError_proto_str which are identical.
  • Loading branch information
gfwilliams committed Aug 18, 2023
1 parent 7aa4a4a commit 01193e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
nrf52: Allow disabling pairing with `NRF.setSecurity({pair:0})`
Allow E.pipe to pipe from Strings, remove pipe's internal `position` counter (fix #2352)
Bangle.js 1: remove OneWire and JIT as it uses too much flash space to exist alongside UTF8+Tensorflow on nRF52
ARM: Apply -fmerge-all-constants to the build (saves ~1kb)

2v18 : Fix drawString with setClipRect with 90/270-degree rotation (fix #2343)
Pico/Wifi: Enabled JIT compiler
Expand Down
2 changes: 1 addition & 1 deletion make/common/ARM.make
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DEFINES += -DARM
ifndef ARM_HAS_OWN_CMSIS # nRF5x targets do not use the shared CMSIS files.
INCLUDE += -I$(ROOT)/targetlibs/arm
endif
OPTIMIZEFLAGS += -fno-common -fno-exceptions -fdata-sections -ffunction-sections
OPTIMIZEFLAGS += -fno-common -fno-exceptions -fdata-sections -ffunction-sections -fmerge-all-constants

# I've no idea why this breaks the bootloader, but it does.
# Given we've left 10k for it, there's no real reason to enable LTO anyway.
Expand Down

0 comments on commit 01193e5

Please sign in to comment.