| ... | @@ -268,10 +268,11 @@ const usage_build_generic = | ... | @@ -268,10 +268,11 @@ const usage_build_generic = |
| 268 | \\ -T[script], --script [script] Use a custom linker script | 268 | \\ -T[script], --script [script] Use a custom linker script |
| 269 | \\ --version-script [path] Provide a version .map file | 269 | \\ --version-script [path] Provide a version .map file |
| 270 | \\ --dynamic-linker [path] Set the dynamic interpreter path (usually ld.so) | 270 | \\ --dynamic-linker [path] Set the dynamic interpreter path (usually ld.so) |
| 271 | \\ --each-lib-rpath Add rpath for each used dynamic library | | |
| 272 | \\ --version [ver] Dynamic library semver | 271 | \\ --version [ver] Dynamic library semver |
| 273 | \\ -rdynamic Add all symbols to the dynamic symbol table | 272 | \\ -rdynamic Add all symbols to the dynamic symbol table |
| 274 | \\ -rpath [path] Add directory to the runtime library search path | 273 | \\ -rpath [path] Add directory to the runtime library search path |
| | 274 | \\ -feach-lib-rpath Ensure adding rpath for each used dynamic library |
| | 275 | \\ -fno-each-lib-rpath Prevent adding rpath for each used dynamic library |
| 275 | \\ --eh-frame-hdr Enable C++ exception handling by passing --eh-frame-hdr to linker | 276 | \\ --eh-frame-hdr Enable C++ exception handling by passing --eh-frame-hdr to linker |
| 276 | \\ --emit-relocs Enable output of relocation sections for post build tools | 277 | \\ --emit-relocs Enable output of relocation sections for post build tools |
| 277 | \\ -dynamic Force output to be dynamically linked | 278 | \\ -dynamic Force output to be dynamically linked |
| ... | @@ -442,7 +443,7 @@ fn buildOutputType( | ... | @@ -442,7 +443,7 @@ fn buildOutputType( |
| 442 | var use_clang: ?bool = null; | 443 | var use_clang: ?bool = null; |
| 443 | var link_eh_frame_hdr = false; | 444 | var link_eh_frame_hdr = false; |
| 444 | var link_emit_relocs = false; | 445 | var link_emit_relocs = false; |
| 445 | var each_lib_rpath = false; | 446 | var each_lib_rpath: ?bool = null; |
| 446 | var libc_paths_file: ?[]const u8 = null; | 447 | var libc_paths_file: ?[]const u8 = null; |
| 447 | var machine_code_model: std.builtin.CodeModel = .default; | 448 | var machine_code_model: std.builtin.CodeModel = .default; |
| 448 | var runtime_args_start: ?usize = null; | 449 | var runtime_args_start: ?usize = null; |
| ... | @@ -739,8 +740,10 @@ fn buildOutputType( | ... | @@ -739,8 +740,10 @@ fn buildOutputType( |
| 739 | if (i + 1 >= args.len) fatal("expected parameter after {}", .{arg}); | 740 | if (i + 1 >= args.len) fatal("expected parameter after {}", .{arg}); |
| 740 | i += 1; | 741 | i += 1; |
| 741 | override_lib_dir = args[i]; | 742 | override_lib_dir = args[i]; |
| 742 | } else if (mem.eql(u8, arg, "--each-lib-rpath")) { | 743 | } else if (mem.eql(u8, arg, "-feach-lib-rpath")) { |
| 743 | each_lib_rpath = true; | 744 | each_lib_rpath = true; |
| | 745 | } else if (mem.eql(u8, arg, "-fno-each-lib-rpath")) { |
| | 746 | each_lib_rpath = false; |
| 744 | } else if (mem.eql(u8, arg, "--enable-cache")) { | 747 | } else if (mem.eql(u8, arg, "--enable-cache")) { |
| 745 | enable_cache = true; | 748 | enable_cache = true; |
| 746 | } else if (mem.eql(u8, arg, "--test-cmd-bin")) { | 749 | } else if (mem.eql(u8, arg, "--test-cmd-bin")) { |