aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-30 01:00:06 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-30 01:04:30 -0700
commit3249e5d952cfcecca999391ffc02cce92ff8fcc4 (patch)
tree62f8f37e804d2fb2a817e090ce882100b06cc728 /src/main.zig
parent2a893efae12b2f80d0ff5fd883fdaeb00d9425e4 (diff)
downloadzig-3249e5d952cfcecca999391ffc02cce92ff8fcc4.tar.gz
zig-3249e5d952cfcecca999391ffc02cce92ff8fcc4.zip
MachO: add the same workaround for no -r LLD flag support
This is the MachO equivalent for the code added to COFF for doing the file copy when the input and output are both just one object file.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.zig b/src/main.zig
index 822e777d68..d421322c17 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1337,12 +1337,12 @@ fn buildOutputType(
}
};
- if (output_mode == .Obj and object_format == .coff) {
+ if (output_mode == .Obj and (object_format == .coff or object_format == .macho)) {
const total_obj_count = c_source_files.items.len +
@boolToInt(root_src_file != null) +
link_objects.items.len;
if (total_obj_count > 1) {
- fatal("COFF does not support linking multiple objects into one", .{});
+ fatal("{s} does not support linking multiple objects into one", .{@tagName(object_format)});
}
}