diff --git a/v2/pkg/commands/build/base.go b/v2/pkg/commands/build/base.go index 1f4433153..ec8c7f1e6 100644 --- a/v2/pkg/commands/build/base.go +++ b/v2/pkg/commands/build/base.go @@ -298,7 +298,7 @@ func (b *BaseBuilder) CompileProject(options *Options) error { if v != "" { v += " " } - v += "-I" + buildBaseDir + v += "-mmacosx-version-min=10.13" return v }) // Use upsertEnv so we don't overwrite user's CGO_CXXFLAGS @@ -313,6 +313,17 @@ func (b *BaseBuilder) CompileProject(options *Options) error { cmd.Env = upsertEnv(cmd.Env, "CGO_ENABLED", func(v string) string { return "1" }) + if runtime.GOOS == "darwin" { + // Set the minimum Mac SDK to 10.13 + cmd.Env = upsertEnv(cmd.Env, "CGO_LDFLAGS", func(v string) string { + if v != "" { + v += " " + } + v += "-mmacosx-version-min=10.13" + + return v + }) + } } cmd.Env = upsertEnv(cmd.Env, "GOOS", func(v string) string { diff --git a/website/docs/gettingstarted/installation.mdx b/website/docs/gettingstarted/installation.mdx index 797ebe158..b32a216a0 100644 --- a/website/docs/gettingstarted/installation.mdx +++ b/website/docs/gettingstarted/installation.mdx @@ -7,7 +7,8 @@ sidebar_position: 1 ## Supported Platforms - Windows 10 -- MacOS x64 & arm64 (due October '21) +- MacOS 10.13+ (amd64) +- MacOS 11.0+ (arm64) - Linux (due December '21) ## Dependencies diff --git a/website/docs/reference/cli.mdx b/website/docs/reference/cli.mdx index 6a033415b..dfc75bed1 100644 --- a/website/docs/reference/cli.mdx +++ b/website/docs/reference/cli.mdx @@ -141,6 +141,7 @@ Your system is ready for Wails development! | -debounce | The time to wait for reload after an asset change is detected | 100 (milliseconds) | | -devserverurl "url" | Use 3rd party dev server url, EG Vite | "http://localhost:34115" | | -appargs "args" | Arguments passed to the application in shell style | | +| -platform "platform" | Platform/Arch to target | `runtime.GOOS` | If the `assetdir`, `wailsjsdir`, `debounce` or `devserverurl` flags are provided on the command line, they are saved in `wails.json`, and become the defaults for subsequent invocations.