Summary
On iOS and Mac, a default BuildCookRun Shipping build produces an executable that still contains its symbol table, even with -nodebuginfo. Two UBT settings control this: bStripSymbols (-stripsymbols) and bCreateStripFlagFile (-createstripflagfile). Their current behavior:
bCreateStripFlagFile = false (default) |
bCreateStripFlagFile = true |
|
|---|---|---|
bStripSymbols = false (Development default) |
Not stripped | Not stripped |
bStripSymbols = true (forced in Shipping) |
Not stripped (strip action is created but dropped by the action graph) | Stripped, plus <Exe>.stripped in Intermediate |
Only the bottom-right cell actually strips, so a Shipping build is not stripped unless -createstripflagfile is also passed. Expected: Shipping, or any build with bStripSymbols = true, should strip by default, without needing bCreateStripFlagFile.
Expected behavior:
bCreateStripFlagFile = false (default) |
bCreateStripFlagFile = true |
|
|---|---|---|
bStripSymbols = false (Development default) |
Not stripped | Not stripped |
bStripSymbols = true (forced in Shipping) |
Stripped in place, no extra file; up-to-date tracking based on the executable itself | Stripped, plus <Exe>.stripped in Intermediate |
Notes from investigating the cause:
-
In
AppleToolChain.PostBuild, whenbCreateStripFlagFileis false, the strip action has no produced items.ActionGraph.GatherPrerequisiteActionsonly schedules actions that produce a requested output, so the strip action is silently skipped. It cannot simply declare the executable as its output either, because the link action already produces it (ActionGraph.CheckForConflicts). -
This appears to be a regression from CL 43273415 (“Update Mac Toolchain to strip symbols & consolidate shared Apple platform logic”, 2025-06-05). Before that change, the iOS strip action always produced a
.strippedfile and ran correctly. -
Ordering with dSYM generation:
stripremoves the debug map thatdsymutilrelies on, and the strip action currently has no dependency on the dSYM / debug-info action. Once stripping actually runs, it can run beforedsymutilwhen dSYMs are enabled, which produces an empty dSYM. This also applies to thebCreateStripFlagFile = truecase today.
What Type of Bug are you experiencing?
Other
Steps to Reproduce
- On a Mac, take any C++ project, or a Blueprint project with a code target.
- Build the game target for Mac (or iOS) in Shipping, with no extra arguments:
Build.sh Mac Shipping -Project=.uproject - Check the build log. There is no Stripping symbols from … action.
- Inspect the executable:
nm -a Binaries/Mac/-Mac-Shipping | wc -l
(or check Binaries/IOS/-IOS-Shipping for iOS)
Note the symbol count and the file size. - Package with BuildCookRun -clientconfig=Shipping -nodebuginfo, and inspect the executable inside the .app / .ipa. The symbols are still present.
- Rebuild the same target with -createstripflagfile added, and repeat steps 3 and 4.
Expected Result
A Shipping (or -stripsymbols) Apple executable is stripped by default, the same as on Linux and Android, where the packaged binary never carries the full symbol table. bCreateStripFlagFile should only control whether a tracking file is written. It should not decide whether stripping happens at all.
Observed Result
Step 3: no strip action runs.
Step 4: the executable keeps its full local symbol table and debug map (high nm count, larger binary).
Step 5: the packaged app ships these symbols even though debug files were excluded.
Step 6: with -createstripflagfile, Stripping symbols from … appears, the nm count drops sharply, the binary shrinks, and .stripped is created.
Affects Versions
5.8
Platform(s)
iOS
Mac
visionOS