Add ldflags option to build

This commit is contained in:
Lea Anthony
2020-06-22 20:11:56 +10:00
parent aa93e5d8d2
commit 1062aeb136
3 changed files with 13 additions and 2 deletions

View File

@@ -561,6 +561,11 @@ func ldFlags(po *ProjectOptions, buildMode string) string {
ldflags += "-X github.com/wailsapp/wails.BuildMode=" + buildMode
// Add additional ldflags passed in via the `ldflags` cli flag
if len(po.LdFlags) > 0 {
ldflags += " " + po.LdFlags
}
// If we wish to generate typescript
if po.typescriptDefsFilename != "" {
cwd, err := os.Getwd()