| author | |
| committer | |
| log | e306d04473818ac8b58779aa1ff20b12edb8e94a |
| tree | 44d01d290362c86b4b0c1b0208636727ea8095e3 |
| parent | f8a1a2c4a18a2a5f274029c4c59f3a8e83f36b6b |
3 files changed, 14 insertions(+), 1 deletions(-)
src/Compilation.zig+9| ... | ... | @@ -1719,6 +1719,15 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { |
| 1719 | 1719 | const have_bin_emit = comp.bin_file.options.emit != null or comp.whole_bin_sub_path != null; |
| 1720 | 1720 | |
| 1721 | 1721 | if (have_bin_emit and !comp.bin_file.options.skip_linker_dependencies) { |
| 1722 | if (comp.getTarget().isDarwin()) { | |
| 1723 | switch (comp.getTarget().abi) { | |
| 1724 | .none, | |
| 1725 | .simulator, | |
| 1726 | .macabi, | |
| 1727 | => {}, | |
| 1728 | else => return error.LibCUnavailable, | |
| 1729 | } | |
| 1730 | } | |
| 1722 | 1731 | // If we need to build glibc for the target, add work items for it. |
| 1723 | 1732 | // We go through the work queue so that building can be done in parallel. |
| 1724 | 1733 | if (comp.wantBuildGLibCFromSource()) { |
src/codegen/llvm.zig+4-1| ... | ... | @@ -86,6 +86,9 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![:0]u8 { |
| 86 | 86 | .spirv64 => return error.@"LLVM backend does not support SPIR-V", |
| 87 | 87 | }; |
| 88 | 88 | |
| 89 | var arena = std.heap.ArenaAllocator.init(allocator); | |
| 90 | defer arena.deinit(); | |
| 91 | ||
| 89 | 92 | const llvm_os = blk: { |
| 90 | 93 | if (target.os.tag.isDarwin()) { |
| 91 | 94 | const min_version = target.os.version_range.semver.min; |
| ... | ... | @@ -96,7 +99,7 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![:0]u8 { |
| 96 | 99 | .watchos => "watchos", |
| 97 | 100 | else => unreachable, |
| 98 | 101 | }; |
| 99 | break :blk try std.fmt.allocPrintZ(allocator, "{s}{d}.{d}.{d}", .{ | |
| 102 | break :blk try std.fmt.allocPrintZ(arena.allocator(), "{s}{d}.{d}.{d}", .{ | |
| 100 | 103 | llvm_os, |
| 101 | 104 | min_version.major, |
| 102 | 105 | min_version.minor, |
src/link/MachO/Dylib.zig+1| ... | ... | @@ -305,6 +305,7 @@ const TargetMatcher = struct { |
| 305 | 305 | const abi: ?[]const u8 = switch (target.abi) { |
| 306 | 306 | .none => null, |
| 307 | 307 | .simulator => "simulator", |
| 308 | .macabi => "maccatalyst", | |
| 308 | 309 | else => unreachable, |
| 309 | 310 | }; |
| 310 | 311 | if (abi) |x| { |