authorgravatar for timonkruiper@gmail.comTimon Kruiper <timonkruiper@gmail.com> 2020-10-02 23:09:12+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-05 00:31:21-04:00
loge94a06ac294bd3110e66ac2691343c6c9b889fc1
tree1a2d8e8d8c8491fa72161007447a57283d7912f3
parentdce74c31cc95cc75d8eecbe9894add2785fc10ed

Build.zig: Skip copying files that are used internally by the compiler

Before this it was trying to copy all the files from the zig-cache dir to the output dir, but in the current compiler architecture the cache dir is also used for internal compiler files.

1 files changed, 8 insertions(+), 0 deletions(-)

lib/std/build.zig+8
...@@ -2331,6 +2331,14 @@ pub const LibExeObjStep = struct {...@@ -2331,6 +2331,14 @@ pub const LibExeObjStep = struct {
23312331
2332 var it = src_dir.iterate();2332 var it = src_dir.iterate();
2333 while (try it.next()) |entry| {2333 while (try it.next()) |entry| {
2334 // The compiler can put these files into the same directory, but we don't
2335 // want to copy them over.
2336 if (mem.eql(u8, entry.name, "stage1.id") or
2337 mem.eql(u8, entry.name, "llvm-ar.id") or
2338 mem.eql(u8, entry.name, "libs.txt") or
2339 mem.eql(u8, entry.name, "builtin.zig") or
2340 mem.eql(u8, entry.name, "lld.id")) continue;
2341
2334 _ = try src_dir.updateFile(entry.name, dest_dir, entry.name, .{});2342 _ = try src_dir.updateFile(entry.name, dest_dir, entry.name, .{});
2335 }2343 }
2336 } else {2344 } else {