| ... | @@ -463,6 +463,7 @@ const usage_build_generic = | ... | @@ -463,6 +463,7 @@ const usage_build_generic = |
| 463 | \\ -search_dylibs_first (Darwin) search `libx.dylib` in each dir in library search paths, then `libx.a` | 463 | \\ -search_dylibs_first (Darwin) search `libx.dylib` in each dir in library search paths, then `libx.a` |
| 464 | \\ -headerpad [value] (Darwin) set minimum space for future expansion of the load commands in hexadecimal notation | 464 | \\ -headerpad [value] (Darwin) set minimum space for future expansion of the load commands in hexadecimal notation |
| 465 | \\ -headerpad_max_install_names (Darwin) set enough space as if all paths were MAXPATHLEN | 465 | \\ -headerpad_max_install_names (Darwin) set enough space as if all paths were MAXPATHLEN |
| | 466 | \\ -dead_strip (Darwin) remove function and data that are unreachable by the entry point of exported symbols |
| 466 | \\ -dead_strip_dylibs (Darwin) remove dylibs that are unreachable by the entry point or exported symbols | 467 | \\ -dead_strip_dylibs (Darwin) remove dylibs that are unreachable by the entry point or exported symbols |
| 467 | \\ --import-memory (WebAssembly) import memory from the environment | 468 | \\ --import-memory (WebAssembly) import memory from the environment |
| 468 | \\ --import-table (WebAssembly) import function table from the host environment | 469 | \\ --import-table (WebAssembly) import function table from the host environment |
| ... | @@ -969,6 +970,8 @@ fn buildOutputType( | ... | @@ -969,6 +970,8 @@ fn buildOutputType( |
| 969 | }; | 970 | }; |
| 970 | } else if (mem.eql(u8, arg, "-headerpad_max_install_names")) { | 971 | } else if (mem.eql(u8, arg, "-headerpad_max_install_names")) { |
| 971 | headerpad_max_install_names = true; | 972 | headerpad_max_install_names = true; |
| | 973 | } else if (mem.eql(u8, arg, "-dead_strip")) { |
| | 974 | linker_gc_sections = true; |
| 972 | } else if (mem.eql(u8, arg, "-dead_strip_dylibs")) { | 975 | } else if (mem.eql(u8, arg, "-dead_strip_dylibs")) { |
| 973 | dead_strip_dylibs = true; | 976 | dead_strip_dylibs = true; |
| 974 | } else if (mem.eql(u8, arg, "-T") or mem.eql(u8, arg, "--script")) { | 977 | } else if (mem.eql(u8, arg, "-T") or mem.eql(u8, arg, "--script")) { |
| ... | @@ -1764,6 +1767,8 @@ fn buildOutputType( | ... | @@ -1764,6 +1767,8 @@ fn buildOutputType( |
| 1764 | }; | 1767 | }; |
| 1765 | } else if (mem.eql(u8, arg, "-headerpad_max_install_names")) { | 1768 | } else if (mem.eql(u8, arg, "-headerpad_max_install_names")) { |
| 1766 | headerpad_max_install_names = true; | 1769 | headerpad_max_install_names = true; |
| | 1770 | } else if (mem.eql(u8, arg, "-dead_strip")) { |
| | 1771 | linker_gc_sections = true; |
| 1767 | } else if (mem.eql(u8, arg, "-dead_strip_dylibs")) { | 1772 | } else if (mem.eql(u8, arg, "-dead_strip_dylibs")) { |
| 1768 | dead_strip_dylibs = true; | 1773 | dead_strip_dylibs = true; |
| 1769 | } else if (mem.eql(u8, arg, "--gc-sections")) { | 1774 | } else if (mem.eql(u8, arg, "--gc-sections")) { |