aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorTatsuyuki Ishi <ishitatsuyuki@google.com>2024-06-11 02:14:44 +0900
committerGitHub <noreply@github.com>2024-06-10 10:14:44 -0700
commit1d96e4bc2d09bc085e7c1b303d930684756b94a7 (patch)
tree5a63a08083f7a25520b1354066ea1141d1fe774d /clang/lib/CodeGen/CodeGenModule.cpp
parentcaf2de76e4c3ec70e012bc2582349d34ec6018fc (diff)
downloadllvm-1d96e4bc2d09bc085e7c1b303d930684756b94a7.zip
llvm-1d96e4bc2d09bc085e7c1b303d930684756b94a7.tar.gz
llvm-1d96e4bc2d09bc085e7c1b303d930684756b94a7.tar.bz2
[ELF] Change build-id default to sha1 (#93943)
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 https://github.com/llvm/llvm-project/issues/43483. [1]: https://github.com/rpm-software-management/rpm/blob/b7d427728b8ba8734ba47d51849a5736bdd727cd/build/files.c#L1883
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions