Skip to content

Commit 19c5a6e

Browse files
committed
lib/netapi: expose debug option to xmake
1 parent 437e7ec commit 19c5a6e

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

lib/netapi/NetAPI.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99
#include <endianness.hh>
1010
#include <token.h>
1111

12-
using Debug = ConditionalDebug<false, "Network API">;
12+
constexpr bool DebugNetAPI =
13+
#ifdef DEBUG_NETAPI
14+
DEBUG_NETAPI
15+
#else
16+
false
17+
#endif
18+
;
19+
20+
using Debug = ConditionalDebug<DebugNetAPI, "Network API">;
1321

1422
#include "../dns/dns.hh"
1523
#include "../firewall/firewall.hh"

lib/netapi/xmake.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
debugOption("NetAPI")
2+
13
compartment("NetAPI")
4+
add_rules("cheriot.component-debug")
25
set_default(false)
36
add_includedirs("../../include")
47
add_deps("freestanding", "TCPIP")

0 commit comments

Comments
 (0)