SIGN IN SIGN UP

Add EXECUTORCH_SEPARATE_FLATCC_HOST_PROJECT cmake option (#3356)

Summary:
Currently, we always build two copies of the flatcc targets, just in case we happen to be cross-compiling. But because the flatcc project puts its binaries in the source directory, those two copies can interfere with each other.

We don't need to build two copies when not cross-compiling, so add a new option to avoid the second "host" build.

Eventually we should only enable this when cross-compiling, but for now disable it when building the pip package (which is never cross-compiled).

Pull Request resolved: https://github.com/pytorch/executorch/pull/3356

Test Plan: `rm -rf pip-out && ./install_requirements.sh` succeeded. Looking in the `pip-out/temp.*/cmake-out` directory, there is no `_host_build` directory, but the etdump headers were successfully generated under `pip-out/temp.*/cmake-out/sdk/include/executorch/sdk/etdump/`.

Reviewed By: malfet, larryliu0820

Differential Revision: D56582507

Pulled By: dbort

fbshipit-source-id: 4ce6c680657bc57cfcf016826364a3f46c4c953e
D
Dave Bort committed
80d72f2d65e752a3b01336b5e72323bac53b3659
Parent: 7b3b485
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 4/25/2024, 5:48:28 PM