Skip to content

Commit 6947f9b

Browse files
authored
Split SetupPayloadHelper out of setup_payload library (#37762)
SetupPayloadHelper uses filesystem calls, which may not be implemented when using a standard library which does't provide such functionality (such as libc++ on embedded targets). This change avoids compiling in the helper functions into the library on these targets by default, as the only in-tree consumer of these functions currently is the qrcodetool which is only built on host.
1 parent 53ee24e commit 6947f9b

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/qrcodetool/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ executable("qrcodetool") {
3030
public_deps = [
3131
"${chip_root}/src/lib/support",
3232
"${chip_root}/src/platform/logging:stdio",
33-
"${chip_root}/src/setup_payload",
33+
"${chip_root}/src/setup_payload:setup_payload_helper",
3434
]
3535
}

src/setup_payload/BUILD.gn

+9-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ static_library("setup_payload") {
6666
"QRCodeSetupPayloadParser.h",
6767
"SetupPayload.cpp",
6868
"SetupPayload.h",
69-
"SetupPayloadHelper.cpp",
70-
"SetupPayloadHelper.h",
7169
]
7270

7371
cflags = [ "-Wconversion" ]
@@ -80,6 +78,15 @@ static_library("setup_payload") {
8078
]
8179
}
8280

81+
source_set("setup_payload_helper") {
82+
sources = [
83+
"SetupPayloadHelper.cpp",
84+
"SetupPayloadHelper.h",
85+
]
86+
87+
public_deps = [ "${chip_root}/src/setup_payload" ]
88+
}
89+
8390
source_set("onboarding-codes-utils") {
8491
sources = [
8592
"OnboardingCodesUtil.cpp",

0 commit comments

Comments
 (0)