That sounds like bliss! It would be great if we could have a way to do this today. It would really help with security and debugging and could help reduce compile times. If everybody in a development team is using the same tool chain, determined by the checksum for the toolchain, then many of the compiled files could be shared among the team.
It would allow build systems to look at checksum of the output and input files to see if a file is up to date or needs rebuilding. This is much more reliable than using mtimes. A log would need to be kept of which inputs give which outputs, but that seems worth it.