From 30c726826721e94c1624abe4ce4b1da39f66bc89 Mon Sep 17 00:00:00 2001 From: Michael C Date: Fri, 19 May 2023 14:44:41 -0400 Subject: [PATCH] add CARGOFLAGS --- make-linux.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/make-linux.mk b/make-linux.mk index 9670bbbf8..00a557504 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -62,6 +62,7 @@ ifeq ($(ZT_DEBUG),1) override CXXFLAGS+=-Wall -Wno-deprecated -g -O -std=c++17 -pthread $(INCLUDES) $(DEFS) ZT_TRACE=1 RUSTFLAGS= + CARGOFLAGS= # The following line enables optimization for the crypto code, since # C25519 in particular is almost UNUSABLE in -O0 even on a 3ghz box! node/Salsa20.o node/SHA512.o node/C25519.o node/Poly1305.o: CXXFLAGS=-Wall -O2 -g -pthread $(INCLUDES) $(DEFS) @@ -72,6 +73,7 @@ else override CXXFLAGS+=-Wall -Wno-deprecated -std=c++17 -pthread $(INCLUDES) -DNDEBUG $(DEFS) LDFLAGS=-pie -Wl,-z,relro,-z,now RUSTFLAGS= + CARGOFLAGS=--release endif ifeq ($(ZT_QNAP), 1) @@ -410,8 +412,8 @@ debug: FORCE ifeq ($(ZT_SSO_SUPPORTED), 1) ifeq ($(ZT_EMBEDDED),) zeroidc: FORCE -# export PATH=/root/.cargo/bin:$$PATH; cd zeroidc && cargo build -j1 $(RUSTFLAGS) - export PATH=/${HOME}/.cargo/bin:$$PATH; cd zeroidc && cargo build $(RUSTFLAGS) +# export PATH=/root/.cargo/bin:$$PATH; cd zeroidc && cargo build -j1 $(CARGOFLAGS) + export PATH=/${HOME}/.cargo/bin:$$PATH; cd zeroidc && cargo build $(CARGOFLAGS) endif else zeroidc: @@ -474,6 +476,7 @@ echo_flags: @echo "echo_flags :: CXXFLAGS=$(CXXFLAGS)" @echo "echo_flags :: LDFLAGS=$(LDFLAGS)" @echo "echo_flags :: RUSTFLAGS=$(RUSTFLAGS)" + @echo "echo_flags :: CARGOFLAGS=$(CARGOFLAGS)" @echo "=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~" debian: echo_flags