Commit ce42e4b
committed
cmake: Set the release/debug based on Kconfig
Use the Zephyr KConfig `CONFIG_DEBUG` to determine if the Rust code
should be built as release or debug. This will better optimize the
code.
Applications can still set options for `[profile.release]` to enable
things such as run time assertions. For example, debug symbols can
still be enabled with `debug = "full"`, which attempts to insert
debugging information, although the optimizer can still make the code
challenging to debug.o
`debug-assertions = true`, and `overflow-checks = true` can still be
enabled in the release builds, for some additional checks.
Signed-off-by: David Brown <[email protected]>1 parent 059e305 commit ce42e4b
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
152 | 157 | | |
153 | 158 | | |
154 | 159 | | |
155 | | - | |
156 | | - | |
| 160 | + | |
157 | 161 | | |
158 | 162 | | |
159 | 163 | | |
| |||
0 commit comments