Closed as not planned
Closed as not planned
Description
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
~/ziglang $ ls
hello.zig
~/ziglang $ cat hello.zig
const std = @import("std");
pub fn main() !void {
const stdout = std.io.getStdOut().writer();
try stdout.print("Hello, {s}!\n", .{"world"});
}
~/ziglang $ zig build-exe *.zig
warning: Encountered error: FileNotFound,
falling back to default ABI and dynamic linker.
~/ziglang $ ls
hello hello.o hello.zig
~/ziglang $ file hello
hello: ELF 64-bit LSB executable,
ARM aarch64, version 1 (SYSV),
statically linked, with debug_info, not stripped
~/ziglang $ rm hello hello.o
~/ziglang $ zig build-exe *.zig -Dtarget=x86_64-windows
warning: Encountered error: FileNotFound,
falling back to default ABI and dynamic linker.
~/ziglang $ ls
hello hello.o hello.zig
~/ziglang $ file hello
hello: ELF 64-bit LSB executable,
ARM aarch64, version 1 (SYSV),
statically linked, with debug_info, not stripped
Expected Behavior
Build success but output is unspecified target. i.e zig
builds for system where it's currently running, rather than building for the specified target system.
I have check zig-build-system but I'm not sure if I quite understand it.