This change makes the generation of EnumTraits configurable. With this
change we can see reductions in code size by over 1MB. Example file
size changes:
File
src (KB)
.h (KB) before
.h (KB) after
hci_events.emb
76
5356
3884
hci_commands.emb
108
5612
4268
hci_vendor.emb
32
1748
1304
hci_common.emb
32
644
368
hci_data.emb
4
152
104
l2cap_frames.emb
4
48
40
hci_h4.emb
4
8
4
This is also helpful for embedded users who couldn't use emboss due to
dependencies on string libraries and functions like sscanf.
This change is split out into a series of patches to make it easier to review:
Add forward declarations for text helpers - Cleanup in preparation for the following changes. This allows us to remove the dependency on emboss_text_util.h from the core runtime files.
Split out enum trait generation - This is the main change, it adds a configuration flag that controls whether or not enum trait and various text helpers are generated
Add --no-cc-enum-traits param adds a CLI flag for toggling the internal configuration
Add bazel support for disabling enum traits adds an attribute to the emboss_cc_library to control the enum traits configuration as well as tests to make sure it works
This change makes the generation of EnumTraits configurable. With this change we can see reductions in code size by over 1MB. Example file size changes:
This is also helpful for embedded users who couldn't use emboss due to dependencies on string libraries and functions like
sscanf
.This change is split out into a series of patches to make it easier to review:
Add forward declarations for text helpers
- Cleanup in preparation for the following changes. This allows us to remove the dependency onemboss_text_util.h
from the core runtime files.Split out enum trait generation
- This is the main change, it adds a configuration flag that controls whether or not enum trait and various text helpers are generatedAdd --no-cc-enum-traits param
adds a CLI flag for toggling the internal configurationAdd bazel support for disabling enum traits
adds an attribute to the emboss_cc_library to control the enum traits configuration as well as tests to make sure it worksThis is part of #128
Tests:
bazel test //...