| ... | ... | @@ -477,9 +477,15 @@ const usage_build_generic = |
| 477 | 477 | \\ -l[lib], --library [lib] Link against system library (only if actually used) |
| 478 | 478 | \\ -needed-l[lib], Link against system library (even if unused) |
| 479 | 479 | \\ --needed-library [lib] |
| 480 | \\ --ambiguous-static-library [l] Link against system library, checking for a |
| 481 | \\ static lib in each search path, then checking |
| 482 | \\ for a dynamic lib in each search path. Use of |
| 483 | \\ this CLI option is a code smell. |
| 480 | 484 | \\ -L[d], --library-directory [d] Add a directory to the library search path |
| 481 | | \\ -search_paths_first Search each library search path for dynamic libs then static libs |
| 482 | | \\ -search_dylibs_first Search for dynamic libs in each library search path, then static libs. |
| 485 | \\ -search_paths_first For each library search path, check for dynamic |
| 486 | \\ lib then static lib before proceeding to next path. |
| 487 | \\ -search_dylibs_first Search for dynamic libs in all library search |
| 488 | \\ paths, then static libs. |
| 483 | 489 | \\ -T[script], --script [script] Use a custom linker script |
| 484 | 490 | \\ --version-script [path] Provide a version .map file |
| 485 | 491 | \\ --dynamic-linker [path] Set the dynamic interpreter path (usually ld.so) |
| ... | ... | @@ -1155,6 +1161,13 @@ fn buildOutputType( |
| 1155 | 1161 | .preferred_mode = lib_preferred_mode orelse .Dynamic, |
| 1156 | 1162 | .search_strategy = lib_search_strategy orelse .no_fallback, |
| 1157 | 1163 | }); |
| 1164 | } else if (mem.eql(u8, arg, "--ambiguous-static-library")) { |
| 1165 | try system_libs.put(args_iter.nextOrFatal(), .{ |
| 1166 | .needed = false, |
| 1167 | .weak = false, |
| 1168 | .preferred_mode = lib_preferred_mode orelse .Static, |
| 1169 | .search_strategy = lib_search_strategy orelse .mode_first, |
| 1170 | }); |
| 1158 | 1171 | } else if (mem.eql(u8, arg, "-D")) { |
| 1159 | 1172 | try clang_argv.append(arg); |
| 1160 | 1173 | try clang_argv.append(args_iter.nextOrFatal()); |