Fix linux surgical linker tests

This commit is contained in:
Richard Feldman 2022-11-22 14:27:53 -05:00
parent 674d449bc1
commit 87ad2cdf82
No known key found for this signature in database
GPG key ID: F1F21AA5B1D9E43B

View file

@ -1576,7 +1576,7 @@ mod tests {
}
#[allow(dead_code)]
fn zig_host_app_help(dir: &Path) {
fn zig_host_app_help(dir: &Path, target: &Triple) {
let host_zig = indoc!(
r#"
const std = @import("std");
@ -1696,10 +1696,12 @@ mod tests {
#[cfg(target_os = "linux")]
#[test]
fn zig_host_app() {
use std::str::FromStr;
let dir = tempfile::tempdir().unwrap();
let dir = dir.path();
zig_host_app_help(dir);
zig_host_app_help(dir, &Triple::from_str("x86_64-unknown-linux-musl").unwrap());
let output = std::process::Command::new(&dir.join("final"))
.current_dir(dir)