Skip to content

Commit 2894de8

Browse files
committed
Update
[ghstack-poisoned]
2 parents 468207a + 24ee4f9 commit 2894de8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,17 @@ def get_build_type(is_debug=None) -> str:
313313
return "Debug" if debug else "Release"
314314

315315

316+
# Headers whose implementations are built as separate targets and are not part of
317+
# the runtime the wheel ships. Copying them would let an application compile
318+
# against an API it then cannot link.
319+
_UNSUPPORTED_WHEEL_HEADERS = frozenset(
320+
{
321+
"file_descriptor_data_loader.h",
322+
"serialize.h",
323+
}
324+
)
325+
326+
316327
def get_dynamic_lib_name(name: str) -> str:
317328
if _is_windows():
318329
return f"{name}.dll"
@@ -780,6 +791,8 @@ def run(self):
780791
]:
781792
src_list = Path(include_dir).rglob("*.h")
782793
for src in src_list:
794+
if src.name in _UNSUPPORTED_WHEEL_HEADERS:
795+
continue
783796
src_to_dst.append(
784797
(str(src), os.path.join("include/executorch", str(src)))
785798
)

0 commit comments

Comments
 (0)