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

[ELF] Change build-id default to sha1 #93943

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Commits on Jun 10, 2024

  1. [ELF] Change build-id default to sha1

    The current default, build-id=fast, is only 8 bytes due to the usage of
    64-bit XXH3. This is incompatible with RPM packaging tools which
    requires >=16 bytes [1].
    
    In Clang the ENABLE_LINKER_BUILD_ID define makes it pass --build-id
    without a specific hash type. When also defaulting to LLD, this provides
    a pretty broken default out-of-box.
    
    Using XXH3 was a considerable performance advantage when build-id was
    first implemented, because sha1 was really sha1 and rather slow.
    Nowadays sha1 is just 160-bit BLAKE3 which is decently fast and not
    cryptographically broken, so it should be a good default.
    
    Note that the default remains "fast" for wasm because sha1 for wasm is
    still real sha1.
    
    Close llvm#43483.
    
    [1]: https://github.com/rpm-software-management/rpm/blob/b7d427728b8ba8734ba47d51849a5736bdd727cd/build/files.c#L1883
    ishitatsuyuki committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    18628b0 View commit details
    Browse the repository at this point in the history