Commit 36950815a4

Timon Kruiper <timonkruiper@gmail.com>
2021-01-07 11:37:52
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 parent a279cf8
Changed files (1)
src/test.zig
@@ -657,8 +657,10 @@ pub const TestContext = struct {
             .object_format = case.object_format,
             .is_native_os = case.target.isNativeOs(),
             .is_native_abi = case.target.isNativeAbi(),
+            .dynamic_linker = target_info.dynamic_linker.get(),
             .link_libc = case.llvm_backend,
             .use_llvm = case.llvm_backend,
+            .use_lld = case.llvm_backend,
             .self_exe_path = std.testing.zig_exe_path,
         });
         defer comp.destroy();