Commit 8364417c8f

Andrew Kelley <andrew@ziglang.org>
2020-10-17 01:15:50
trivial refactor to remove redundant function call
1 parent fe127a3
Changed files (1)
src/main.zig
@@ -919,7 +919,7 @@ fn buildOutputType(
                         fatal("unrecognized parameter: '{}'", .{arg});
                     }
                 } else switch (Compilation.classifyFileExt(arg)) {
-                    .object, .static_library => {
+                    .object, .static_library, .shared_library => {
                         try link_objects.append(arg);
                     },
                     .assembly, .c, .cpp, .h, .ll, .bc => {
@@ -928,9 +928,6 @@ fn buildOutputType(
                             .extra_flags = try arena.dupe([]const u8, extra_cflags.items),
                         });
                     },
-                    .shared_library => {
-                        try link_objects.append(arg);
-                    },
                     .zig, .zir => {
                         if (root_src_file) |other| {
                             fatal("found another zig file '{}' after root source file '{}'", .{ arg, other });