| author | |
| committer | |
| log | f5a941b3d6238222f43da568c96cfa5b3e56ce5d |
| tree | 37197f5121034108d880cff4c31c36e7608f09b6 |
| parent | 3bdbf81a3f574c0cf538b443825558e45bceecee |
| signature |
This is one possible approach to fixing an issue with reproducible
builds where the compiler's cwd changes the paths returned by `@src()`.1 files changed, 1 insertions(+), 2 deletions(-)
src/Sema.zig+1-2| ... | ... | @@ -17787,8 +17787,7 @@ fn zirBuiltinSrc( |
| 17787 | 17787 | }; |
| 17788 | 17788 | |
| 17789 | 17789 | const file_name_val = v: { |
| 17790 | // The compiler must not call realpath anywhere. | |
| 17791 | const file_name = try fn_owner_decl.getFileScope(mod).fullPath(sema.arena); | |
| 17790 | const file_name = fn_owner_decl.getFileScope(mod).sub_file_path; | |
| 17792 | 17791 | const array_ty = try pt.intern(.{ .array_type = .{ |
| 17793 | 17792 | .len = file_name.len, |
| 17794 | 17793 | .sentinel = .zero_u8, |