Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow Epic's logic for removing debug symbols #346

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

uhlenbrock
Copy link
Contributor

@uhlenbrock uhlenbrock commented Jan 11, 2024

There are pdb files, not prefaced with UnrealEngine, which are expected to be present when creating a shipping build.

  • C:\UnrealEngine\Engine\Binaries\Win64\tbb.pdb
  • C:\UnrealEngine\Engine\Binaries\Win64\tbbmalloc.pdb

/cc @slonopotamus

There are `pdb` files, not prefaced with `UnrealEngine`, which are expected to be present when creating a shipping build.
@slonopotamus
Copy link
Collaborator

While this doesn't properly handle UE4 where things were called *UE4Editor*.pdb, I guess we can ignore that because the issue this is fixing only happens with UE-5.3+.

@slonopotamus slonopotamus merged commit 3607cb1 into adamrehn:master Jan 11, 2024
5 of 17 checks passed
adamrehn added a commit that referenced this pull request Jun 26, 2024
@adamrehn
Copy link
Owner

While performing testing for #359, I discovered that this change actually breaks 4.27 builds when not excluding debug symbols, hitting the following error:

 ---> c114ea905ab9
Step 29/34 : COPY --from=builder C:\UnrealEngine\Components\DebugSymbols C:\UnrealEngine
COPY failed: stat C:\UnrealEngine\Components\DebugSymbols: file does not exist

The new glob pattern doesn't match any PDB files at all under 4.27, so the DebugSymbols directory is empty. Evidently the COPY directive doesn't like merging an empty directory over an existing one, leading to the somewhat misleading error message shown above. Excluding debug symbols avoids this, but it doesn't actually reduce the image size, since all of the PDB files are left in their original locations and end up being copied into the final image stage. I've adjusted the glob pattern in commit 4e53548 to match both UE4Editor and UnrealEditor, and testing has confirmed that it works correctly for both Unreal Engine 4.27.2 and 5.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants