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

Building libCHIP.a via the Xcode build connector seems to involve codegen #24554

Closed
bzbarsky-apple opened this issue Jan 20, 2023 · 1 comment · Fixed by #24555
Closed

Building libCHIP.a via the Xcode build connector seems to involve codegen #24554

bzbarsky-apple opened this issue Jan 20, 2023 · 1 comment · Fixed by #24555

Comments

@bzbarsky-apple
Copy link
Contributor

There shouldn't be anything in libCHIP.a that depends on codegen, but what chip_xcode_build_connector.sh does right now (skipping some bits that I am pretty sure are irrelevant):

declare -a args=(
    'default_configs_cosmetic=[]' # suppress colorization
    'chip_crypto="boringssl"'
    'chip_build_tools=false'
    'chip_build_tests=false'
    'chip_enable_wifi=false'
    'chip_log_message_max_size=4096' # might as well allow nice long log messages
    'chip_disable_platform_kvs=true'
    "target_cpu=\"$target_cpu\""
    "target_defines=$target_defines"
    "target_cflags=[$target_cflags]"
    "mac_target_arch=\"$target_arch\""
    "mac_deployment_target=\"$LLVM_TARGET_TRIPLE_OS_VERSION$LLVM_TARGET_TRIPLE_SUFFIX\""
)
...
    args+=(
        'target_os="mac"'
    )
...
    gn --root="$CHIP_ROOT" gen --check out --args="${args[*]}"
    exec ninja -v -C out

ends up failing if ZAP is not installed. What's not clear to me is what about that command line is really saying "just build libCHIP.a", but the net effect is that there is just a libCHIP.a in out/lib (well, and libmbedtls.a for some reason and libnlunit-test.a) and no executables in out. So clearly the build is in fact just building things that should not depend on codegen.

We need to figure out two things:

  1. Do these things in fact depend on codegen? If so, we need to fix that. But I suspect they do not in practice.
  2. Is the build system just confused about whether they depend on codegen? If so, we need to fix that.

@mspang @andy31415

@bzbarsky-apple
Copy link
Contributor Author

Looks like the dependency here may be through libChipController which uses CHIPClusters.h. Going to see if I can just remove that dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant