From 20659d45f0e78c0cdb84e19e9b02364f7fa70bf5 Mon Sep 17 00:00:00 2001 From: mpl Date: Fri, 24 Jul 2015 17:01:23 +0200 Subject: [PATCH] make.go: do not make a genfileembed.exe when cross-compiling Change-Id: I7c58756a6906c146b7bdff479dcb1b5ab9bd6e32 --- make.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make.go b/make.go index dda67e271..430ae5d03 100644 --- a/make.go +++ b/make.go @@ -393,7 +393,12 @@ func buildSrcPath(fromSrc string) string { // It also populates wantDestFile with those files so they're // kept in between runs. func genEmbeds() error { - cmdName := exeName(filepath.Join(buildGoPath, "bin", "genfileembed")) + // Note: do not use exeName for genfileembed, as it will run on the current platform, + // not on the one we're cross-compiling for. + cmdName := filepath.Join(buildGoPath, "bin", "genfileembed") + if runtime.GOOS == "windows" { + cmdName += ".exe" + } for _, embeds := range []string{"server/camlistored/ui", "pkg/server", "third_party/react", "third_party/less", "third_party/glitch", "third_party/fontawesome", "app/publisher"} { embeds := buildSrcPath(embeds) args := []string{"--output-files-stderr", embeds}