镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Introduce symbol stripping build task for HelloiOS sample app #80977

Closed

Description

@kotlarmilos

Description

When building HelloiOS application the process uses dotnet SDK and local build tasks (mainly developed for testing purposes) which do not fully prepare the application for deployment. For example, when deploying an iOS application, debug symbols need to be extracted into a separate dSYM folder/file, then stripped away from the main binary, after which the binary needs to be resigned.

In the build process, the -S parameter only strips out debug information and not the symbol table. If strip is called without parameters, it further brings down the size on disk, but the app fails at the runtime. To fix this it is required to collect all the symbols needed during runtime and passing them to the strip tool via -i -s <symbols_to_keep>.

Tasks

  • Update build task in HelloiOS app to collect all symbols needed during runtime
  • Update build task in HelloiOS app to strip symbols by using -i -s <symbols_to_keep>
  • Preserve debug symbols by extracting them from the binary with dsymutil
  • Test and integrate the update into the perf dashboard

Activity

  1. added this to the 8.0.0 milestone on Jan 21, 2023
  2. self-assigned this
    on Jan 21, 2023
  3. ivanpovazan commented on Jan 23, 2023

    @ivanpovazan
    Member

    [ ] Update build task in HelloiOS app to collect all symbols needed during runtime

    For start, I would suggest stripping out all the symbols (strip with no parameters) from the application and try to run it on a device, to get a sense of which symbols need to be preserved. For example, Xamarin collects all P/Invoke symbols used in a program, in a custom linker step, and generates a file (referred above as: symbols_to_keep) which is used in symbol stripping.

    Additionally, we might want to preserve debug symbols by extracting them from the binary with dsymutil to be made available for later resymbolication.

  4. kotlarmilos commented on Jan 23, 2023

    @kotlarmilos
    MemberAuthor

    I tried to invoke strip $(AppBundlePath)/$(AppName) without any parameters and I am able to run the application on device and a simulator. I might be doing something wrong.

    Additionally, we might want to preserve debug symbols by extracting them from the binary with dsymutil to be made available for later resymbolication.

    It make sense to have it aligned with Xamarin build. I will add it to the list of tasks.

  5. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jan 30, 2023
  6. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Feb 2, 2023
  7. ghost locked as resolved and limited conversation to collaborators on Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions