This is work in progress. I'm evaluating the patch now.
This change introduces the possibility to specify a style of build-id
generation that must be one of "md5", "sha1", "fast", "uuid", or
"0x<hexstring>". To set this style, one can set
DEFAULT_LINKER_BUILD_ID_STYLE. Setting the style will automatically
turn ON ENABLE_LINKER_BUILD_ID.
The effect is that invocations of the compiler will link with
--build-id=<style> by default, where <style> must be one of the
above.
Background:
Currently you can have clang invoke the linker (e.g. ld or lld)
automatically with --build-id when the CMake boolean option
ENABLE_LINKER_BUILD_ID is set to ON.
There's currently no way to specify what type of build-id generation
algorithm (e.g. md5, sha1, uuuid, fast) to choose by default. In [1]
we can see that the default build-id generation algorithm being
choosen is not large enough to because of overlaps with other build
ids.
An upstream bug for not choosing a different build-id generation
algorithm by default is shown in [2].
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=2023666
[2]: https://bugs.llvm.org/show_bug.cgi?id=44138