diff options
| author | ruki <[email protected]> | 2022-11-14 22:45:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-11-14 22:45:28 +0800 |
| commit | 447b55d0e8f007bc5c5164cf92fdff47904192a2 (patch) | |
| tree | 16e3e94c62069edd77bbcc80261568a70c5233d5 | |
| parent | 95cae7f6f15abf2f4f78fcd03bdb7647920dbb63 (diff) | |
update zig tests
| -rw-r--r-- | tests/projects/package/toolchain_zig/src/main.zig | 2 | ||||
| -rw-r--r-- | tests/projects/package/toolchain_zig/xmake.lua | 2 | ||||
| -rw-r--r-- | tests/projects/zig/console/src/main.zig | 2 | ||||
| -rw-r--r-- | tests/projects/zig/shared_library/src/main.zig | 2 | ||||
| -rw-r--r-- | tests/projects/zig/static_library/src/main.zig | 2 | ||||
| -rw-r--r-- | xmake/modules/core/tools/zig.lua | 4 |
6 files changed, 7 insertions, 7 deletions
diff --git a/tests/projects/package/toolchain_zig/src/main.zig b/tests/projects/package/toolchain_zig/src/main.zig index 56b206650..259e332e6 100644 --- a/tests/projects/package/toolchain_zig/src/main.zig +++ b/tests/projects/package/toolchain_zig/src/main.zig @@ -2,5 +2,5 @@ const std = @import("std"); pub fn main() !void { const stdout = std.io.getStdOut().writer(); - try stdout.print("Hello, {}!\n", .{"world"}); + try stdout.print("Hello, {s}!\n", .{"world"}); } diff --git a/tests/projects/package/toolchain_zig/xmake.lua b/tests/projects/package/toolchain_zig/xmake.lua index 330c09640..25c6adf0a 100644 --- a/tests/projects/package/toolchain_zig/xmake.lua +++ b/tests/projects/package/toolchain_zig/xmake.lua @@ -1,5 +1,5 @@ add_rules("mode.debug", "mode.release") -add_requires("zig 0.7.x") +add_requires("zig") target("test") set_kind("binary") diff --git a/tests/projects/zig/console/src/main.zig b/tests/projects/zig/console/src/main.zig index 56b206650..259e332e6 100644 --- a/tests/projects/zig/console/src/main.zig +++ b/tests/projects/zig/console/src/main.zig @@ -2,5 +2,5 @@ const std = @import("std"); pub fn main() !void { const stdout = std.io.getStdOut().writer(); - try stdout.print("Hello, {}!\n", .{"world"}); + try stdout.print("Hello, {s}!\n", .{"world"}); } diff --git a/tests/projects/zig/shared_library/src/main.zig b/tests/projects/zig/shared_library/src/main.zig index 2675d4326..41b6e7b50 100644 --- a/tests/projects/zig/shared_library/src/main.zig +++ b/tests/projects/zig/shared_library/src/main.zig @@ -4,5 +4,5 @@ extern fn add(a: i32, b: i32) i32; pub fn main() !void { const stdout = std.io.getStdOut().writer(); - try stdout.print("Hello, {} - {}!\n", .{"world", add(1, 1)}); + try stdout.print("Hello, {s} - {*}!\n", .{"world", add(1, 1)}); } diff --git a/tests/projects/zig/static_library/src/main.zig b/tests/projects/zig/static_library/src/main.zig index 2675d4326..41b6e7b50 100644 --- a/tests/projects/zig/static_library/src/main.zig +++ b/tests/projects/zig/static_library/src/main.zig @@ -4,5 +4,5 @@ extern fn add(a: i32, b: i32) i32; pub fn main() !void { const stdout = std.io.getStdOut().writer(); - try stdout.print("Hello, {} - {}!\n", .{"world", add(1, 1)}); + try stdout.print("Hello, {s} - {*}!\n", .{"world", add(1, 1)}); } diff --git a/xmake/modules/core/tools/zig.lua b/xmake/modules/core/tools/zig.lua index c722c700b..8fb7c0b9f 100644 --- a/xmake/modules/core/tools/zig.lua +++ b/xmake/modules/core/tools/zig.lua @@ -37,8 +37,8 @@ end -- make the strip flag function nf_strip(self, level) local maps = { - debug = "--strip" - , all = "--strip" + debug = "-fstrip" + , all = {"-fstrip", "-dead_strip"} } return maps[level] end |
