Commit da2223f
Export ET_LOG_ENABLED=0 as PUBLIC compile definition on cmake targets (#17907)
The executorch and executorch_core cmake targets did not propagate
ET_LOG_ENABLED=0 to consumers via INTERFACE_COMPILE_DEFINITIONS.
This caused inline/template functions from headers (e.g.
MemoryAllocator::allocate, Result<T>::CheckOk) to be instantiated
with logging enabled in consumer TUs, pulling in format strings,
et_pal_emit_log_message, and the full POSIX logging stack (fprintf,
chrono).
Adding ET_LOG_ENABLED=0 as a PUBLIC definition ensures consumers
compile header code with the same logging state as the library.
Reduces stripped size_test by 4,096 bytes and stripped
size_test_all_ops by 8,192 bytes.
---------
Co-authored-by: Github Executorch <github_executorch@arm.com>1 parent 4e8bcd3 commit da2223f
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
497 | 500 | | |
498 | 501 | | |
499 | 502 | | |
| |||
542 | 545 | | |
543 | 546 | | |
544 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
545 | 551 | | |
546 | 552 | | |
547 | 553 | | |
| |||
0 commit comments