Skip to content

Commit 437e7ec

Browse files
committed
lib/tls: expose debug option to xmake
1 parent 93e4433 commit 437e7ec

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

lib/tls/tls.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@
1212
#include <tls.h>
1313
#include <token.h>
1414

15-
using Debug = ConditionalDebug<false, "TLS">;
15+
constexpr bool DebugTLS =
16+
#ifdef DEBUG_TLS
17+
DEBUG_TLS
18+
#else
19+
false
20+
#endif
21+
;
22+
23+
using Debug = ConditionalDebug<DebugTLS, "TLS">;
1624
using namespace CHERI;
1725

1826
/**

lib/tls/xmake.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
debugOption("TLS")
2+
13
option("tls-rsa")
24
set_default(true)
35
set_description("Enable RSA (in addition to ECDSA) for TLS")
@@ -12,6 +14,7 @@ option("tls-sha384")
1214

1315

1416
compartment("TLS")
17+
add_rules("cheriot.component-debug")
1518
add_options("tls-rsa", "tls-sha384")
1619
set_default(false)
1720
-- TLS API

0 commit comments

Comments
 (0)