From 2c4ac5625b235717a8637a16d2be2d7ac6e85395 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Mon, 2 May 2022 22:46:24 +0900 Subject: [PATCH] examples/flappy: add GoMain when Windows+Cgo This is a hack to compile the example with -buildmode=c-archive (.a). Updates #2084 --- examples/flappy/{main_cbackend.go => main_c.go} | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) rename examples/flappy/{main_cbackend.go => main_c.go} (88%) diff --git a/examples/flappy/main_cbackend.go b/examples/flappy/main_c.go similarity index 88% rename from examples/flappy/main_cbackend.go rename to examples/flappy/main_c.go index c42dca665..50e1c5919 100644 --- a/examples/flappy/main_cbackend.go +++ b/examples/flappy/main_c.go @@ -12,8 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:build example && ebitencbackend -// +build example,ebitencbackend +//go:build example && (ebitencbackend || (windows && cgo)) +// +build example +// +build ebitencbackend windows,cgo // This file is for some special environments using `ebitencbackend`. // You usually don't have to care about this file.