Skip to content

Switch from print_exported_headers to CMake's installed headers in scripts/build_apple_frameworks.sh #13559

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

Open
wants to merge 2 commits into
base: gh/swolchok/555/head
Choose a base branch
from

Conversation

swolchok
Copy link
Contributor

This removes the need to use Buck in this script. The previous PR (#13485) adds enforcement that we don't install non-public headers from CMake.

I built the frameworks before and after. Here is a diff of all headers
present in the frameworks:
https://gist.github.com/swolchok/70647b551da7827a9cbdb083fad1e209

Generally, we now include more headers than before. The only header we
used to include that we no longer include is
schema/extended_header.h. It looks like we are not including the rest
of the headers for the PTE schema anyway, so I propose that we fix
installation of the schema headers separately.

[ghstack-poisoned]
@swolchok swolchok requested a review from GregoryComer as a code owner August 20, 2025 18:17
@swolchok
Copy link
Contributor Author

swolchok commented Aug 20, 2025

Copy link

pytorch-bot bot commented Aug 20, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/13559

Note: Links to docs will display an error until the docs builds have been completed.

❌ 2 New Failures

As of commit 7f0e6fc with merge base 335de46 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

swolchok added a commit that referenced this pull request Aug 20, 2025
…ripts/build_apple_frameworks.sh

This removes the need to use Buck in this script. The previous PR (#13485) adds enforcement that we don't install non-public headers from CMake.

I built the frameworks before and after. Here is a diff of all headers
present in the frameworks:
https://gist.github.com/swolchok/70647b551da7827a9cbdb083fad1e209

Generally, we now include more headers than before. The only header we
used to include that we no longer include is
schema/extended_header.h. It looks like we are not including the rest
of the headers for the PTE schema anyway, so I propose that we fix
installation of the schema headers separately.


ghstack-source-id: 626397b
ghstack-comment-id: 3207551649
Pull-Request: #13559
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 20, 2025
@swolchok swolchok requested a review from shoumikhin August 20, 2025 18:44
@swolchok swolchok added the release notes: none Do not include this in the release notes label Aug 20, 2025
@shoumikhin
Copy link
Contributor

shoumikhin commented Aug 21, 2025

There are a lot of headers for the code not shipped with the executorch runtime framework, so anyone using them by mistake will run into missing symbols error.
E.g. extension/llm headers technically belong to a different framework executorch_llm (although we currently don't expose them in favor of the native ObjC/Swift APIs).
Let's try to keep the set of headers we ship to the minimum and make sure we do have the corresponding implementation in .a we ship. Ideally, nothing should change.

[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants