authorgravatar for timonkruiper@gmail.comTimon Kruiper <timonkruiper@gmail.com> 2021-01-07 11:37:52+01:00
committergravatar for timonkruiper@gmail.comTimon Kruiper <timonkruiper@gmail.com> 2021-01-07 11:37:52+01:00
log36950815a464c9226783fcdf1190af38950b7405
treec9a0c2a069e1d587e1b9215eb19424010e90a180
parenta279cf81b2249ec7f5f7818fd0e3db3ce299853f

stage2 test: make sure to pass the dynamic linker to Compilation

Because this was not set, the `-dynamic-path` argument was not passed to LLD when linking an ELF binary. This would still generate a valid glibc binary, however when executing would result in a segfault.

1 files changed, 2 insertions(+), 0 deletions(-)

src/test.zig+2
......@@ -657,8 +657,10 @@ pub const TestContext = struct {
657657 .object_format = case.object_format,
658658 .is_native_os = case.target.isNativeOs(),
659659 .is_native_abi = case.target.isNativeAbi(),
660 .dynamic_linker = target_info.dynamic_linker.get(),
660661 .link_libc = case.llvm_backend,
661662 .use_llvm = case.llvm_backend,
663 .use_lld = case.llvm_backend,
662664 .self_exe_path = std.testing.zig_exe_path,
663665 });
664666 defer comp.destroy();