mirror of
https://github.com/ziglang/zig.git
synced 2024-11-28 08:02:32 +00:00
171977dc1c
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!
|
|
//
|