From 29378c099b4bba8a945b38b877151266ccaa798e Mon Sep 17 00:00:00 2001 From: Nikhil Benesch Date: Mon, 24 Jun 2019 13:47:12 -0400 Subject: [PATCH] Makefile: don't build/link libedit on Windows Libedit doesn't support Windows, so don't try to build/link it there. This was the previous behavior, but I broke it in #32623. Release note: None --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b67d4166ce4e..e5e85a62d2a1 100644 --- a/Makefile +++ b/Makefile @@ -382,6 +382,8 @@ ifneq ($(HOST_TRIPLE),$(TARGET_TRIPLE)) is-cross-compile := 1 endif +target-is-windows := $(findstring w64,$(TARGET_TRIPLE)) + # CMAKE_TARGET_MESSAGES=OFF prevents CMake from printing progress messages # whenever a target is fully built to prevent spammy output from make when # c-deps are all already built. Progress messages are still printed when actual @@ -454,7 +456,10 @@ LIBROACHCCL := $(LIBROACH_DIR)/libroachccl.a LIBKRB5 := $(KRB5_DIR)/lib/libgssapi_krb5.a PROTOC := $(PROTOC_DIR)/protoc -C_LIBS_COMMON = $(if $(use-stdmalloc),,$(LIBJEMALLOC)) $(LIBPROTOBUF) $(LIBSNAPPY) $(LIBEDIT) $(LIBROCKSDB) +C_LIBS_COMMON = \ + $(if $(use-stdmalloc),,$(LIBJEMALLOC)) \ + $(if $(target-is-windows),,$(LIBEDIT)) \ + $(LIBPROTOBUF) $(LIBSNAPPY) $(LIBROCKSDB) C_LIBS_OSS = $(C_LIBS_COMMON) $(LIBROACH) C_LIBS_CCL = $(C_LIBS_COMMON) $(LIBCRYPTOPP) $(LIBROACHCCL) @@ -519,7 +524,7 @@ vendor/github.com/knz/go-libedit/unix/zcgo_flags_extra.go: Makefile | bin/.submo @echo 'package $($(@D)-package)' >> $@ @echo >> $@ @echo '// #cgo CPPFLAGS: -DGO_LIBEDIT_NO_BUILD' >> $@ - @echo '// #cgo LDFLAGS: -ledit -lncurses' >> $@ + @echo '// #cgo !windows LDFLAGS: -ledit -lncurses' >> $@ @echo 'import "C"' >> $@ # BUILD ARTIFACT CACHING