mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 19:23:25 +00:00
compiler: only check for default stack size with tasks scheduler
With -scheduler=none, there are no goroutines so there is no stack size anywhere. Therefore, don't check whether the default stack size is set.
This commit is contained in:
committed by
Ron Evans
parent
d7ec9ddcd2
commit
ff5d0c9886
@@ -34,7 +34,7 @@ func (b *builder) createGoInstruction(funcPtr llvm.Value, params []llvm.Value, p
|
|||||||
} else {
|
} else {
|
||||||
// The stack size is fixed at compile time. By emitting it here as a
|
// The stack size is fixed at compile time. By emitting it here as a
|
||||||
// constant, it can be optimized.
|
// constant, it can be optimized.
|
||||||
if b.DefaultStackSize == 0 {
|
if b.Scheduler == "tasks" && b.DefaultStackSize == 0 {
|
||||||
b.addError(pos, "default stack size for goroutines is not set")
|
b.addError(pos, "default stack size for goroutines is not set")
|
||||||
}
|
}
|
||||||
stackSize = llvm.ConstInt(b.uintptrType, b.DefaultStackSize, false)
|
stackSize = llvm.ConstInt(b.uintptrType, b.DefaultStackSize, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user