From ab795bdd6bbadd2d58712ba24dbd43c86f3b45bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Eriksson?= Date: Fri, 11 Aug 2023 18:28:10 +0200 Subject: [PATCH] Fix windows build --- builder/encore-build.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/builder/encore-build.go b/builder/encore-build.go index 121221350e..cbd526b0dc 100644 --- a/builder/encore-build.go +++ b/builder/encore-build.go @@ -41,8 +41,14 @@ func (b *Builder) Build() error { "GOROOT_FINAL=/encore", "GOARCH="+b.GOARCH, "GOOS="+b.GOOS, - "GOEXPERIMENT=cacheprog", ) + + // Enable cacheprog experiment on all platforms except Windows; + // it's seemingly not supported there: we get weird build errors. + if b.GOOS != "windows" { + cmd.Env = append(cmd.Env, "GOEXPERIMENT=cacheprog") + } + return cmd.Run() }