build: enable ssa.GlobalDebug when LLGO_DEBUG=1 enabled, enable ssa.NaiveForm when LLGO_OPTIMIZED=0

This commit is contained in:
Li Jie
2024-09-23 21:17:56 +08:00
parent 3fcbcca8e4
commit 6c18dc63aa
6 changed files with 48 additions and 10 deletions

View File

@@ -20,16 +20,17 @@ import (
"os"
"github.com/goplus/llgo/cl"
"github.com/goplus/llgo/internal/build"
"github.com/goplus/llgo/internal/mod"
llssa "github.com/goplus/llgo/ssa"
)
func Init(enableDbg bool) {
func Init() {
llssa.Initialize(llssa.InitAll)
llssa.SetDebug(llssa.DbgFlagAll)
cl.SetDebug(cl.DbgFlagAll)
cl.EnableDebugSymbols(enableDbg)
cl.EnableDebugSymbols(build.IsDebugEnabled())
}
func PkgPath(dir string) string {