mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 05:53:39 +00:00
gc: drop support for 'precise' globals
Precise globals require a whole program optimization pass that is hard to support when building packages separately. This patch removes support for these globals by converting the last use (Linux) to use linker-defined symbols instead. For details, see: https://github.com/tinygo-org/tinygo/issues/2870
This commit is contained in:
committed by
Ron Evans
parent
5c488e3145
commit
2d61972475
@@ -189,8 +189,7 @@ func Optimize(mod llvm.Module, config *compileopts.Config, optLevel, sizeLevel i
|
||||
builder.Populate(modPasses)
|
||||
modPasses.Run(mod)
|
||||
|
||||
hasGCPass := AddGlobalsBitmap(mod)
|
||||
hasGCPass = MakeGCStackSlots(mod) || hasGCPass
|
||||
hasGCPass := MakeGCStackSlots(mod)
|
||||
if hasGCPass {
|
||||
if err := llvm.VerifyModule(mod, llvm.PrintMessageAction); err != nil {
|
||||
return []error{errors.New("GC pass caused a verification failure")}
|
||||
|
||||
Reference in New Issue
Block a user