diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-09-30 01:00:06 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-09-30 01:04:30 -0700 |
| commit | 3249e5d952cfcecca999391ffc02cce92ff8fcc4 (patch) | |
| tree | 62f8f37e804d2fb2a817e090ce882100b06cc728 /src/main.zig | |
| parent | 2a893efae12b2f80d0ff5fd883fdaeb00d9425e4 (diff) | |
| download | zig-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.zig | 4 |
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)}); } } |
