-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make wholesale replacement of lwIP more straightforward (#31025)
* Make wholesale replacement of lwIP more straightforward Instead of everyone directly adjusting the definintions in src/lwip, which only works in-tree, clean up the dependencies so that overriding lwip_root works cleanly (ie, without introducing dependencies on $chip_root/src/lwip). See docs in third_party/lwip/BUILD.gn * Fix use of vendored lwip from EFR32 builds * Fix potential .o file naming conflicts If multiple libraries compile src/lwip/freertos/sys_arch.c, this causes problems from having the same .o file name. Use different library names to make sure this does not happen. * Fixups for genio-lighting-app build * Clarify ways to set lwip_root * Restyled by gn --------- Co-authored-by: Restyled.io <[email protected]>
- Loading branch information
Showing
17 changed files
with
213 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Copyright (c) 2020 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/chip.gni") | ||
|
||
# Re-export the Matter lwip integration as "lwip" | ||
# | ||
# To depend on lwip while keeping the implementation target | ||
# encapsulated: | ||
# | ||
# import("//build_overrides/lwip.gni") | ||
# | ||
# source_set("foo") { | ||
# public_deps = [ | ||
# "${lwip_root}:lwip", | ||
# ... | ||
# ] | ||
# } | ||
# | ||
# and set up the build_overrides appropriately (a typical lwip_root | ||
# would be //third_party/lwip). | ||
# | ||
# To help define the library, a reusable template is provided as | ||
# lwip_target() in third_party/lwip/lwip.gni. Example usage: | ||
# | ||
# //example/lwip/BUILD.gn: | ||
# | ||
# config("lwip_config") { | ||
# include_dirs = [ "include" ] | ||
# } | ||
# | ||
# lwip_target("lwip") { | ||
# public = [ | ||
# "include/lwipopts.h" | ||
# ] | ||
# | ||
# sources = [ "sys_arch.c" ] | ||
# | ||
# public_configs = [ | ||
# ":lwip_config", | ||
# ] | ||
# } | ||
# | ||
# Then set lwip_root = "//example/lwip" in build_overrides (or, | ||
# if declared as an argument in build_overrides, via args). | ||
# | ||
# Defining the library directly works too. | ||
# | ||
# If there's no include paths to add, defines to set, sources to | ||
# compile, or libraries to link, then an empty group target suffices. | ||
group("lwip") { | ||
public_deps = [ "${chip_root}/src/lwip:lwip" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2023 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import("//build_overrides/mt793x_sdk.gni") | ||
|
||
import("${mt793x_sdk_build_root}/lwip/lwip.gni") | ||
|
||
config("lwip_config") { | ||
include_dirs = [ | ||
"${chip_root}/src/lwip/mt793x", | ||
"${chip_root}/src/lwip/freertos", | ||
] | ||
} | ||
|
||
lwip_target("lwip") { | ||
public = [ | ||
"${chip_root}/src/lwip/mt793x/arch/cc.h", | ||
"${chip_root}/src/lwip/mt793x/arch/perf.h", | ||
"${chip_root}/src/lwip/mt793x/lwipopts.h", | ||
] | ||
|
||
sources = [] | ||
|
||
public_deps = [ | ||
"${chip_root}/src/lwip:lwip_buildconfig", | ||
"${mt793x_sdk_build_root}:mt793x_sdk", | ||
] | ||
|
||
public_configs = [ | ||
":lwip_config", | ||
"${chip_root}/src:includes", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.