Skip to content

Commit

Permalink
Don't try to use the lwip library on Darwin. (#36258)
Browse files Browse the repository at this point in the history
Don't try to build against the library, and don't check out the submodule for
the darwin platform.
  • Loading branch information
bzbarsky-apple authored Oct 28, 2024
1 parent 2142870 commit 215cb5c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@
[submodule "third_party/lwip/repo"]
path = third_party/lwip/repo
url = https://github.com/lwip-tcpip/lwip.git
excluded-platforms = darwin
[submodule "third_party/abseil-cpp/src"]
path = third_party/abseil-cpp/src
url = https://github.com/abseil/abseil-cpp.git
Expand Down
12 changes: 12 additions & 0 deletions scripts/checkout_submodules.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ def load_module_info() -> None:
platforms = set(filter(None, platforms))
assert not (
platforms - ALL_PLATFORMS), "Submodule's platform not contained in ALL_PLATFORMS"

# Check for explicitly excluded platforms
excluded_platforms = module.get('excluded-platforms', '').split(',')
excluded_platforms = set(filter(None, excluded_platforms))
assert not (
excluded_platforms - ALL_PLATFORMS), "Submodule excluded on platforms not contained in ALL_PLATFORMS"

if len(excluded_platforms) != 0:
if len(platforms) == 0:
platforms = ALL_PLATFORMS
platforms = platforms - excluded_platforms

recursive = module.getboolean('recursive', False)
name = name.replace('submodule "', '').replace('"', '')
yield Module(name=name, path=module['path'], platforms=platforms, recursive=recursive)
Expand Down
3 changes: 2 additions & 1 deletion src/lwip/lwip.gni
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

declare_args() {
# Have the lwIP library available.
chip_with_lwip = current_os != "zephyr" && current_os != "mbed"
chip_with_lwip = current_os != "zephyr" && current_os != "mbed" &&
current_os != "mac" && current_os != "ios"

# lwIP platform: standalone, freertos.
lwip_platform = ""
Expand Down

0 comments on commit 215cb5c

Please sign in to comment.