Skip to content

llvm-strip invalidates digital signature of MSVC redists #855

@neilmehta24

Description

@neilmehta24

When creating the stripped release, llvm-strip is called over ALL dlls, including those that are not from the python build. vcruntime140.dll and vcruntime140_1.dll are provided by Microsoft in order to ensure that the compiled program can run on a different machine. The stripping should be limited to removing the python debug symbols, and leaving the redist files alone.

The signature can be checked in powershell with:
Get-AuthenticodeSignature <PATH>
Or in the file explorer by right clicking the file --> clicking properties --> clicking digital signatures

See that the signature is intact in the non-stripped variant: https://github.com/astral-sh/python-build-standalone/releases/download/20240814/cpython-3.11.9%2B20240814-x86_64-pc-windows-msvc-install_only.tar.gz
And the signature is removed in the stripped variant: https://github.com/astral-sh/python-build-standalone/releases/download/20240814/cpython-3.11.9%2B20240814-x86_64-pc-windows-msvc-install_only_stripped.tar.gz

For each VC dll, stripping only removes 11 KB from the file. So skipping the strip on this file will barely have an impact on the overall distribution size.

Keeping the signature intact will fix certain cases where the python build is not redistributable

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