From 0bee00ea916b4fd6955ef5a40d8a12b717681080 Mon Sep 17 00:00:00 2001 From: Rintaro Okamura Date: Tue, 8 Sep 2020 18:27:18 +0900 Subject: [PATCH] # This is a combination of 4 commits. # This is the 1st commit message: :wrench: pass CXXFLAGS to CGO_CXXFLAGS... Signed-off-by: Rintaro Okamura # This is the commit message #2: :construction: wip Signed-off-by: Rintaro Okamura # This is the commit message #3: :wrench: add CGO_CFLAGS, CGO_CPPFLAGS Signed-off-by: Rintaro Okamura # This is the commit message #4: :wrench: use CMAKE_C_FLAGS, CMAKE_CXX_FLAGS Signed-off-by: Rintaro Okamura --- Makefile | 3 ++- dockers/agent/core/ngt/Dockerfile | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 82811c8154..220742f605 100644 --- a/Makefile +++ b/Makefile @@ -334,7 +334,8 @@ ngt/install: /usr/local/include/NGT/Capi.h /usr/local/include/NGT/Capi.h: curl -LO https://github.com/yahoojapan/NGT/archive/v$(NGT_VERSION).tar.gz tar zxf v$(NGT_VERSION).tar.gz -C /tmp - cd /tmp/NGT-$(NGT_VERSION)&& cmake . + cd /tmp/NGT-$(NGT_VERSION) && \ + cmake -DCMAKE_C_FLAGS="$(CFLAGS)" -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" . make -j -C /tmp/NGT-$(NGT_VERSION) make install -C /tmp/NGT-$(NGT_VERSION) rm -rf v$(NGT_VERSION).tar.gz diff --git a/dockers/agent/core/ngt/Dockerfile b/dockers/agent/core/ngt/Dockerfile index fe5050d1a2..b7b925ea0b 100644 --- a/dockers/agent/core/ngt/Dockerfile +++ b/dockers/agent/core/ngt/Dockerfile @@ -14,6 +14,7 @@ # limitations under the License. # +# to build ARG DISTROLESS_IMAGE=gcr.io/distroless/static ARG DISTROLESS_IMAGE_TAG=nonroot ARG UPX_OPTIONS=-9