Skip to content

Commit 5be5b70

Browse files
committed
Makefile: explain why we do not use the default
Hopefully it will prevent future mistakes. Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 2bd52af commit 5be5b70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,8 @@ KBUILD_CFLAGS += -Os
807807
KBUILD_RUSTFLAGS_OPT_LEVEL_MAP := z
808808
endif
809809

810+
# Always set `debug-assertions` and `overflow-checks` because their default
811+
# depends on `opt-level` and `debug-assertions`, respectively.
810812
KBUILD_RUSTFLAGS += -Cdebug-assertions=$(if $(CONFIG_RUST_DEBUG_ASSERTIONS),y,n)
811813
KBUILD_RUSTFLAGS += -Coverflow-checks=$(if $(CONFIG_RUST_OVERFLOW_CHECKS),y,n)
812814
KBUILD_RUSTFLAGS += -Copt-level=$\

0 commit comments

Comments
 (0)