From 97a4da4cf12fc39b0607032eae27135e837d9ac5 Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Tue, 25 Apr 2017 15:44:34 -0700 Subject: [PATCH] windows: remove workaround for go#15286 and have compiling work on windows Signed-off-by: Tibor Vass --- cmd/docker/docker_autogen_windows.go | 8 ++++++++ cmd/docker/docker_windows.go | 18 ------------------ 2 files changed, 8 insertions(+), 18 deletions(-) create mode 100644 cmd/docker/docker_autogen_windows.go delete mode 100644 cmd/docker/docker_windows.go diff --git a/cmd/docker/docker_autogen_windows.go b/cmd/docker/docker_autogen_windows.go new file mode 100644 index 0000000000..55bfda0812 --- /dev/null +++ b/cmd/docker/docker_autogen_windows.go @@ -0,0 +1,8 @@ +// +build autogen,windows + +package main + +// TODO: add build scripts that include the winresources (for docker icon etc.) +// Those scripts will need to specify an autogen buildtag. + +import _ "github.com/docker/cli/autogen/winresources" diff --git a/cmd/docker/docker_windows.go b/cmd/docker/docker_windows.go deleted file mode 100644 index 672e53cb5c..0000000000 --- a/cmd/docker/docker_windows.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "sync/atomic" - - _ "github.com/docker/cli/autogen/winresources" -) - -//go:cgo_import_dynamic main.dummy CommandLineToArgvW%2 "shell32.dll" - -var dummy uintptr - -func init() { - // Ensure that this import is not removed by the linker. This is used to - // ensure that shell32.dll is loaded by the system loader, preventing - // go#15286 from triggering on Nano Server TP5. - atomic.LoadUintptr(&dummy) -}