Commit 2d747e5
cmake: prohibit LTO for heap_constants.c offsets source
Commit 518d842 ("lib: heap: compute Z_HEAP_MIN_SIZE from actual
struct layouts") added heap_constants.c to the offsets library, but
did not add the prohibit_lto compile option that offsets.c has.
When LTO is enabled, the compiler optimizes away the absolute symbols
emitted by GEN_ABSOLUTE_SYM, causing them to be missing from the
generated offsets.h. This breaks builds that use Z_HEAP_MIN_SIZE
(via kernel/mempool.c) with LTO-enabled configurations.
Fix by adding heap_constants.c to the same set_source_files_properties
call that disables LTO for offsets.c.
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>1 parent 356f6e9 commit 2d747e5
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
1048 | | - | |
1049 | | - | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1050 | 1051 | | |
1051 | 1052 | | |
1052 | 1053 | | |
| |||
0 commit comments