From cc5c1144a7f1529d5bda1193cd020e33cf538457 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Tue, 16 Sep 2025 16:40:45 +0800 Subject: [PATCH] internal/crosscompile:Oz optimize level for embed target --- internal/crosscompile/crosscompile.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/crosscompile/crosscompile.go b/internal/crosscompile/crosscompile.go index 16027822..a1bf5ee5 100644 --- a/internal/crosscompile/crosscompile.go +++ b/internal/crosscompile/crosscompile.go @@ -481,9 +481,8 @@ func UseTarget(targetName string) (export Export, err error) { envs := buildEnvMap(env.LLGoROOT()) // Convert LLVMTarget, CPU, Features to CCFLAGS/LDFLAGS - var ccflags []string var ldflags []string - + ccflags := []string{"-Oz"} cflags := []string{"-Wno-override-module", "-Qunused-arguments", "-Wno-unused-command-line-argument"} if config.LLVMTarget != "" { cflags = append(cflags, "--target="+config.LLVMTarget)