Skip to content

Commit 5c0e34d

Browse files
committed
Don`t include timestamp as debug file info
1 parent 077209e commit 5c0e34d

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/debuginfo/line_info.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::ffi::OsStr;
2-
use std::time::SystemTime;
32
use std::path::{Component, Path};
43

54
use crate::prelude::*;
@@ -67,14 +66,10 @@ fn line_program_add_file(
6766
buf
6867
});
6968

70-
line_program.file_has_timestamp = true;
7169
line_program.file_has_md5 = md5.is_some();
7270

7371
line_program.add_file(file_name, dir_id, Some(FileInfo {
74-
timestamp: SystemTime::now()
75-
.duration_since(SystemTime::UNIX_EPOCH)
76-
.map(|t| t.as_secs())
77-
.unwrap_or(0),
72+
timestamp: 0,
7873
size: 0,
7974
md5: md5.unwrap_or_default(),
8075
}))

src/debuginfo/mod.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
mod emit;
22
mod line_info;
33

4-
use std::time::SystemTime;
5-
64
use crate::prelude::*;
75

86
use rustc_span::{FileName, SourceFileHash, SourceFileHashAlgorithm};
@@ -83,15 +81,11 @@ impl<'tcx> DebugContext<'tcx> {
8381
LineString::new(comp_dir.as_bytes(), encoding, &mut dwarf.line_strings),
8482
LineString::new(name.as_bytes(), encoding, &mut dwarf.line_strings),
8583
Some(FileInfo {
86-
timestamp: SystemTime::now()
87-
.duration_since(SystemTime::UNIX_EPOCH)
88-
.map(|t| t.as_secs())
89-
.unwrap_or(0),
84+
timestamp: 0,
9085
size: 0,
9186
md5: md5.unwrap_or_default(),
9287
}),
9388
);
94-
line_program.file_has_timestamp = true;
9589
line_program.file_has_md5 = md5.is_some();
9690

9791
dwarf.unit.line_program = line_program;

0 commit comments

Comments
 (0)