| ... | ... | @@ -17,8 +17,10 @@ pub fn build(b: *Builder) !void { |
| 17 | 17 | b.setPreferredReleaseMode(.ReleaseFast); |
| 18 | 18 | const mode = b.standardReleaseOptions(); |
| 19 | 19 | const target = b.standardTargetOptions(.{}); |
| 20 | const single_threaded = b.option(bool, "single-threaded", "Build artifacts that run in single threaded mode") orelse false; |
| 20 | 21 | |
| 21 | 22 | var docgen_exe = b.addExecutable("docgen", "doc/docgen.zig"); |
| 23 | docgen_exe.single_threaded = single_threaded; |
| 22 | 24 | |
| 23 | 25 | const rel_zig_exe = try fs.path.relative(b.allocator, b.build_root, b.zig_exe); |
| 24 | 26 | const langref_out_path = fs.path.join( |
| ... | ... | @@ -41,6 +43,7 @@ pub fn build(b: *Builder) !void { |
| 41 | 43 | var test_stage2 = b.addTest("src/test.zig"); |
| 42 | 44 | test_stage2.setBuildMode(mode); |
| 43 | 45 | test_stage2.addPackagePath("test_cases", "test/cases.zig"); |
| 46 | test_stage2.single_threaded = single_threaded; |
| 44 | 47 | |
| 45 | 48 | const fmt_build_zig = b.addFmt(&[_][]const u8{"build.zig"}); |
| 46 | 49 | |
| ... | ... | @@ -104,6 +107,7 @@ pub fn build(b: *Builder) !void { |
| 104 | 107 | exe.setTarget(target); |
| 105 | 108 | toolchain_step.dependOn(&exe.step); |
| 106 | 109 | b.default_step.dependOn(&exe.step); |
| 110 | exe.single_threaded = single_threaded; |
| 107 | 111 | |
| 108 | 112 | exe.addBuildOption(u32, "mem_leak_frames", mem_leak_frames); |
| 109 | 113 | exe.addBuildOption(bool, "skip_non_native", skip_non_native); |
| ... | ... | @@ -131,6 +135,7 @@ pub fn build(b: *Builder) !void { |
| 131 | 135 | softfloat.addIncludeDir("deps/SoftFloat-3e/source/8086"); |
| 132 | 136 | softfloat.addIncludeDir("deps/SoftFloat-3e/source/include"); |
| 133 | 137 | softfloat.addCSourceFiles(&softfloat_sources, &[_][]const u8{ "-std=c99", "-O3" }); |
| 138 | softfloat.single_threaded = single_threaded; |
| 134 | 139 | |
| 135 | 140 | exe.linkLibrary(softfloat); |
| 136 | 141 | test_stage2.linkLibrary(softfloat); |
| ... | ... | @@ -296,7 +301,7 @@ pub fn build(b: *Builder) !void { |
| 296 | 301 | "behavior", |
| 297 | 302 | "Run the behavior tests", |
| 298 | 303 | modes, |
| 299 | | false, |
| 304 | false, // skip_single_threaded |
| 300 | 305 | skip_non_native, |
| 301 | 306 | skip_libc, |
| 302 | 307 | is_wine_enabled, |
| ... | ... | @@ -313,9 +318,9 @@ pub fn build(b: *Builder) !void { |
| 313 | 318 | "compiler-rt", |
| 314 | 319 | "Run the compiler_rt tests", |
| 315 | 320 | modes, |
| 316 | | true, |
| 321 | true, // skip_single_threaded |
| 317 | 322 | skip_non_native, |
| 318 | | true, |
| 323 | true, // skip_libc |
| 319 | 324 | is_wine_enabled, |
| 320 | 325 | is_qemu_enabled, |
| 321 | 326 | is_wasmtime_enabled, |
| ... | ... | @@ -330,9 +335,9 @@ pub fn build(b: *Builder) !void { |
| 330 | 335 | "minilibc", |
| 331 | 336 | "Run the mini libc tests", |
| 332 | 337 | modes, |
| 333 | | true, |
| 338 | true, // skip_single_threaded |
| 334 | 339 | skip_non_native, |
| 335 | | true, |
| 340 | true, // skip_libc |
| 336 | 341 | is_wine_enabled, |
| 337 | 342 | is_qemu_enabled, |
| 338 | 343 | is_wasmtime_enabled, |