| author | |
| committer | |
| log | 45c77931c2f292574c0049cab574b0208914b9b9 |
| tree | ac58d3a63487cca95bc6a28ef4700c55d1bbea59 |
| parent | 76fb2b685b202ea665b850338e353c7816f5b2bb |
39 files changed, 69 insertions(+), 69 deletions(-)
build.zig+4-4| ... | @@ -72,7 +72,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -72,7 +72,7 @@ pub fn build(b: *std.Build) !void { |
| 72 | const check_case_exe = b.addExecutable(.{ | 72 | const check_case_exe = b.addExecutable(.{ |
| 73 | .name = "check-case", | 73 | .name = "check-case", |
| 74 | .root_source_file = b.path("test/src/Cases.zig"), | 74 | .root_source_file = b.path("test/src/Cases.zig"), |
| 75 | .target = b.host, | 75 | .target = b.graph.host, |
| 76 | .optimize = optimize, | 76 | .optimize = optimize, |
| 77 | .single_threaded = single_threaded, | 77 | .single_threaded = single_threaded, |
| 78 | }); | 78 | }); |
| ... | @@ -541,7 +541,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -541,7 +541,7 @@ pub fn build(b: *std.Build) !void { |
| 541 | const opt_mingw_src_path = b.option([]const u8, "mingw-src", "path to mingw-w64 source directory"); | 541 | const opt_mingw_src_path = b.option([]const u8, "mingw-src", "path to mingw-w64 source directory"); |
| 542 | const update_mingw_exe = b.addExecutable(.{ | 542 | const update_mingw_exe = b.addExecutable(.{ |
| 543 | .name = "update_mingw", | 543 | .name = "update_mingw", |
| 544 | .target = b.host, | 544 | .target = b.graph.host, |
| 545 | .root_source_file = b.path("tools/update_mingw.zig"), | 545 | .root_source_file = b.path("tools/update_mingw.zig"), |
| 546 | }); | 546 | }); |
| 547 | const update_mingw_run = b.addRunArtifact(update_mingw_exe); | 547 | const update_mingw_run = b.addRunArtifact(update_mingw_exe); |
| ... | @@ -1259,7 +1259,7 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath { | ... | @@ -1259,7 +1259,7 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath { |
| 1259 | const doctest_exe = b.addExecutable(.{ | 1259 | const doctest_exe = b.addExecutable(.{ |
| 1260 | .name = "doctest", | 1260 | .name = "doctest", |
| 1261 | .root_source_file = b.path("tools/doctest.zig"), | 1261 | .root_source_file = b.path("tools/doctest.zig"), |
| 1262 | .target = b.host, | 1262 | .target = b.graph.host, |
| 1263 | .optimize = .Debug, | 1263 | .optimize = .Debug, |
| 1264 | }); | 1264 | }); |
| 1265 | 1265 | ||
| ... | @@ -1297,7 +1297,7 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath { | ... | @@ -1297,7 +1297,7 @@ fn generateLangRef(b: *std.Build) std.Build.LazyPath { |
| 1297 | const docgen_exe = b.addExecutable(.{ | 1297 | const docgen_exe = b.addExecutable(.{ |
| 1298 | .name = "docgen", | 1298 | .name = "docgen", |
| 1299 | .root_source_file = b.path("tools/docgen.zig"), | 1299 | .root_source_file = b.path("tools/docgen.zig"), |
| 1300 | .target = b.host, | 1300 | .target = b.graph.host, |
| 1301 | .optimize = .Debug, | 1301 | .optimize = .Debug, |
| 1302 | }); | 1302 | }); |
| 1303 | 1303 |
test/compile_errors.zig+10-10| ... | @@ -4,7 +4,7 @@ const Cases = @import("src/Cases.zig"); | ... | @@ -4,7 +4,7 @@ const Cases = @import("src/Cases.zig"); |
| 4 | 4 | ||
| 5 | pub fn addCases(ctx: *Cases, b: *std.Build) !void { | 5 | pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 6 | { | 6 | { |
| 7 | const case = ctx.obj("multiline error messages", b.host); | 7 | const case = ctx.obj("multiline error messages", b.graph.host); |
| 8 | 8 | ||
| 9 | case.addError( | 9 | case.addError( |
| 10 | \\comptime { | 10 | \\comptime { |
| ... | @@ -39,7 +39,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -39,7 +39,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | { | 41 | { |
| 42 | const case = ctx.obj("isolated carriage return in multiline string literal", b.host); | 42 | const case = ctx.obj("isolated carriage return in multiline string literal", b.graph.host); |
| 43 | 43 | ||
| 44 | case.addError("const foo = \\\\\test\r\r rogue carriage return\n;", &[_][]const u8{ | 44 | case.addError("const foo = \\\\\test\r\r rogue carriage return\n;", &[_][]const u8{ |
| 45 | ":1:19: error: expected ';' after declaration", | 45 | ":1:19: error: expected ';' after declaration", |
| ... | @@ -48,7 +48,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -48,7 +48,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | { | 50 | { |
| 51 | const case = ctx.obj("missing semicolon at EOF", b.host); | 51 | const case = ctx.obj("missing semicolon at EOF", b.graph.host); |
| 52 | case.addError( | 52 | case.addError( |
| 53 | \\const foo = 1 | 53 | \\const foo = 1 |
| 54 | , &[_][]const u8{ | 54 | , &[_][]const u8{ |
| ... | @@ -57,7 +57,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -57,7 +57,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | { | 59 | { |
| 60 | const case = ctx.obj("argument causes error", b.host); | 60 | const case = ctx.obj("argument causes error", b.graph.host); |
| 61 | 61 | ||
| 62 | case.addError( | 62 | case.addError( |
| 63 | \\pub export fn entry() void { | 63 | \\pub export fn entry() void { |
| ... | @@ -80,7 +80,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -80,7 +80,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | { | 82 | { |
| 83 | const case = ctx.obj("astgen failure in file struct", b.host); | 83 | const case = ctx.obj("astgen failure in file struct", b.graph.host); |
| 84 | 84 | ||
| 85 | case.addError( | 85 | case.addError( |
| 86 | \\pub export fn entry() void { | 86 | \\pub export fn entry() void { |
| ... | @@ -95,7 +95,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -95,7 +95,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | { | 97 | { |
| 98 | const case = ctx.obj("invalid store to comptime field", b.host); | 98 | const case = ctx.obj("invalid store to comptime field", b.graph.host); |
| 99 | 99 | ||
| 100 | case.addError( | 100 | case.addError( |
| 101 | \\const a = @import("a.zig"); | 101 | \\const a = @import("a.zig"); |
| ... | @@ -119,7 +119,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -119,7 +119,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | { | 121 | { |
| 122 | const case = ctx.obj("file in multiple modules", b.host); | 122 | const case = ctx.obj("file in multiple modules", b.graph.host); |
| 123 | case.addDepModule("foo", "foo.zig"); | 123 | case.addDepModule("foo", "foo.zig"); |
| 124 | 124 | ||
| 125 | case.addError( | 125 | case.addError( |
| ... | @@ -138,7 +138,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -138,7 +138,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | { | 140 | { |
| 141 | const case = ctx.obj("wrong same named struct", b.host); | 141 | const case = ctx.obj("wrong same named struct", b.graph.host); |
| 142 | 142 | ||
| 143 | case.addError( | 143 | case.addError( |
| 144 | \\const a = @import("a.zig"); | 144 | \\const a = @import("a.zig"); |
| ... | @@ -172,7 +172,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -172,7 +172,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | { | 174 | { |
| 175 | const case = ctx.obj("non-printable invalid character", b.host); | 175 | const case = ctx.obj("non-printable invalid character", b.graph.host); |
| 176 | 176 | ||
| 177 | case.addError("\xff\xfe" ++ | 177 | case.addError("\xff\xfe" ++ |
| 178 | \\export fn foo() bool { | 178 | \\export fn foo() bool { |
| ... | @@ -185,7 +185,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { | ... | @@ -185,7 +185,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | { | 187 | { |
| 188 | const case = ctx.obj("imported generic method call with invalid param", b.host); | 188 | const case = ctx.obj("imported generic method call with invalid param", b.graph.host); |
| 189 | 189 | ||
| 190 | case.addError( | 190 | case.addError( |
| 191 | \\pub const import = @import("import.zig"); | 191 | \\pub const import = @import("import.zig"); |
test/link/bss/build.zig+1-1| ... | @@ -7,7 +7,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -7,7 +7,7 @@ pub fn build(b: *std.Build) void { |
| 7 | const exe = b.addExecutable(.{ | 7 | const exe = b.addExecutable(.{ |
| 8 | .name = "bss", | 8 | .name = "bss", |
| 9 | .root_source_file = b.path("main.zig"), | 9 | .root_source_file = b.path("main.zig"), |
| 10 | .target = b.host, | 10 | .target = b.graph.host, |
| 11 | .optimize = .Debug, | 11 | .optimize = .Debug, |
| 12 | }); | 12 | }); |
| 13 | 13 |
test/link/common_symbols/build.zig+1-1| ... | @@ -14,7 +14,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -14,7 +14,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 14 | const lib_a = b.addStaticLibrary(.{ | 14 | const lib_a = b.addStaticLibrary(.{ |
| 15 | .name = "a", | 15 | .name = "a", |
| 16 | .optimize = optimize, | 16 | .optimize = optimize, |
| 17 | .target = b.host, | 17 | .target = b.graph.host, |
| 18 | }); | 18 | }); |
| 19 | lib_a.addCSourceFiles(.{ | 19 | lib_a.addCSourceFiles(.{ |
| 20 | .files = &.{ "c.c", "a.c", "b.c" }, | 20 | .files = &.{ "c.c", "a.c", "b.c" }, |
test/link/common_symbols_alignment/build.zig+1-1| ... | @@ -14,7 +14,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -14,7 +14,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 14 | const lib_a = b.addStaticLibrary(.{ | 14 | const lib_a = b.addStaticLibrary(.{ |
| 15 | .name = "a", | 15 | .name = "a", |
| 16 | .optimize = optimize, | 16 | .optimize = optimize, |
| 17 | .target = b.host, | 17 | .target = b.graph.host, |
| 18 | }); | 18 | }); |
| 19 | lib_a.addCSourceFiles(.{ | 19 | lib_a.addCSourceFiles(.{ |
| 20 | .files = &.{"a.c"}, | 20 | .files = &.{"a.c"}, |
test/link/interdependent_static_c_libs/build.zig+2-2| ... | @@ -14,7 +14,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -14,7 +14,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 14 | const lib_a = b.addStaticLibrary(.{ | 14 | const lib_a = b.addStaticLibrary(.{ |
| 15 | .name = "a", | 15 | .name = "a", |
| 16 | .optimize = optimize, | 16 | .optimize = optimize, |
| 17 | .target = b.host, | 17 | .target = b.graph.host, |
| 18 | }); | 18 | }); |
| 19 | lib_a.addCSourceFile(.{ .file = b.path("a.c"), .flags = &[_][]const u8{} }); | 19 | lib_a.addCSourceFile(.{ .file = b.path("a.c"), .flags = &[_][]const u8{} }); |
| 20 | lib_a.addIncludePath(b.path(".")); | 20 | lib_a.addIncludePath(b.path(".")); |
| ... | @@ -22,7 +22,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -22,7 +22,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 22 | const lib_b = b.addStaticLibrary(.{ | 22 | const lib_b = b.addStaticLibrary(.{ |
| 23 | .name = "b", | 23 | .name = "b", |
| 24 | .optimize = optimize, | 24 | .optimize = optimize, |
| 25 | .target = b.host, | 25 | .target = b.graph.host, |
| 26 | }); | 26 | }); |
| 27 | lib_b.addCSourceFile(.{ .file = b.path("b.c"), .flags = &[_][]const u8{} }); | 27 | lib_b.addCSourceFile(.{ .file = b.path("b.c"), .flags = &[_][]const u8{} }); |
| 28 | lib_b.addIncludePath(b.path(".")); | 28 | lib_b.addIncludePath(b.path(".")); |
test/link/macho.zig+8-8| ... | @@ -83,14 +83,14 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step { | ... | @@ -83,14 +83,14 @@ pub fn testAll(b: *Build, build_opts: BuildOptions) *Step { |
| 83 | 83 | ||
| 84 | // Tests requiring presence of macOS SDK in system path | 84 | // Tests requiring presence of macOS SDK in system path |
| 85 | if (build_opts.has_macos_sdk) { | 85 | if (build_opts.has_macos_sdk) { |
| 86 | macho_step.dependOn(testDeadStripDylibs(b, .{ .target = b.host })); | 86 | macho_step.dependOn(testDeadStripDylibs(b, .{ .target = b.graph.host })); |
| 87 | macho_step.dependOn(testHeaderpad(b, .{ .target = b.host })); | 87 | macho_step.dependOn(testHeaderpad(b, .{ .target = b.graph.host })); |
| 88 | macho_step.dependOn(testLinkDirectlyCppTbd(b, .{ .target = b.host })); | 88 | macho_step.dependOn(testLinkDirectlyCppTbd(b, .{ .target = b.graph.host })); |
| 89 | macho_step.dependOn(testMergeLiteralsObjc(b, .{ .target = b.host })); | 89 | macho_step.dependOn(testMergeLiteralsObjc(b, .{ .target = b.graph.host })); |
| 90 | macho_step.dependOn(testNeededFramework(b, .{ .target = b.host })); | 90 | macho_step.dependOn(testNeededFramework(b, .{ .target = b.graph.host })); |
| 91 | macho_step.dependOn(testObjc(b, .{ .target = b.host })); | 91 | macho_step.dependOn(testObjc(b, .{ .target = b.graph.host })); |
| 92 | macho_step.dependOn(testObjcpp(b, .{ .target = b.host })); | 92 | macho_step.dependOn(testObjcpp(b, .{ .target = b.graph.host })); |
| 93 | macho_step.dependOn(testWeakFramework(b, .{ .target = b.host })); | 93 | macho_step.dependOn(testWeakFramework(b, .{ .target = b.graph.host })); |
| 94 | } | 94 | } |
| 95 | } | 95 | } |
| 96 | 96 |
test/link/static_libs_from_object_files/build.zig+8-8| ... | @@ -59,7 +59,7 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built | ... | @@ -59,7 +59,7 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built |
| 59 | .name = "test1", | 59 | .name = "test1", |
| 60 | .root_source_file = b.path("main.zig"), | 60 | .root_source_file = b.path("main.zig"), |
| 61 | .optimize = optimize, | 61 | .optimize = optimize, |
| 62 | .target = b.host, | 62 | .target = b.graph.host, |
| 63 | }); | 63 | }); |
| 64 | 64 | ||
| 65 | for (files) |file| { | 65 | for (files) |file| { |
| ... | @@ -77,12 +77,12 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built | ... | @@ -77,12 +77,12 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built |
| 77 | { | 77 | { |
| 78 | const lib_a = b.addStaticLibrary(.{ | 78 | const lib_a = b.addStaticLibrary(.{ |
| 79 | .name = "test2_a", | 79 | .name = "test2_a", |
| 80 | .target = b.host, | 80 | .target = b.graph.host, |
| 81 | .optimize = optimize, | 81 | .optimize = optimize, |
| 82 | }); | 82 | }); |
| 83 | const lib_b = b.addStaticLibrary(.{ | 83 | const lib_b = b.addStaticLibrary(.{ |
| 84 | .name = "test2_b", | 84 | .name = "test2_b", |
| 85 | .target = b.host, | 85 | .target = b.graph.host, |
| 86 | .optimize = optimize, | 86 | .optimize = optimize, |
| 87 | }); | 87 | }); |
| 88 | 88 | ||
| ... | @@ -94,7 +94,7 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built | ... | @@ -94,7 +94,7 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built |
| 94 | const exe = b.addExecutable(.{ | 94 | const exe = b.addExecutable(.{ |
| 95 | .name = "test2", | 95 | .name = "test2", |
| 96 | .root_source_file = b.path("main.zig"), | 96 | .root_source_file = b.path("main.zig"), |
| 97 | .target = b.host, | 97 | .target = b.graph.host, |
| 98 | .optimize = optimize, | 98 | .optimize = optimize, |
| 99 | }); | 99 | }); |
| 100 | exe.linkLibrary(lib_a); | 100 | exe.linkLibrary(lib_a); |
| ... | @@ -111,19 +111,19 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built | ... | @@ -111,19 +111,19 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built |
| 111 | { | 111 | { |
| 112 | const lib_a = b.addStaticLibrary(.{ | 112 | const lib_a = b.addStaticLibrary(.{ |
| 113 | .name = "test3_a", | 113 | .name = "test3_a", |
| 114 | .target = b.host, | 114 | .target = b.graph.host, |
| 115 | .optimize = optimize, | 115 | .optimize = optimize, |
| 116 | }); | 116 | }); |
| 117 | const lib_b = b.addStaticLibrary(.{ | 117 | const lib_b = b.addStaticLibrary(.{ |
| 118 | .name = "test3_b", | 118 | .name = "test3_b", |
| 119 | .target = b.host, | 119 | .target = b.graph.host, |
| 120 | .optimize = optimize, | 120 | .optimize = optimize, |
| 121 | }); | 121 | }); |
| 122 | 122 | ||
| 123 | for (files, 1..) |file, i| { | 123 | for (files, 1..) |file, i| { |
| 124 | const obj = b.addObject(.{ | 124 | const obj = b.addObject(.{ |
| 125 | .name = b.fmt("obj_{}", .{i}), | 125 | .name = b.fmt("obj_{}", .{i}), |
| 126 | .target = b.host, | 126 | .target = b.graph.host, |
| 127 | .optimize = optimize, | 127 | .optimize = optimize, |
| 128 | }); | 128 | }); |
| 129 | obj.addCSourceFile(.{ .file = file, .flags = &flags }); | 129 | obj.addCSourceFile(.{ .file = file, .flags = &flags }); |
| ... | @@ -135,7 +135,7 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built | ... | @@ -135,7 +135,7 @@ fn add(b: *Build, test_step: *Step, files: []const LazyPath, optimize: std.built |
| 135 | const exe = b.addExecutable(.{ | 135 | const exe = b.addExecutable(.{ |
| 136 | .name = "test3", | 136 | .name = "test3", |
| 137 | .root_source_file = b.path("main.zig"), | 137 | .root_source_file = b.path("main.zig"), |
| 138 | .target = b.host, | 138 | .target = b.graph.host, |
| 139 | .optimize = optimize, | 139 | .optimize = optimize, |
| 140 | }); | 140 | }); |
| 141 | exe.linkLibrary(lib_a); | 141 | exe.linkLibrary(lib_a); |
test/src/CompareOutput.zig+3-3| ... | @@ -96,7 +96,7 @@ pub fn addCase(self: *CompareOutput, case: TestCase) void { | ... | @@ -96,7 +96,7 @@ pub fn addCase(self: *CompareOutput, case: TestCase) void { |
| 96 | 96 | ||
| 97 | const exe = b.addExecutable(.{ | 97 | const exe = b.addExecutable(.{ |
| 98 | .name = "test", | 98 | .name = "test", |
| 99 | .target = b.host, | 99 | .target = b.graph.host, |
| 100 | .optimize = .Debug, | 100 | .optimize = .Debug, |
| 101 | }); | 101 | }); |
| 102 | exe.addAssemblyFile(write_src.files.items[0].getPath()); | 102 | exe.addAssemblyFile(write_src.files.items[0].getPath()); |
| ... | @@ -121,7 +121,7 @@ pub fn addCase(self: *CompareOutput, case: TestCase) void { | ... | @@ -121,7 +121,7 @@ pub fn addCase(self: *CompareOutput, case: TestCase) void { |
| 121 | .name = "test", | 121 | .name = "test", |
| 122 | .root_source_file = write_src.files.items[0].getPath(), | 122 | .root_source_file = write_src.files.items[0].getPath(), |
| 123 | .optimize = optimize, | 123 | .optimize = optimize, |
| 124 | .target = b.host, | 124 | .target = b.graph.host, |
| 125 | }); | 125 | }); |
| 126 | if (case.link_libc) { | 126 | if (case.link_libc) { |
| 127 | exe.linkSystemLibrary("c"); | 127 | exe.linkSystemLibrary("c"); |
| ... | @@ -146,7 +146,7 @@ pub fn addCase(self: *CompareOutput, case: TestCase) void { | ... | @@ -146,7 +146,7 @@ pub fn addCase(self: *CompareOutput, case: TestCase) void { |
| 146 | const exe = b.addExecutable(.{ | 146 | const exe = b.addExecutable(.{ |
| 147 | .name = "test", | 147 | .name = "test", |
| 148 | .root_source_file = write_src.files.items[0].getPath(), | 148 | .root_source_file = write_src.files.items[0].getPath(), |
| 149 | .target = b.host, | 149 | .target = b.graph.host, |
| 150 | .optimize = .Debug, | 150 | .optimize = .Debug, |
| 151 | }); | 151 | }); |
| 152 | if (case.link_libc) { | 152 | if (case.link_libc) { |
test/src/RunTranslatedC.zig+1-1| ... | @@ -77,7 +77,7 @@ pub fn addCase(self: *RunTranslatedCContext, case: *const TestCase) void { | ... | @@ -77,7 +77,7 @@ pub fn addCase(self: *RunTranslatedCContext, case: *const TestCase) void { |
| 77 | } | 77 | } |
| 78 | const translate_c = b.addTranslateC(.{ | 78 | const translate_c = b.addTranslateC(.{ |
| 79 | .root_source_file = write_src.files.items[0].getPath(), | 79 | .root_source_file = write_src.files.items[0].getPath(), |
| 80 | .target = b.host, | 80 | .target = b.graph.host, |
| 81 | .optimize = .Debug, | 81 | .optimize = .Debug, |
| 82 | }); | 82 | }); |
| 83 | 83 |
test/src/StackTrace.zig+1-1| ... | @@ -56,7 +56,7 @@ fn addExpect( | ... | @@ -56,7 +56,7 @@ fn addExpect( |
| 56 | .name = "test", | 56 | .name = "test", |
| 57 | .root_source_file = write_src.files.items[0].getPath(), | 57 | .root_source_file = write_src.files.items[0].getPath(), |
| 58 | .optimize = optimize_mode, | 58 | .optimize = optimize_mode, |
| 59 | .target = b.host, | 59 | .target = b.graph.host, |
| 60 | .error_tracing = mode_config.error_tracing, | 60 | .error_tracing = mode_config.error_tracing, |
| 61 | }); | 61 | }); |
| 62 | 62 |
test/standalone/c_compiler/build.zig+1-1| ... | @@ -23,7 +23,7 @@ fn add( | ... | @@ -23,7 +23,7 @@ fn add( |
| 23 | cpp_name: []const u8, | 23 | cpp_name: []const u8, |
| 24 | optimize: std.builtin.OptimizeMode, | 24 | optimize: std.builtin.OptimizeMode, |
| 25 | ) void { | 25 | ) void { |
| 26 | const target = b.host; | 26 | const target = b.graph.host; |
| 27 | 27 | ||
| 28 | const exe_c = b.addExecutable(.{ | 28 | const exe_c = b.addExecutable(.{ |
| 29 | .name = c_name, | 29 | .name = c_name, |
test/standalone/child_process/build.zig+1-1| ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { |
| 6 | b.default_step = test_step; | 6 | b.default_step = test_step; |
| 7 | 7 | ||
| 8 | const optimize: std.builtin.OptimizeMode = .Debug; | 8 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 9 | const target = b.host; | 9 | const target = b.graph.host; |
| 10 | 10 | ||
| 11 | if (builtin.os.tag == .wasi) return; | 11 | if (builtin.os.tag == .wasi) return; |
| 12 | 12 |
test/standalone/dep_diamond/build.zig+1-1| ... | @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void { |
| 13 | const exe = b.addExecutable(.{ | 13 | const exe = b.addExecutable(.{ |
| 14 | .name = "test", | 14 | .name = "test", |
| 15 | .root_source_file = b.path("test.zig"), | 15 | .root_source_file = b.path("test.zig"), |
| 16 | .target = b.host, | 16 | .target = b.graph.host, |
| 17 | .optimize = optimize, | 17 | .optimize = optimize, |
| 18 | }); | 18 | }); |
| 19 | exe.root_module.addAnonymousImport("foo", .{ | 19 | exe.root_module.addAnonymousImport("foo", .{ |
test/standalone/dep_mutually_recursive/build.zig+1-1| ... | @@ -18,7 +18,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -18,7 +18,7 @@ pub fn build(b: *std.Build) void { |
| 18 | const exe = b.addExecutable(.{ | 18 | const exe = b.addExecutable(.{ |
| 19 | .name = "test", | 19 | .name = "test", |
| 20 | .root_source_file = b.path("test.zig"), | 20 | .root_source_file = b.path("test.zig"), |
| 21 | .target = b.host, | 21 | .target = b.graph.host, |
| 22 | .optimize = optimize, | 22 | .optimize = optimize, |
| 23 | }); | 23 | }); |
| 24 | exe.root_module.addImport("foo", foo); | 24 | exe.root_module.addImport("foo", foo); |
test/standalone/dep_recursive/build.zig+1-1| ... | @@ -14,7 +14,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -14,7 +14,7 @@ pub fn build(b: *std.Build) void { |
| 14 | const exe = b.addExecutable(.{ | 14 | const exe = b.addExecutable(.{ |
| 15 | .name = "test", | 15 | .name = "test", |
| 16 | .root_source_file = b.path("test.zig"), | 16 | .root_source_file = b.path("test.zig"), |
| 17 | .target = b.host, | 17 | .target = b.graph.host, |
| 18 | .optimize = optimize, | 18 | .optimize = optimize, |
| 19 | }); | 19 | }); |
| 20 | exe.root_module.addImport("foo", foo); | 20 | exe.root_module.addImport("foo", foo); |
test/standalone/dep_shared_builtin/build.zig+1-1| ... | @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void { |
| 9 | const exe = b.addExecutable(.{ | 9 | const exe = b.addExecutable(.{ |
| 10 | .name = "test", | 10 | .name = "test", |
| 11 | .root_source_file = b.path("test.zig"), | 11 | .root_source_file = b.path("test.zig"), |
| 12 | .target = b.host, | 12 | .target = b.graph.host, |
| 13 | .optimize = optimize, | 13 | .optimize = optimize, |
| 14 | }); | 14 | }); |
| 15 | exe.root_module.addAnonymousImport("foo", .{ | 15 | exe.root_module.addAnonymousImport("foo", .{ |
test/standalone/dep_triangle/build.zig+1-1| ... | @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) void { |
| 13 | const exe = b.addExecutable(.{ | 13 | const exe = b.addExecutable(.{ |
| 14 | .name = "test", | 14 | .name = "test", |
| 15 | .root_source_file = b.path("test.zig"), | 15 | .root_source_file = b.path("test.zig"), |
| 16 | .target = b.host, | 16 | .target = b.graph.host, |
| 17 | .optimize = optimize, | 17 | .optimize = optimize, |
| 18 | }); | 18 | }); |
| 19 | exe.root_module.addAnonymousImport("foo", .{ | 19 | exe.root_module.addAnonymousImport("foo", .{ |
test/standalone/empty_env/build.zig+1-1| ... | @@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -15,7 +15,7 @@ pub fn build(b: *std.Build) void { |
| 15 | const main = b.addExecutable(.{ | 15 | const main = b.addExecutable(.{ |
| 16 | .name = "main", | 16 | .name = "main", |
| 17 | .root_source_file = b.path("main.zig"), | 17 | .root_source_file = b.path("main.zig"), |
| 18 | .target = b.host, | 18 | .target = b.graph.host, |
| 19 | .optimize = optimize, | 19 | .optimize = optimize, |
| 20 | }); | 20 | }); |
| 21 | 21 |
test/standalone/extern/build.zig+1-1| ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { |
| 6 | const obj = b.addObject(.{ | 6 | const obj = b.addObject(.{ |
| 7 | .name = "exports", | 7 | .name = "exports", |
| 8 | .root_source_file = b.path("exports.zig"), | 8 | .root_source_file = b.path("exports.zig"), |
| 9 | .target = b.host, | 9 | .target = b.graph.host, |
| 10 | .optimize = optimize, | 10 | .optimize = optimize, |
| 11 | }); | 11 | }); |
| 12 | const main = b.addTest(.{ | 12 | const main = b.addTest(.{ |
test/standalone/global_linkage/build.zig+1-1| ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { |
| 5 | b.default_step = test_step; | 5 | b.default_step = test_step; |
| 6 | 6 | ||
| 7 | const optimize: std.builtin.OptimizeMode = .Debug; | 7 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 8 | const target = b.host; | 8 | const target = b.graph.host; |
| 9 | 9 | ||
| 10 | const obj1 = b.addStaticLibrary(.{ | 10 | const obj1 = b.addStaticLibrary(.{ |
| 11 | .name = "obj1", | 11 | .name = "obj1", |
test/standalone/issue_11595/build.zig+1-1| ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { |
| 6 | b.default_step = test_step; | 6 | b.default_step = test_step; |
| 7 | 7 | ||
| 8 | const optimize: std.builtin.OptimizeMode = .Debug; | 8 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 9 | const target = b.host; | 9 | const target = b.graph.host; |
| 10 | 10 | ||
| 11 | if (builtin.os.tag == .windows) { | 11 | if (builtin.os.tag == .windows) { |
| 12 | // https://github.com/ziglang/zig/issues/12419 | 12 | // https://github.com/ziglang/zig/issues/12419 |
test/standalone/issue_12588/build.zig+1-1| ... | @@ -10,7 +10,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -10,7 +10,7 @@ pub fn build(b: *std.Build) void { |
| 10 | .name = "main", | 10 | .name = "main", |
| 11 | .root_source_file = b.path("main.zig"), | 11 | .root_source_file = b.path("main.zig"), |
| 12 | .optimize = optimize, | 12 | .optimize = optimize, |
| 13 | .target = b.host, | 13 | .target = b.graph.host, |
| 14 | }); | 14 | }); |
| 15 | _ = obj.getEmittedLlvmIr(); | 15 | _ = obj.getEmittedLlvmIr(); |
| 16 | _ = obj.getEmittedLlvmBc(); | 16 | _ = obj.getEmittedLlvmBc(); |
test/standalone/issue_12706/build.zig+1-1| ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { |
| 6 | b.default_step = test_step; | 6 | b.default_step = test_step; |
| 7 | 7 | ||
| 8 | const optimize: std.builtin.OptimizeMode = .Debug; | 8 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 9 | const target = b.host; | 9 | const target = b.graph.host; |
| 10 | 10 | ||
| 11 | const exe = b.addExecutable(.{ | 11 | const exe = b.addExecutable(.{ |
| 12 | .name = "main", | 12 | .name = "main", |
test/standalone/issue_339/build.zig+1-1| ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { |
| 5 | b.default_step = test_step; | 5 | b.default_step = test_step; |
| 6 | 6 | ||
| 7 | const optimize: std.builtin.OptimizeMode = .Debug; | 7 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 8 | const target = b.host; | 8 | const target = b.graph.host; |
| 9 | 9 | ||
| 10 | const obj = b.addObject(.{ | 10 | const obj = b.addObject(.{ |
| 11 | .name = "test", | 11 | .name = "test", |
test/standalone/load_dynamic_library/build.zig+1-1| ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { |
| 6 | b.default_step = test_step; | 6 | b.default_step = test_step; |
| 7 | 7 | ||
| 8 | const optimize: std.builtin.OptimizeMode = .Debug; | 8 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 9 | const target = b.host; | 9 | const target = b.graph.host; |
| 10 | 10 | ||
| 11 | if (builtin.os.tag == .wasi) return; | 11 | if (builtin.os.tag == .wasi) return; |
| 12 | 12 |
test/standalone/mix_c_files/build.zig+1-1| ... | @@ -19,7 +19,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize | ... | @@ -19,7 +19,7 @@ fn add(b: *std.Build, test_step: *std.Build.Step, optimize: std.builtin.Optimize |
| 19 | const exe = b.addExecutable(.{ | 19 | const exe = b.addExecutable(.{ |
| 20 | .name = "test", | 20 | .name = "test", |
| 21 | .root_source_file = b.path("main.zig"), | 21 | .root_source_file = b.path("main.zig"), |
| 22 | .target = b.host, | 22 | .target = b.graph.host, |
| 23 | .optimize = optimize, | 23 | .optimize = optimize, |
| 24 | }); | 24 | }); |
| 25 | exe.addCSourceFile(.{ .file = b.path("test.c"), .flags = &[_][]const u8{"-std=c11"} }); | 25 | exe.addCSourceFile(.{ .file = b.path("test.c"), .flags = &[_][]const u8{"-std=c11"} }); |
test/standalone/mix_o_files/build.zig+1-1| ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { |
| 5 | b.default_step = test_step; | 5 | b.default_step = test_step; |
| 6 | 6 | ||
| 7 | const optimize: std.builtin.OptimizeMode = .Debug; | 7 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 8 | const target = b.host; | 8 | const target = b.graph.host; |
| 9 | 9 | ||
| 10 | const obj = b.addObject(.{ | 10 | const obj = b.addObject(.{ |
| 11 | .name = "base64", | 11 | .name = "base64", |
test/standalone/options/build.zig+1-1| ... | @@ -3,7 +3,7 @@ const std = @import("std"); | ... | @@ -3,7 +3,7 @@ const std = @import("std"); |
| 3 | pub fn build(b: *std.Build) void { | 3 | pub fn build(b: *std.Build) void { |
| 4 | const main = b.addTest(.{ | 4 | const main = b.addTest(.{ |
| 5 | .root_source_file = b.path("src/main.zig"), | 5 | .root_source_file = b.path("src/main.zig"), |
| 6 | .target = b.host, | 6 | .target = b.graph.host, |
| 7 | .optimize = .Debug, | 7 | .optimize = .Debug, |
| 8 | }); | 8 | }); |
| 9 | 9 |
test/standalone/pkg_import/build.zig+1-1| ... | @@ -10,7 +10,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -10,7 +10,7 @@ pub fn build(b: *std.Build) void { |
| 10 | .name = "test", | 10 | .name = "test", |
| 11 | .root_source_file = b.path("test.zig"), | 11 | .root_source_file = b.path("test.zig"), |
| 12 | .optimize = optimize, | 12 | .optimize = optimize, |
| 13 | .target = b.host, | 13 | .target = b.graph.host, |
| 14 | }); | 14 | }); |
| 15 | exe.root_module.addAnonymousImport("my_pkg", .{ .root_source_file = b.path("pkg.zig") }); | 15 | exe.root_module.addAnonymousImport("my_pkg", .{ .root_source_file = b.path("pkg.zig") }); |
| 16 | 16 |
test/standalone/self_exe_symlink/build.zig+1-1| ... | @@ -7,7 +7,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -7,7 +7,7 @@ pub fn build(b: *std.Build) void { |
| 7 | b.default_step = test_step; | 7 | b.default_step = test_step; |
| 8 | 8 | ||
| 9 | const optimize: std.builtin.OptimizeMode = .Debug; | 9 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 10 | const target = b.host; | 10 | const target = b.graph.host; |
| 11 | 11 | ||
| 12 | // The test requires getFdPath in order to to get the path of the | 12 | // The test requires getFdPath in order to to get the path of the |
| 13 | // File returned by openSelfExe | 13 | // File returned by openSelfExe |
test/standalone/shared_library/build.zig+1-1| ... | @@ -10,7 +10,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -10,7 +10,7 @@ pub fn build(b: *std.Build) void { |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | const optimize: std.builtin.OptimizeMode = .Debug; | 12 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 13 | const target = b.host; | 13 | const target = b.graph.host; |
| 14 | const lib = b.addSharedLibrary(.{ | 14 | const lib = b.addSharedLibrary(.{ |
| 15 | .name = "mathtest", | 15 | .name = "mathtest", |
| 16 | .root_source_file = b.path("mathtest.zig"), | 16 | .root_source_file = b.path("mathtest.zig"), |
test/standalone/static_c_lib/build.zig+1-1| ... | @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -9,7 +9,7 @@ pub fn build(b: *std.Build) void { |
| 9 | const foo = b.addStaticLibrary(.{ | 9 | const foo = b.addStaticLibrary(.{ |
| 10 | .name = "foo", | 10 | .name = "foo", |
| 11 | .optimize = optimize, | 11 | .optimize = optimize, |
| 12 | .target = b.host, | 12 | .target = b.graph.host, |
| 13 | }); | 13 | }); |
| 14 | foo.addCSourceFile(.{ .file = b.path("foo.c"), .flags = &[_][]const u8{} }); | 14 | foo.addCSourceFile(.{ .file = b.path("foo.c"), .flags = &[_][]const u8{} }); |
| 15 | foo.addIncludePath(b.path(".")); | 15 | foo.addIncludePath(b.path(".")); |
test/standalone/strip_empty_loop/build.zig+1-1| ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) void { |
| 5 | b.default_step = test_step; | 5 | b.default_step = test_step; |
| 6 | 6 | ||
| 7 | const optimize = std.builtin.OptimizeMode.Debug; | 7 | const optimize = std.builtin.OptimizeMode.Debug; |
| 8 | const target = b.host; | 8 | const target = b.graph.host; |
| 9 | 9 | ||
| 10 | const main = b.addExecutable(.{ | 10 | const main = b.addExecutable(.{ |
| 11 | .name = "main", | 11 | .name = "main", |
test/standalone/windows_argv/build.zig+1-1| ... | @@ -35,7 +35,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -35,7 +35,7 @@ pub fn build(b: *std.Build) !void { |
| 35 | const fuzz = b.addExecutable(.{ | 35 | const fuzz = b.addExecutable(.{ |
| 36 | .name = "fuzz", | 36 | .name = "fuzz", |
| 37 | .root_source_file = b.path("fuzz.zig"), | 37 | .root_source_file = b.path("fuzz.zig"), |
| 38 | .target = b.host, | 38 | .target = b.graph.host, |
| 39 | .optimize = optimize, | 39 | .optimize = optimize, |
| 40 | }); | 40 | }); |
| 41 | 41 |
test/standalone/windows_bat_args/build.zig+1-1| ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void { | ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) !void { |
| 6 | b.default_step = test_step; | 6 | b.default_step = test_step; |
| 7 | 7 | ||
| 8 | const optimize: std.builtin.OptimizeMode = .Debug; | 8 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 9 | const target = b.host; | 9 | const target = b.graph.host; |
| 10 | 10 | ||
| 11 | if (builtin.os.tag != .windows) return; | 11 | if (builtin.os.tag != .windows) return; |
| 12 | 12 |
test/standalone/windows_resources/build.zig+2-2| ... | @@ -12,10 +12,10 @@ pub fn build(b: *std.Build) void { | ... | @@ -12,10 +12,10 @@ pub fn build(b: *std.Build) void { |
| 12 | 12 | ||
| 13 | const generated_h_step = b.addWriteFile("generated.h", "#define GENERATED_DEFINE \"foo\""); | 13 | const generated_h_step = b.addWriteFile("generated.h", "#define GENERATED_DEFINE \"foo\""); |
| 14 | 14 | ||
| 15 | add(b, b.host, .any, test_step, generated_h_step); | 15 | add(b, b.graph.host, .any, test_step, generated_h_step); |
| 16 | add(b, target, .any, test_step, generated_h_step); | 16 | add(b, target, .any, test_step, generated_h_step); |
| 17 | 17 | ||
| 18 | add(b, b.host, .gnu, test_step, generated_h_step); | 18 | add(b, b.graph.host, .gnu, test_step, generated_h_step); |
| 19 | add(b, target, .gnu, test_step, generated_h_step); | 19 | add(b, target, .gnu, test_step, generated_h_step); |
| 20 | } | 20 | } |
| 21 | 21 |
test/standalone/windows_spawn/build.zig+1-1| ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { | ... | @@ -6,7 +6,7 @@ pub fn build(b: *std.Build) void { |
| 6 | b.default_step = test_step; | 6 | b.default_step = test_step; |
| 7 | 7 | ||
| 8 | const optimize: std.builtin.OptimizeMode = .Debug; | 8 | const optimize: std.builtin.OptimizeMode = .Debug; |
| 9 | const target = b.host; | 9 | const target = b.graph.host; |
| 10 | 10 | ||
| 11 | if (builtin.os.tag != .windows) return; | 11 | if (builtin.os.tag != .windows) return; |
| 12 | 12 |
test/tests.zig+1-1| ... | @@ -658,7 +658,7 @@ pub fn addStackTraceTests( | ... | @@ -658,7 +658,7 @@ pub fn addStackTraceTests( |
| 658 | const check_exe = b.addExecutable(.{ | 658 | const check_exe = b.addExecutable(.{ |
| 659 | .name = "check-stack-trace", | 659 | .name = "check-stack-trace", |
| 660 | .root_source_file = b.path("test/src/check-stack-trace.zig"), | 660 | .root_source_file = b.path("test/src/check-stack-trace.zig"), |
| 661 | .target = b.host, | 661 | .target = b.graph.host, |
| 662 | .optimize = .Debug, | 662 | .optimize = .Debug, |
| 663 | }); | 663 | }); |
| 664 | 664 |