Truncate symbol hashes to 64 bits.
This commit is contained in:
parent
8ec03b37c0
commit
4e752651f4
@ -34,6 +34,7 @@ use std::run;
|
||||
use std::str;
|
||||
use std::io;
|
||||
use std::io::fs;
|
||||
use extra::hex::ToHex;
|
||||
use extra::tempfile::TempDir;
|
||||
use syntax::abi;
|
||||
use syntax::ast;
|
||||
@ -494,8 +495,10 @@ pub fn build_link_meta(sess: Session,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn truncated_hash_result(symbol_hasher: &mut Sha256) -> ~str {
|
||||
symbol_hasher.result_str()
|
||||
fn truncated_hash_result(symbol_hasher: &mut Sha256) -> ~str {
|
||||
let output = symbol_hasher.result_bytes();
|
||||
// 64 bits should be enough to avoid collisions.
|
||||
output.slice_to(8).to_hex()
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user