Skip to content

Commit 9dd9161

Browse files
Fix GN logic so fake platform tests can run on Darwin
1 parent 2e96822 commit 9dd9161

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib/support/BUILD.gn

+4-3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import("${chip_root}/build/chip/chip_version.gni")
2323
import("${chip_root}/build/chip/java/config.gni")
2424
import("${chip_root}/build/chip/tests.gni")
2525
import("${chip_root}/src/lib/core/core.gni")
26+
import("${chip_root}/src/platform/device.gni")
2627

2728
declare_args() {
2829
# Set to true to run the PersistentStorageDelegate API compliance audit
@@ -251,7 +252,7 @@ static_library("support") {
251252
"verhoeff/Verhoeff10.cpp",
252253
]
253254

254-
if (current_os == "android" || matter_enable_java_compilation) {
255+
if (chip_device_platform == "android" || matter_enable_java_compilation) {
255256
if (matter_enable_java_compilation) {
256257
include_dirs = java_matter_controller_dependent_paths
257258
}
@@ -298,11 +299,11 @@ static_library("support") {
298299
]
299300

300301
# Android has no 'platform' that provides logging
301-
if (current_os == "android") {
302+
if (chip_device_platform == "android") {
302303
public_deps += [ "${chip_root}/src/platform/android:logging" ]
303304
}
304305

305-
if (current_os == "mac" || current_os == "ios") {
306+
if (chip_device_platform == "darwin") {
306307
public_deps += [ "${chip_root}/src/platform/Darwin:logging" ]
307308
}
308309

0 commit comments

Comments
 (0)