Revert "[WebAssembly] Temporarily work around lack of __attribute__((constructor))"

This reverts commit 8ef9f7fcad.
This commit is contained in:
Doug Gregor
2025-03-08 08:06:28 -08:00
parent 904d0cffb2
commit d7f687619e

View File

@@ -1392,17 +1392,8 @@ static bool swift_isInConformanceExecutionContextImpl(
return true;
if (context->globalActorIsolationType) {
if (!_swift_task_isCurrentGlobalActorHook) {
#if defined(__wasm__)
// FIXME: We don't currently support a concurrency model for WebAssembly,
// and the global actor hook isn't getting initialized due to the
// lack of __attribute__((constructor)) support. Therefore, we
// treat everything "as if" it were on the correct global actor.
return true;
#else
if (!_swift_task_isCurrentGlobalActorHook)
return false;
#endif
}
// Check whether we are running on this global actor.
if (!_swift_task_isCurrentGlobalActorHook(