Clang and -frandom-seed

Erik Cederstrand erik at cederstrand.dk
Sun Nov 14 22:47:56 UTC 2010


Hello toolchainers,

I noticed that two consecutive builds of (GCC-built) Clang don't produce identical binaries. This is true for clang, clang++ and tblgen. I asked on the llvm-dev list yesterday, and it turns out it's because GCC uses a random seed on some symbols. Apparently, this can be controlled with the -frandom-seed flag. I haven't tested if this is also the case for Clang-built Clang.

I'm not sure I understand the exact implications, but I'm wondering if we could add the flag to the build scripts in FreeBSD in a way that both satisfies the randomness criteria and makes builds deterministic?

Thanks,
Erik


More information about the freebsd-toolchain mailing list