diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-11 23:45:40 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-11 23:45:40 -0700 |
| commit | b4e344bcf859f2df89637e0825a2e0e57d092ef6 (patch) | |
| tree | 44465c5c3eadcfdc57f0a0a3eb5cffff9107bd7f /lib/std/build/write_file.zig | |
| parent | 3d0f4b90305bc1815ccc86613cb3da715e9b62c0 (diff) | |
| parent | d3565ed6b48c9c66128f181e7b90b5348504cb3f (diff) | |
| download | zig-b4e344bcf859f2df89637e0825a2e0e57d092ef6.tar.gz zig-b4e344bcf859f2df89637e0825a2e0e57d092ef6.zip | |
Merge remote-tracking branch 'origin/master' into ast-memory-layout
Conflicts:
* lib/std/zig/ast.zig
* lib/std/zig/parse.zig
* lib/std/zig/parser_test.zig
* lib/std/zig/render.zig
* src/Module.zig
* src/zir.zig
I resolved some of the conflicts by reverting a small portion of
@tadeokondrak's stage2 logic here regarding `callconv(.Inline)`.
It will need to get reworked as part of this branch.
Diffstat (limited to 'lib/std/build/write_file.zig')
| -rw-r--r-- | lib/std/build/write_file.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/std/build/write_file.zig b/lib/std/build/write_file.zig index bbe6ec5086..6e88aa5633 100644 --- a/lib/std/build/write_file.zig +++ b/lib/std/build/write_file.zig @@ -32,7 +32,10 @@ pub const WriteFileStep = struct { } pub fn add(self: *WriteFileStep, basename: []const u8, bytes: []const u8) void { - self.files.append(.{ .basename = basename, .bytes = bytes }) catch unreachable; + self.files.append(.{ + .basename = self.builder.dupePath(basename), + .bytes = self.builder.dupe(bytes), + }) catch unreachable; } /// Unless setOutputDir was called, this function must be called only in |
