depot/third_party/nixpkgs/pkgs/development/tools/protoc-gen-grpc-web/optional-static.patch
Default email aa526eb20f Project import generated by Copybara.
GitOrigin-RevId: fcd48a5a0693f016a5c370460d0c2a8243b882dc
2022-03-10 11:12:11 -08:00

19 lines
494 B
Diff

--- a/Makefile
+++ b/Makefile
@@ -18,12 +18,15 @@ CXXFLAGS += -std=c++11
LDFLAGS += -L/usr/local/lib -lprotoc -lprotobuf -lpthread -ldl
PREFIX ?= /usr/local
MIN_MACOS_VERSION := 10.7 # Supports OS X Lion
+STATIC ?= yes
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
CXXFLAGS += -stdlib=libc++ -mmacosx-version-min=$(MIN_MACOS_VERSION)
else ifeq ($(UNAME_S),Linux)
- LDFLAGS += -static
+ ifeq ($(STATIC),yes)
+ LDFLAGS += -static
+ endif
endif
all: protoc-gen-grpc-web