Skip to content
Closed
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
5 changes: 3 additions & 2 deletions exir/_serialize/_flatbuffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ def _run_flatc(args: Sequence[str]) -> None:
with importlib.resources.path(__package__, _FLATC_RESOURCE_NAME) as flatc_path:
subprocess.run([flatc_path] + list(args), check=True)
else:
# Expect the `flatc` tool to be on the system path.
subprocess.run(["flatc"] + list(args), check=True)
# Expect the `flatc` tool to be on the system path or set as an env var.
flatc_path = os.getenv("FLATC_EXECUTABLE", "flatc")
subprocess.run([flatc_path] + list(args), check=True)


def _flatc_compile(output_dir: str, schema_path: str, json_path: str) -> None:
Expand Down