diff --git a/src/Compilation.zig b/src/Compilation.zig index 4e0a36d652d5c87ccf869180c2f50d3c9c215aec..fe13df80976d7da4599b0c124f7ebad24fa6b42e 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1029,7 +1029,7 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation { const include_compiler_rt = options.want_compiler_rt orelse needs_c_symbols; - const must_single_thread = target_util.isSingleThreaded(options.target); + const must_single_thread = options.target.isWasm() and !options.linker_shared_memory; const single_threaded = options.single_threaded orelse must_single_thread; if (must_single_thread and !single_threaded) { return error.TargetRequiresSingleThreaded; diff --git a/src/target.zig b/src/target.zig index 2d27869cf603ec2b363fe4c1f946223434b1fb8e..28833428a7e18d7762d55939f26cba89b6cbe3f0 100644 --- a/src/target.zig +++ b/src/target.zig @@ -207,10 +207,6 @@ pub fn supports_fpic(target: std.Target) bool { return target.os.tag != .windows and target.os.tag != .uefi; } -pub fn isSingleThreaded(target: std.Target) bool { - return target.isWasm(); -} - /// Valgrind supports more, but Zig does not support them yet. pub fn hasValgrindSupport(target: std.Target) bool { switch (target.cpu.arch) {