Skip to content

Commit 5770105

Browse files
author
jld3103
authored
Fix MacOSX version min (#199)
1 parent a53817b commit 5770105

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

cmd/build.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,14 @@ func buildEnv(targetOS string, engineCachePath string) []string {
712712
cgoLdflags += fmt.Sprintf(" -L%s -L%s", engineCachePath, outputDirPath)
713713
cgoLdflags += " -lflutter_engine -Wl,-rpath,."
714714
}
715-
cgoLdflags += " -mmacosx-version-min=10.10"
716-
cgoCflags += " -mmacosx-version-min=10.10"
715+
if runtime.GOOS == targetOS {
716+
cgoLdflags += " -mmacosx-version-min=10.11"
717+
cgoCflags += " -mmacosx-version-min=10.11"
718+
} else {
719+
// OSX cross available in golang-cross (Docker) only supports up to 10.10
720+
cgoLdflags += " -mmacosx-version-min=10.10"
721+
cgoCflags += " -mmacosx-version-min=10.10"
722+
}
717723
case "linux":
718724
cgoLdflags += fmt.Sprintf(" -L%s -L%s", engineCachePath, outputDirPath)
719725
cgoLdflags += fmt.Sprintf(" -lflutter_engine -Wl,-rpath,$ORIGIN")

0 commit comments

Comments
 (0)