From 9ba3f858902bd706db32ecda9e7e140488007986 Mon Sep 17 00:00:00 2001 From: Duy Tran <40482367+khanhduytran0@users.noreply.github.com> Date: Wed, 23 Sep 2026 14:48:29 +0700 Subject: [PATCH] chore: strip resulting binary Resulting StikJIT binary dropped from 18MB to 2.5MB --- project.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/project.yml b/project.yml index 5439bb2..31f94d6 100644 --- a/project.yml +++ b/project.yml @@ -34,12 +34,18 @@ targets: DEFINES_MODULE: YES BUILD_LIBRARY_FOR_DISTRIBUTION: YES SKIP_INSTALL: NO - # idevice FFI: modulemap/headers to compile `import idevice`, and force_load the - # static lib so all its symbols are embedded in the framework binary (self-contained). + # Embed only the idevice code reachable from StikJIT. Keep archive symbols + # private so unused FFI/Rust exports do not become dead-strip roots. SWIFT_INCLUDE_PATHS: "$(SRCROOT)/idevice $(SRCROOT)/iokit" HEADER_SEARCH_PATHS: "$(SRCROOT)/idevice $(SRCROOT)/iokit" LIBRARY_SEARCH_PATHS: "$(SRCROOT)/idevice" - OTHER_LDFLAGS: "-force_load $(SRCROOT)/idevice/libidevice_ffi.a" + OTHER_LDFLAGS: "$(inherited) -Wl,-hidden-lidevice_ffi" + DEAD_CODE_STRIPPING: YES + configs: + Release: + # Remove private symbol names from the shipped binary; keep the dSYM. + STRIP_INSTALLED_PRODUCT: YES + STRIP_STYLE: non-global schemes: StikJIT: