From dbd0a2c35d590752dfa586a816f2870e4bcb3200 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 30 Dec 2021 17:54:40 -0700 Subject: [PATCH] stage2: fix path to cache artifacts in libcxx, libtsan, libunwind, and libcxxabi. --- src/libcxx.zig | 14 ++++++-------- src/libtsan.zig | 7 +++---- src/libunwind.zig | 8 ++++---- 3 files changed, 13 insertions(+), 16 deletions(-) diff --git a/src/libcxx.zig b/src/libcxx.zig index 42ac1bf6ad..2da680a40d 100644 --- a/src/libcxx.zig +++ b/src/libcxx.zig @@ -219,10 +219,9 @@ pub fn buildLibCXX(comp: *Compilation) !void { assert(comp.libcxx_static_lib == null); comp.libcxx_static_lib = Compilation.CRTFile{ - .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join( - comp.gpa, - &[_][]const u8{basename}, - ), + .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join(comp.gpa, &[_][]const u8{ + sub_compilation.bin_file.options.emit.?.sub_path, + }), .lock = sub_compilation.bin_file.toOwnedLock(), }; } @@ -352,10 +351,9 @@ pub fn buildLibCXXABI(comp: *Compilation) !void { assert(comp.libcxxabi_static_lib == null); comp.libcxxabi_static_lib = Compilation.CRTFile{ - .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join( - comp.gpa, - &[_][]const u8{basename}, - ), + .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join(comp.gpa, &[_][]const u8{ + sub_compilation.bin_file.options.emit.?.sub_path, + }), .lock = sub_compilation.bin_file.toOwnedLock(), }; } diff --git a/src/libtsan.zig b/src/libtsan.zig index c7f288e76f..cbbcd11a8a 100644 --- a/src/libtsan.zig +++ b/src/libtsan.zig @@ -238,10 +238,9 @@ pub fn buildTsan(comp: *Compilation) !void { assert(comp.tsan_static_lib == null); comp.tsan_static_lib = Compilation.CRTFile{ - .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join( - comp.gpa, - &[_][]const u8{basename}, - ), + .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join(comp.gpa, &[_][]const u8{ + sub_compilation.bin_file.options.emit.?.sub_path, + }), .lock = sub_compilation.bin_file.toOwnedLock(), }; } diff --git a/src/libunwind.zig b/src/libunwind.zig index 101ca6c8d4..0d030be329 100644 --- a/src/libunwind.zig +++ b/src/libunwind.zig @@ -142,11 +142,11 @@ pub fn buildStaticLib(comp: *Compilation) !void { try sub_compilation.updateSubCompilation(); assert(comp.libunwind_static_lib == null); + comp.libunwind_static_lib = Compilation.CRTFile{ - .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join( - comp.gpa, - &[_][]const u8{basename}, - ), + .full_object_path = try sub_compilation.bin_file.options.emit.?.directory.join(comp.gpa, &[_][]const u8{ + sub_compilation.bin_file.options.emit.?.sub_path, + }), .lock = sub_compilation.bin_file.toOwnedLock(), }; }