authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-11 19:53:51-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-13 17:44:27-07:00
log87b3e2317294186ba6625592eb55760fd99fe211
tree4dab28ef8bcfa9111ac30e88113d137773060a6d
parentf458c13494a380721662ad74539f9fc74eea8382

tools/update_glibc: exempt some more files


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

tools/update_glibc.zig+9
...@@ -30,6 +30,12 @@ const exempt_files = [_][]const u8{...@@ -30,6 +30,12 @@ const exempt_files = [_][]const u8{
30 "sysdeps/pthread/pthread_atfork.c",30 "sysdeps/pthread/pthread_atfork.c",
31};31};
3232
33const exempt_extensions = [_][]const u8{
34 // These are the start files we use when targeting glibc <= 2.33.
35 "-2.33.S",
36 "-2.33.c",
37};
38
33pub fn main() !void {39pub fn main() !void {
34 var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator);40 var arena_instance = std.heap.ArenaAllocator.init(std.heap.page_allocator);
35 defer arena_instance.deinit();41 defer arena_instance.deinit();
...@@ -62,6 +68,9 @@ pub fn main() !void {...@@ -62,6 +68,9 @@ pub fn main() !void {
62 for (exempt_files) |p| {68 for (exempt_files) |p| {
63 if (mem.eql(u8, entry.path, p)) continue :walk;69 if (mem.eql(u8, entry.path, p)) continue :walk;
64 }70 }
71 for (exempt_extensions) |ext| {
72 if (mem.endsWith(u8, entry.path, ext)) continue :walk;
73 }
6574
66 glibc_src_dir.copyFile(entry.path, dest_dir.dir, entry.path, .{}) catch |err| {75 glibc_src_dir.copyFile(entry.path, dest_dir.dir, entry.path, .{}) catch |err| {
67 log.warn("unable to copy '{s}/{s}' to '{s}/{s}': {s}", .{76 log.warn("unable to copy '{s}/{s}' to '{s}/{s}': {s}", .{