Don`t include timestamp as debug file info

This commit is contained in:
Kitsu 2020-04-18 16:02:02 +03:00
parent 077209e565
commit 5c0e34d7ab
2 changed files with 2 additions and 13 deletions

View File

@ -1,5 +1,4 @@
use std::ffi::OsStr;
use std::time::SystemTime;
use std::path::{Component, Path};
use crate::prelude::*;
@ -67,14 +66,10 @@ fn line_program_add_file(
buf
});
line_program.file_has_timestamp = true;
line_program.file_has_md5 = md5.is_some();
line_program.add_file(file_name, dir_id, Some(FileInfo {
timestamp: SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.map(|t| t.as_secs())
.unwrap_or(0),
timestamp: 0,
size: 0,
md5: md5.unwrap_or_default(),
}))

View File

@ -1,8 +1,6 @@
mod emit;
mod line_info;
use std::time::SystemTime;
use crate::prelude::*;
use rustc_span::{FileName, SourceFileHash, SourceFileHashAlgorithm};
@ -83,15 +81,11 @@ impl<'tcx> DebugContext<'tcx> {
LineString::new(comp_dir.as_bytes(), encoding, &mut dwarf.line_strings),
LineString::new(name.as_bytes(), encoding, &mut dwarf.line_strings),
Some(FileInfo {
timestamp: SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.map(|t| t.as_secs())
.unwrap_or(0),
timestamp: 0,
size: 0,
md5: md5.unwrap_or_default(),
}),
);
line_program.file_has_timestamp = true;
line_program.file_has_md5 = md5.is_some();
dwarf.unit.line_program = line_program;