Skip to content

precompiled releases include debug symbols #124

Description

@dbernheisel

binaries shipped in github releases contain debug symbols. Stripping them would reduce download and Docker image sizes with no impact on functionality.

Reproduction

FROM hexpm/elixir:1.19.5-erlang-28.3-debian-trixie-20260112-slim

RUN apt-get update -qq \
    && apt-get install -y -qq --no-install-recommends curl file binutils ca-certificates > /dev/null 2>&1

RUN mkdir -p /tmp/xla && cd /tmp/xla \
    && curl -sL -o xla.tar.gz \
       "https://github.com/elixir-nx/xla/releases/download/v0.9.1/xla_extension-0.9.1-x86_64-linux-gnu-cpu.tar.gz" \
    && tar xzf xla.tar.gz

RUN file /tmp/xla/xla_extension/lib/libxla_extension.so
# ELF 64-bit LSB shared object, x86-64, ..., not stripped
RUN strip /tmp/xla/xla_extension/lib/libxla_extension.so
RUN file /tmp/xla/xla_extension/lib/libxla_extension.so

the after is with strip libxla_extension.so

x86_64-linux-gnu-cpu (v0.9.1):

  • before: 423 MB
  • after: 324 MB
  • saved: ~100 MB (24%)

aarch64-linux-gnu-cuda12 (v0.9.1):

  • before: 470 MB
  • after: 349 MB
  • saved: ~121 MB (26%)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions