| ... | ... | @@ -584,27 +584,26 @@ pub const TestContext = struct { |
| 584 | 584 | .native => try argv.append(exe_path), |
| 585 | 585 | .unavailable => return, // No executor available; pass test. |
| 586 | 586 | |
| 587 | | .qemu => |qemu_bin_name| { |
| 588 | | if (enable_qemu) qemu: { |
| 589 | | // TODO Ability for test cases to specify whether to link libc. |
| 590 | | const need_cross_glibc = false; // target.isGnuLibC() and self.is_linking_libc; |
| 591 | | const glibc_dir_arg = if (need_cross_glibc) |
| 592 | | glibc_multi_install_dir orelse break :qemu |
| 593 | | else |
| 594 | | null; |
| 595 | | try argv.append(qemu_bin_name); |
| 596 | | if (glibc_dir_arg) |dir| { |
| 597 | | const linux_triple = try target.linuxTriple(arena); |
| 598 | | const full_dir = try std.fs.path.join(arena, &[_][]const u8{ |
| 599 | | dir, |
| 600 | | linux_triple, |
| 601 | | }); |
| 602 | | |
| 603 | | try argv.append("-L"); |
| 604 | | try argv.append(full_dir); |
| 605 | | } |
| 606 | | try argv.append(exe_path); |
| 587 | .qemu => |qemu_bin_name| if (enable_qemu) { |
| 588 | // TODO Ability for test cases to specify whether to link libc. |
| 589 | const need_cross_glibc = false; // target.isGnuLibC() and self.is_linking_libc; |
| 590 | const glibc_dir_arg = if (need_cross_glibc) |
| 591 | glibc_multi_install_dir orelse return // glibc dir not available; pass test |
| 592 | else |
| 593 | null; |
| 594 | try argv.append(qemu_bin_name); |
| 595 | if (glibc_dir_arg) |dir| { |
| 596 | const linux_triple = try target.linuxTriple(arena); |
| 597 | const full_dir = try std.fs.path.join(arena, &[_][]const u8{ |
| 598 | dir, |
| 599 | linux_triple, |
| 600 | }); |
| 601 | |
| 602 | try argv.append("-L"); |
| 603 | try argv.append(full_dir); |
| 607 | 604 | } |
| 605 | try argv.append(exe_path); |
| 606 | } else { |
| 608 | 607 | return; // QEMU not available; pass test. |
| 609 | 608 | }, |
| 610 | 609 | |
| ... | ... | @@ -628,7 +627,7 @@ pub const TestContext = struct { |
| 628 | 627 | |
| 629 | 628 | break :x try std.ChildProcess.exec(.{ |
| 630 | 629 | .allocator = allocator, |
| 631 | | .argv = &[_][]const u8{exe_path}, |
| 630 | .argv = argv.items, |
| 632 | 631 | .cwd_dir = tmp.dir, |
| 633 | 632 | }); |
| 634 | 633 | }; |