| author | |
| committer | |
| log | 9dc25dd0b695c907e861bfd5a974cf454e657228 |
| tree | ef5b97ab68330ec2b2b9a018b53d1e79aeef19f7 |
| parent | 55243cfb31e40f09503fbc5b4bb63e7a5d3d87eb |
2 files changed, 7 insertions(+), 1 deletions(-)
src/Compilation.zig+1-1| ... | @@ -1985,7 +1985,7 @@ pub fn update(comp: *Compilation) !void { | ... | @@ -1985,7 +1985,7 @@ pub fn update(comp: *Compilation) !void { |
| 1985 | 1985 | ||
| 1986 | // This resets the link.File to operate as if we called openPath() in create() | 1986 | // This resets the link.File to operate as if we called openPath() in create() |
| 1987 | // instead of simulating -fno-emit-bin. | 1987 | // instead of simulating -fno-emit-bin. |
| 1988 | var options = comp.bin_file.options; | 1988 | var options = comp.bin_file.options.move(); |
| 1989 | if (comp.whole_bin_sub_path) |sub_path| { | 1989 | if (comp.whole_bin_sub_path) |sub_path| { |
| 1990 | options.emit = .{ | 1990 | options.emit = .{ |
| 1991 | .directory = tmp_artifact_directory.?, | 1991 | .directory = tmp_artifact_directory.?, |
src/link.zig+6| ... | @@ -167,6 +167,12 @@ pub const Options = struct { | ... | @@ -167,6 +167,12 @@ pub const Options = struct { |
| 167 | pub fn effectiveOutputMode(options: Options) std.builtin.OutputMode { | 167 | pub fn effectiveOutputMode(options: Options) std.builtin.OutputMode { |
| 168 | return if (options.use_lld) .Obj else options.output_mode; | 168 | return if (options.use_lld) .Obj else options.output_mode; |
| 169 | } | 169 | } |
| 170 | |||
| 171 | pub fn move(self: *Options) Options { | ||
| 172 | const copied_state = self.*; | ||
| 173 | self.system_libs = .{}; | ||
| 174 | return copied_state; | ||
| 175 | } | ||
| 170 | }; | 176 | }; |
| 171 | 177 | ||
| 172 | pub const File = struct { | 178 | pub const File = struct { |