File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ def define_common_targets():
57
57
force_static = True ,
58
58
)
59
59
60
+ # Enable or disable ET_LOGs
61
+ enable_et_log = native .read_config ("executorch" , "enable_et_log" , None )
62
+
60
63
# Interfaces for executorch users
61
64
runtime .cxx_library (
62
65
name = "platform" ,
@@ -73,7 +76,7 @@ def define_common_targets():
73
76
"profiler.cpp" ,
74
77
"runtime.cpp" ,
75
78
],
76
- exported_preprocessor_flags = get_profiling_flags (),
79
+ exported_preprocessor_flags = get_profiling_flags () + ([ "-DET_LOG_ENABLED=0" ] if enable_et_log else []) ,
77
80
exported_deps = [
78
81
"//executorch/runtime/platform:pal_interface" ,
79
82
":compiler" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ def define_common_targets():
24
24
#
25
25
# It's also best to build this with `-c executorch.enable_program_verification=false`
26
26
# to remove ~30kB of optional flatbuffer verification code from the binary.
27
+ # Building with `-c executorch.enable_et_log=0` removes ~15kB from the binary.
27
28
runtime .cxx_binary (
28
29
name = "size_test" ,
29
30
srcs = SIZE_TEST_SOURCES ,
You can’t perform that action at this time.
0 commit comments