Skip to content

Commit

Permalink
Move android's Logging.cpp to src/platform/android/ (#34192)
Browse files Browse the repository at this point in the history
Previously, it was placed in src/platform/logging/impl/android/
  • Loading branch information
mbknust authored Jul 5, 2024
1 parent 82b1e1b commit fc52c4a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion examples/android/CHIPTest/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ shared_library("jni") {
"${chip_root}/src/platform",
"${chip_root}/src/platform/android",
"${chip_root}/src/platform/android:java",
"${chip_root}/src/platform/logging:android",
"${chip_root}/src/platform/android:logging",
"${chip_root}/src/platform/tests:tests",
"${chip_root}/third_party/inipp",
"${chip_root}/third_party/nlfaultinjection:nlfaultinjection",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static_library("support") {

# Android has no 'platform' that provides logging
if (current_os == "android") {
public_deps += [ "${chip_root}/src/platform/logging:android" ]
public_deps += [ "${chip_root}/src/platform/android:logging" ]
}

if (current_os == "mac" || current_os == "ios") {
Expand Down
13 changes: 13 additions & 0 deletions src/platform/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ source_set("tracing") {
]
}

static_library("logging") {
sources = [ "Logging.cpp" ]
deps = [
"${chip_root}/src/lib/core:chip_config_header",
"${chip_root}/src/lib/support:attributes",
"${chip_root}/src/lib/support:logging_constants",
"${chip_root}/src/platform:platform_config_header",
"${chip_root}/src/platform/logging:headers",
]

libs = [ "log" ]
}

static_library("android") {
output_name = "libAndroidPlatform"

Expand Down
File renamed without changes.
16 changes: 0 additions & 16 deletions src/platform/logging/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,6 @@ source_set("headers") {
public = [ "LogV.h" ]
}

if (current_os == "android") {
static_library("android") {
sources = [ "impl/android/Logging.cpp" ]
deps = [
":headers",
"${chip_root}/src/lib/core:chip_config_header",
"${chip_root}/src/lib/support:attributes",
"${chip_root}/src/lib/support:logging_constants",
"${chip_root}/src/platform:platform_config_header",
"${chip_root}/src/platform/logging:headers",
]

libs = [ "log" ]
}
}

# We need to reference the output file of ":stdio" at build time,
# but get_target_outputs() does not work for binary targets. As a
# workaround, define a reasonable path and make the target use it.
Expand Down

0 comments on commit fc52c4a

Please sign in to comment.