File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ pub fn build(b: *std.Build) void {
1919 // For example, `-Dlegacy-support=2` means: support legacy formats >= v0.2.0
2020 std .debug .assert (legacy_support < 8 );
2121
22+ const multi_thread = b .option (bool , "multi-thread" , "Enable multi-threading" ) orelse (target .result .os .tag != .wasi );
2223 const disable_assembly = b .option (bool , "disable-assembly" , "Assembly support" ) orelse false ;
2324 const huf_force_decompress_x1 = b .option (bool , "huf-force-decompress-x1" , "" ) orelse minify ;
2425 const huf_force_decompress_x2 = b .option (bool , "huf-force-decompress-x2" , "" ) orelse false ;
@@ -60,6 +61,7 @@ pub fn build(b: *std.Build) void {
6061 }
6162
6263 zstd .root_module .addCMacro ("ZSTD_LEGACY_SUPPORT" , b .fmt ("{d}" , .{legacy_support }));
64+ if (multi_thread ) zstd .root_module .addCMacro ("ZSTD_MULTITHREAD" , "1" );
6365 if (disable_assembly ) zstd .root_module .addCMacro ("ZSTD_DISABLE_ASM" , "" );
6466 if (huf_force_decompress_x1 ) zstd .root_module .addCMacro ("HUF_FORCE_DECOMPRESS_X1" , "" );
6567 if (huf_force_decompress_x2 ) zstd .root_module .addCMacro ("HUF_FORCE_DECOMPRESS_X2" , "" );
You can’t perform that action at this time.
0 commit comments