gogio: [ios] add CXX, CGO_CXXFLAGS environment variable for cgo cross-compilation and correct signKey

Signed-off-by: CoyAce <AkeyCoy@gmail.com>
This commit is contained in:
CoyAce
2026-02-10 11:41:55 +08:00
committed by Elias Naur
parent e5b1a4e6cd
commit f4d6788248
+3 -1
View File
@@ -79,7 +79,7 @@ func buildIOS(tmpDir, target string, bi *buildInfo) error {
embedded := filepath.Join(appDir, "embedded.mobileprovision") embedded := filepath.Join(appDir, "embedded.mobileprovision")
var provisions []string var provisions []string
if bi.key == "" { if bi.key != "" {
if ext := filepath.Ext(bi.key); ext != ".mobileprovision" && ext != ".provisionprofile" { if ext := filepath.Ext(bi.key); ext != ".mobileprovision" && ext != ".provisionprofile" {
return fmt.Errorf("sign: -signkey specifies an Apple provisioning profile, but %q does not end in .mobileprovision or .provisionprofile", bi.key) return fmt.Errorf("sign: -signkey specifies an Apple provisioning profile, but %q does not end in .mobileprovision or .provisionprofile", bi.key)
} }
@@ -221,7 +221,9 @@ func exeIOS(tmpDir, target, app string, bi *buildInfo) error {
"GOARCH="+a, "GOARCH="+a,
"CGO_ENABLED=1", "CGO_ENABLED=1",
"CC="+clang, "CC="+clang,
"CXX="+clang+"++",
"CGO_CFLAGS="+cflagsLine, "CGO_CFLAGS="+cflagsLine,
"CGO_CXXFLAGS="+cflagsLine,
"CGO_LDFLAGS=-lresolv "+cflagsLine, "CGO_LDFLAGS=-lresolv "+cflagsLine,
) )
builds.Go(func() error { builds.Go(func() error {