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.
master
Timon Kruiper 2020-10-02 23:09:12 +02:00 committed by Andrew Kelley
parent dce74c31cc
commit e94a06ac29
1 changed files with 8 additions and 0 deletions

View File

@ -2331,6 +2331,14 @@ pub const LibExeObjStep = struct {
var it = src_dir.iterate();
while (try it.next()) |entry| {
// The compiler can put these files into the same directory, but we don't
// want to copy them over.
if (mem.eql(u8, entry.name, "stage1.id") or
mem.eql(u8, entry.name, "llvm-ar.id") or
mem.eql(u8, entry.name, "libs.txt") or
mem.eql(u8, entry.name, "builtin.zig") or
mem.eql(u8, entry.name, "lld.id")) continue;
_ = try src_dir.updateFile(entry.name, dest_dir, entry.name, .{});
}
} else {