Skip to content

Commit 6d98a1c

Browse files
nordic-krchmbolivar-nordic
authored andcommitted
debug: Revert ASSERT options dependency
f4df23c added dependency on ASSERT to some options prefixed with ASSERT_ assuming that they are no used elsewhere. Turned out that there are subsystem specific assert macros (e.g. BT_ASSERT) which relies on those options. Removing the dependency. Signed-off-by: Krzysztof Chruscinski <[email protected]>
1 parent 2f792c2 commit 6d98a1c

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

lib/os/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ zephyr_sources_ifdef(CONFIG_JSON_LIBRARY json.c)
3333

3434
zephyr_sources_ifdef(CONFIG_RING_BUFFER ring_buffer.c)
3535

36-
zephyr_sources_ifdef(CONFIG_ASSERT assert.c)
36+
if (CONFIG_ASSERT OR CONFIG_ASSERT_VERBOSE)
37+
zephyr_sources(assert.c)
38+
endif()
39+
3740

3841
zephyr_sources_ifdef(CONFIG_USERSPACE mutex.c user_work.c)
3942

subsys/debug/Kconfig

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,14 +206,6 @@ config ASSERT
206206
Disabling this option will cause assertions to compile to nothing,
207207
improving performance and system footprint.
208208

209-
config FORCE_NO_ASSERT
210-
bool "Force-disable no assertions"
211-
help
212-
This boolean option disables Zephyr assertion testing even
213-
in circumstances (twister) where it is enabled via
214-
CFLAGS and not Kconfig. Added solely to be able to work
215-
around compiler bugs for specific tests.
216-
217209
if ASSERT
218210

219211
config ASSERT_LEVEL
@@ -238,6 +230,16 @@ config SPIN_VALIDATE
238230
enabled. It adds a relatively hefty overhead (about 3k or so) to
239231
kernel code size, don't use on platforms known to be small.
240232

233+
endif # ASSERT
234+
235+
config FORCE_NO_ASSERT
236+
bool "Force-disable no assertions"
237+
help
238+
This boolean option disables Zephyr assertion testing even
239+
in circumstances (twister) where it is enabled via
240+
CFLAGS and not Kconfig. Added solely to be able to work
241+
around compiler bugs for specific tests.
242+
241243
config ASSERT_VERBOSE
242244
bool "Verbose assertions"
243245
default y
@@ -272,8 +274,6 @@ config ASSERT_NO_MSG_INFO
272274
before disabling file info since the message can be found in the
273275
source using file info.
274276

275-
endif # ASSERT
276-
277277
config OVERRIDE_FRAME_POINTER_DEFAULT
278278
bool "Override compiler defaults for -fomit-frame-pointer"
279279
help

0 commit comments

Comments
 (0)