| ... | ... | @@ -1287,6 +1287,7 @@ fn buildOutputType( |
| 1287 | 1287 | var it = ClangArgIterator.init(arena, all_args); |
| 1288 | 1288 | var emit_llvm = false; |
| 1289 | 1289 | var needed = false; |
| 1290 | var must_link = false; |
| 1290 | 1291 | var force_static_libs = false; |
| 1291 | 1292 | while (it.has_next) { |
| 1292 | 1293 | it.next() catch |err| { |
| ... | ... | @@ -1307,7 +1308,10 @@ fn buildOutputType( |
| 1307 | 1308 | switch (file_ext) { |
| 1308 | 1309 | .assembly, .c, .cpp, .ll, .bc, .h, .m, .mm => try c_source_files.append(.{ .src_path = it.only_arg }), |
| 1309 | 1310 | .unknown, .shared_library, .object, .static_library => { |
| 1310 | | try link_objects.append(.{ .path = it.only_arg }); |
| 1311 | try link_objects.append(.{ |
| 1312 | .path = it.only_arg, |
| 1313 | .must_link = must_link, |
| 1314 | }); |
| 1311 | 1315 | }, |
| 1312 | 1316 | .zig => { |
| 1313 | 1317 | if (root_src_file) |other| { |
| ... | ... | @@ -1372,6 +1376,14 @@ fn buildOutputType( |
| 1372 | 1376 | needed = false; |
| 1373 | 1377 | } else if (mem.eql(u8, linker_arg, "--no-as-needed")) { |
| 1374 | 1378 | needed = true; |
| 1379 | } else if (mem.eql(u8, linker_arg, "--whole-archive") or |
| 1380 | mem.eql(u8, linker_arg, "-whole-archive")) |
| 1381 | { |
| 1382 | must_link = true; |
| 1383 | } else if (mem.eql(u8, linker_arg, "--no-whole-archive") or |
| 1384 | mem.eql(u8, linker_arg, "-no-whole-archive")) |
| 1385 | { |
| 1386 | must_link = false; |
| 1375 | 1387 | } else if (mem.eql(u8, linker_arg, "-Bdynamic") or |
| 1376 | 1388 | mem.eql(u8, linker_arg, "-dy") or |
| 1377 | 1389 | mem.eql(u8, linker_arg, "-call_shared")) |
| ... | ... | @@ -1663,6 +1675,12 @@ fn buildOutputType( |
| 1663 | 1675 | // This option does not do anything. |
| 1664 | 1676 | } else if (mem.eql(u8, arg, "--export-all-symbols")) { |
| 1665 | 1677 | rdynamic = true; |
| 1678 | } else if (mem.eql(u8, arg, "-s") or mem.eql(u8, arg, "--strip-all") or |
| 1679 | mem.eql(u8, arg, "-S") or mem.eql(u8, arg, "--strip-debug")) |
| 1680 | { |
| 1681 | // -s, --strip-all Strip all symbols |
| 1682 | // -S, --strip-debug Strip debugging symbols |
| 1683 | strip = true; |
| 1666 | 1684 | } else if (mem.eql(u8, arg, "--start-group") or |
| 1667 | 1685 | mem.eql(u8, arg, "--end-group")) |
| 1668 | 1686 | { |