From 36950815a464c9226783fcdf1190af38950b7405 Mon Sep 17 00:00:00 2001 From: Timon Kruiper Date: Thu, 7 Jan 2021 11:37:52 +0100 Subject: [PATCH] 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. --- src/test.zig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test.zig b/src/test.zig index 682fb5078f..2349d5a86a 100644 --- a/src/test.zig +++ b/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();