Browse Source

Adjust build tags to be client-only in "make cross" too

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Tianon Gravi 11 years ago
parent
commit
ba663eac3a
1 changed files with 10 additions and 1 deletions
  1. 10 1
      hack/make/cross

+ 10 - 1
hack/make/cross

@@ -3,6 +3,12 @@ set -e
 
 
 DEST=$1
 DEST=$1
 
 
+# explicit list of os/arch combos that support being a daemon
+declare -A daemonSupporting
+daemonSupporting=(
+	[linux/amd64]=1
+)
+
 # if we have our linux/amd64 version compiled, let's symlink it in
 # if we have our linux/amd64 version compiled, let's symlink it in
 if [ -x "$DEST/../binary/docker-$VERSION" ]; then
 if [ -x "$DEST/../binary/docker-$VERSION" ]; then
 	mkdir -p "$DEST/linux/amd64"
 	mkdir -p "$DEST/linux/amd64"
@@ -18,7 +24,10 @@ for platform in $DOCKER_CROSSPLATFORMS; do
 		mkdir -p "$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
 		mkdir -p "$DEST/$platform" # bundles/VERSION/cross/GOOS/GOARCH/docker-VERSION
 		export GOOS=${platform%/*}
 		export GOOS=${platform%/*}
 		export GOARCH=${platform##*/}
 		export GOARCH=${platform##*/}
-		export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms (TODO this might change someday)
+		if [ -z "${daemonSupporting[$platform]}" ]; then
+			export LDFLAGS_STATIC_DOCKER="" # we just need a simple client for these platforms
+			export BUILDFLAGS=( "${BUILDFLAGS[@]/ daemon/}" ) # remove the "daemon" build tag from platforms that aren't supported
+		fi
 		source "$(dirname "$BASH_SOURCE")/binary" "$DEST/$platform"
 		source "$(dirname "$BASH_SOURCE")/binary" "$DEST/$platform"
 	)
 	)
 done
 done