Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default AddressResolve implementation the default #32824

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/darwin/Framework/Matter.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,6 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CHIP_HAVE_CONFIG_H,
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
CONFIG_BUILD_FOR_HOST_UNIT_TEST,
"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
"CONFIG_USE_INTERACTIVE_MODE=1",
Expand Down Expand Up @@ -2105,7 +2104,6 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"$(inherited)",
CHIP_HAVE_CONFIG_H,
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
CONFIG_BUILD_FOR_HOST_UNIT_TEST,
"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
"CONFIG_USE_INTERACTIVE_MODE=1",
Expand Down Expand Up @@ -2208,7 +2206,6 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
Expand Down Expand Up @@ -2252,7 +2249,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREPROCESSOR_DEFINITIONS = (
CHIP_HAVE_CONFIG_H,
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
"$(inherited)",
"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
"MTR_ENABLE_PROVISIONAL=1",
Expand Down Expand Up @@ -2422,7 +2418,6 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREPROCESSOR_DEFINITIONS = (
CHIP_HAVE_CONFIG_H,
"CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>",
"$(inherited)",
"CHIP_CONFIG_SKIP_APP_SPECIFIC_GENERATED_HEADER_INCLUDES=1",
"MTR_ENABLE_PROVISIONAL=1",
Expand Down
8 changes: 6 additions & 2 deletions src/lib/address_resolve/AddressResolve.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,17 @@ class Resolver
} // namespace AddressResolve
} // namespace chip

// outside the open space, include the required platform headers for the
// actual implementation.
// Include the required platform header for the actual implementation, if defined.
// Otherwise assume the default implementation is being used.
// Expectations of this include:
// - define the `Impl::NodeLookupHandle` deriving from NodeLookupHandleBase
// - corresponding CPP file should provide a valid Resolver::Instance()
// implementation
#ifdef CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER
#include CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER
#else
#include <lib/address_resolve/AddressResolve_DefaultImpl.h>
#endif

namespace chip {
namespace AddressResolve {
Expand Down
6 changes: 0 additions & 6 deletions src/lib/address_resolve/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import("//build_overrides/chip.gni")

import("address_resolve.gni")

config("default_address_resolve_config") {
defines = [ "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=<lib/address_resolve/AddressResolve_DefaultImpl.h>" ]
}

static_library("address_resolve") {
public_deps = [
"${chip_root}/src/lib/asn1",
Expand All @@ -44,8 +40,6 @@ static_library("address_resolve") {
"AddressResolve_DefaultImpl.cpp",
"AddressResolve_DefaultImpl.h",
]

public_configs = [ ":default_address_resolve_config" ]
} else if (chip_address_resolve_strategy == "custom") {
# nothing to do here, custom implementation
# assume CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER is defined as a constant
Expand Down
Loading