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

[darwin-framework-tool] Propagate chip_inet_config_enable_ipv4 to chi… #23683

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
[darwin-framework-tool] Propagate chip_inet_config_enable_ipv4 to chi…
…p_xcode_build_connector.sh
  • Loading branch information
vivien-apple committed Dec 5, 2022
commit d98c3714dfcd10261f716dab7129534b1041829d
9 changes: 9 additions & 0 deletions examples/darwin-framework-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ assert(chip_build_tools)

declare_args() {
chip_codesign = current_os == "ios"

# When config_enable_yaml_tests is false, the Matter SDK options are not available.
if (!config_enable_yaml_tests) {
chip_inet_config_enable_ipv4 = true
}
}

sdk = "macosx"
Expand Down Expand Up @@ -68,6 +73,10 @@ action("build-darwin-framework") {
]
}

if (defined(chip_inet_config_enable_ipv4) && !chip_inet_config_enable_ipv4) {
args += [ "--no-ipv4" ]
}

output_name = "Matter.framework"
outputs = [
"${root_out_dir}/macos_framework_output/Build/Products/${output_sdk_type}/${output_name}",
Expand Down
6 changes: 6 additions & 0 deletions scripts/build/build_darwin_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ def build_darwin_framework(args):
"GCC_INLINES_ARE_PRIVATE_EXTERN=NO",
"GCC_SYMBOLS_PRIVATE_EXTERN=NO",
]

if not args.ipv4:
command += [
"CHIP_INET_CONFIG_ENABLE_IPV4=NO",
]
command_result = run_command(command)

print("Build Framework Result: {}".format(command_result))
Expand Down Expand Up @@ -108,6 +113,7 @@ def build_darwin_framework(args):
parser.add_argument("--log_path",
help="Output log file destination",
required=True)
parser.add_argument('--ipv4', action=argparse.BooleanOptionalAction)

args = parser.parse_args()
build_darwin_framework(args)
6 changes: 6 additions & 0 deletions src/darwin/Framework/chip_xcode_build_connector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ declare -a args=(
)
}

[[ $CHIP_INET_CONFIG_ENABLE_IPV4 == NO ]] && {
args+=(
'chip_inet_config_enable_ipv4=false'
)
}

# search current (or $2) and its parent directories until
# a name match is found, which is output on stdout
find_in_ancestors() {
Expand Down