Skip to content

Commit 51c93ba

Browse files
committed
lib/tcpip: expose debug option to xmake
1 parent 19c5a6e commit 51c93ba

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

lib/tcpip/network_wrapper.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@
1919
#include <platform-ethernet.hh>
2020
#include <token.h>
2121

22-
using Debug = ConditionalDebug<false, "Network stack wrapper">;
22+
constexpr bool DebugTCPIP =
23+
#ifdef DEBUG_TCPIP
24+
DEBUG_TCPIP
25+
#else
26+
false
27+
#endif
28+
;
29+
30+
using Debug = ConditionalDebug<DebugTCPIP, "Network stack wrapper">;
2331

2432
#include "../firewall/firewall.hh"
2533

lib/tcpip/xmake.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
debugOption("TCPIP")
2+
13
option("network-inject-faults")
24
set_default(false)
35
set_showmenu(true)
46
set_description("Inject network faults for testing")
57

68
compartment("TCPIP")
9+
add_rules("cheriot.component-debug")
710
set_default(false)
811
add_deps("freestanding", "string", "message_queue_library", "event_group", "cxxrt", "unwind_error_handler", "DNS")
912
add_cflags("-Wno-error=int-conversion", "-Wno-error=cheri-provenance", "-Wno-error=pointer-integer-compare", { force = true})

0 commit comments

Comments
 (0)