From f2462b7401bc43d5ecd4bf185311365220f34700 Mon Sep 17 00:00:00 2001 From: Yakun Xu Date: Wed, 12 Nov 2025 15:53:16 +0800 Subject: [PATCH] [gn] add build option for TCP (#12134) This commit adds an option to allow disable building TCP. --- etc/gn/openthread.gni | 3 +++ src/core/BUILD.gn | 2 ++ 2 files changed, 5 insertions(+) diff --git a/etc/gn/openthread.gni b/etc/gn/openthread.gni index 277ee830d..72a090ec6 100644 --- a/etc/gn/openthread.gni +++ b/etc/gn/openthread.gni @@ -213,6 +213,9 @@ if (openthread_enable_core_config_args) { # Enable SRP Server support openthread_config_srp_server_enable = false + # Enable support for TCP + openthread_config_tcp_enable = true + # Enable ping sender support openthread_config_ping_sender = false diff --git a/src/core/BUILD.gn b/src/core/BUILD.gn index 875570165..bf1b7eebc 100644 --- a/src/core/BUILD.gn +++ b/src/core/BUILD.gn @@ -247,6 +247,8 @@ if (openthread_enable_core_config_args) { defines += [ "OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=1" ] } + defines += [ "OPENTHREAD_CONFIG_TCP_ENABLE=${openthread_config_tcp_enable}" ] + if (openthread_config_ping_sender) { defines += [ "OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1" ] }