Skip to content

Commit

Permalink
build: add -fno-asynchronous-unwind-tables to reduce binary size
Browse files Browse the repository at this point in the history
Add -fno-asynchronous-unwind-tables to reduce binary size. Bloaty
showed the stack unwinding metadata to be taking up space even
when we don't use exceptions.

BUG=part of #2636
  • Loading branch information
ddavis-2015 authored and rkuester committed Dec 5, 2024
1 parent 4c7b7bf commit 61a1e30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tensorflow/lite/micro/build_def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def tflm_copts():
be useful when additively overriding the defaults for a particular target.
"""
return [
"-fno-asynchronous-unwind-tables",
"-fno-exceptions",
"-Wall",
"-Wno-unused-parameter",
Expand Down
1 change: 1 addition & 0 deletions tensorflow/lite/micro/tools/make/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ endif
COMMON_FLAGS := \
-Werror \
-fno-unwind-tables \
-fno-asynchronous-unwind-tables \
-ffunction-sections \
-fdata-sections \
-fmessage-length=0 \
Expand Down

0 comments on commit 61a1e30

Please sign in to comment.