mirror of
https://github.com/ziglang/zig.git
synced 2025-12-28 17:13:19 +00:00
Now link_libc=1 must be used to link with libc, instead of the test harness assuming that using the llvm backend means additionally linking with libc.
14 lines
191 B
Zig
14 lines
191 B
Zig
extern fn puts(s: [*:0]const u8) c_int;
|
|
|
|
pub fn main() void {
|
|
_ = puts("hello world!");
|
|
}
|
|
|
|
// run
|
|
// backend=llvm
|
|
// target=x86_64-linux,x86_64-macos
|
|
// link_libc=1
|
|
//
|
|
// hello world!
|
|
//
|