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
parent
dce74c31cc
commit
e94a06ac29
|
@ -2331,6 +2331,14 @@ pub const LibExeObjStep = struct {
|
||||||
|
|
||||||
var it = src_dir.iterate();
|
var it = src_dir.iterate();
|
||||||
while (try it.next()) |entry| {
|
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, .{});
|
_ = try src_dir.updateFile(entry.name, dest_dir, entry.name, .{});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue