diff --git a/.gitmodules b/.gitmodules index 824bd9954e506c..4eca51b5cf03f9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/scripts/checkout_submodules.py b/scripts/checkout_submodules.py index 0290182b5b4bff..4d527148c7d9b0 100755 --- a/scripts/checkout_submodules.py +++ b/scripts/checkout_submodules.py @@ -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) diff --git a/src/lwip/lwip.gni b/src/lwip/lwip.gni index 89b4808af8fa5a..cbbf0a4f74c901 100644 --- a/src/lwip/lwip.gni +++ b/src/lwip/lwip.gni @@ -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 = ""