Skip to content

Commit 6c83444

Browse files
Don't try to use the lwip library on Darwin.
Don't try to build against the library, and don't check out the submodule for the darwin platform.
1 parent 0b981e7 commit 6c83444

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.gitmodules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@
332332
[submodule "third_party/lwip/repo"]
333333
path = third_party/lwip/repo
334334
url = https://github.com/lwip-tcpip/lwip.git
335+
excluded-platforms = darwin
335336
[submodule "third_party/abseil-cpp/src"]
336337
path = third_party/abseil-cpp/src
337338
url = https://github.com/abseil/abseil-cpp.git

scripts/checkout_submodules.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ def load_module_info() -> None:
6666
platforms = set(filter(None, platforms))
6767
assert not (
6868
platforms - ALL_PLATFORMS), "Submodule's platform not contained in ALL_PLATFORMS"
69+
70+
# Check for explicitly excluded platforms
71+
excluded_platforms = module.get('excluded-platforms', '').split(',')
72+
excluded_platforms = set(filter(None, excluded_platforms))
73+
assert not (
74+
excluded_platforms - ALL_PLATFORMS), "Submodule excluded on platforms not contained in ALL_PLATFORMS"
75+
76+
if len(excluded_platforms) != 0:
77+
if len(platforms) == 0:
78+
platforms = ALL_PLATFORMS
79+
platforms = platforms - excluded_platforms
80+
6981
recursive = module.getboolean('recursive', False)
7082
name = name.replace('submodule "', '').replace('"', '')
7183
yield Module(name=name, path=module['path'], platforms=platforms, recursive=recursive)

src/lwip/lwip.gni

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
declare_args() {
1616
# Have the lwIP library available.
17-
chip_with_lwip = current_os != "zephyr" && current_os != "mbed"
17+
chip_with_lwip = current_os != "zephyr" && current_os != "mbed" &&
18+
current_os != "mac" && current_os != "ios"
1819

1920
# lwIP platform: standalone, freertos.
2021
lwip_platform = ""

0 commit comments

Comments
 (0)