| ... | ... | @@ -665,6 +665,7 @@ const usage_build_generic = |
| 665 | 665 | \\ -weak_framework [name] (Darwin) link against framework and mark it and all referenced symbols as weak |
| 666 | 666 | \\ -F[dir] (Darwin) add search path for frameworks |
| 667 | 667 | \\ --export=[value] (WebAssembly) Force a symbol to be exported |
| 668 | \\ --exported_symbols_list [file] (Darwin) Force symbols in the file to be exported |
| 668 | 669 | \\ |
| 669 | 670 | \\Test Options: |
| 670 | 671 | \\ --test-filter [text] Skip tests that do not match any filter |
| ... | ... | @@ -2612,6 +2613,16 @@ fn buildOutputType( |
| 2612 | 2613 | }; |
| 2613 | 2614 | } else if (mem.eql(u8, arg, "--export")) { |
| 2614 | 2615 | try linker_export_symbol_names.append(arena, linker_args_it.nextOrFatal()); |
| 2616 | } else if (mem.eql(u8, arg, "-exported_symbols_list")) { |
| 2617 | const exported_symbols_list = linker_args_it.nextOrFatal(); |
| 2618 | const content = Io.Dir.cwd().readFileAlloc(io, exported_symbols_list, arena, .limited(10 * 1024 * 1024)) catch |err| { |
| 2619 | fatal("unable to read exported symbols list '{s}': {s}", .{ exported_symbols_list, @errorName(err) }); |
| 2620 | }; |
| 2621 | var symbols_it = mem.splitScalar(u8, content, '\n'); |
| 2622 | while (symbols_it.next()) |line| { |
| 2623 | if (line.len == 0) continue; |
| 2624 | try linker_export_symbol_names.append(arena, line); |
| 2625 | } |
| 2615 | 2626 | } else if (mem.eql(u8, arg, "--compress-debug-sections")) { |
| 2616 | 2627 | const arg1 = linker_args_it.nextOrFatal(); |
| 2617 | 2628 | linker_compress_debug_sections = std.meta.stringToEnum(std.zig.CompressDebugSections, arg1) orelse { |