Added LIBZT_SANITIZE option, removed APIFILES from lwIP build
This commit is contained in:
10
FAQ.md
10
FAQ.md
@@ -11,4 +11,12 @@ In rare circumstances it can take a substantial amount of time for a libzt insta
|
|||||||
|
|
||||||
### How do I get debug output?
|
### How do I get debug output?
|
||||||
|
|
||||||
In order of relevance, enable the following: For `libzt`-specific debug output which basically includes the POSIX socket emulation layer and network stack *drivers*, enable `LIBZT_DEBUG=1`. For situations where you suspect that the problem might lie within the network stack itself, enable `NS_DEBUG=1`. You should also check out `include/libzt.h` for additional fine-grained debug options for each network stack. If you think that your problem is with the ZeroTier protocol itself, enable `ZT_DEBUG=1`. This will output what's happening in the ZeroTier core. Note, you can enable all of these at once if you're brave.
|
In order of relevance, enable the following: For `libzt`-specific debug output which basically includes the POSIX socket emulation layer and network stack *drivers*, enable `LIBZT_DEBUG=1`. For situations where you suspect that the problem might lie within the network stack itself, enable `NS_DEBUG=1`. You should also check out `include/libzt.h` for additional fine-grained debug options for each network stack. If you think that your problem is with the ZeroTier protocol itself, enable `ZT_DEBUG=1`. This will output what's happening in the ZeroTier core. Note, you can enable all of these at once if you're brave. Additionally, you can use the `LIBZT_SANITIZE=1` flag to build against the [AddressSanitization]() library.
|
||||||
|
|
||||||
|
### Versioning
|
||||||
|
|
||||||
|
Each version of libzt will include a specific (and unrelated) version of the ZeroTier core, and network stacks. For instance: Version 1.1.5 of libzt might include version 1.2.5 of ZeroTier, there is no connection between these versioning schemes. Additionally, an update to libzt doesn't necessarily translate to an update to the ZeroTier core.
|
||||||
|
|
||||||
|
### How do I run unit tests?
|
||||||
|
|
||||||
|
See: [TESTING.md](TESTING.md)
|
||||||
@@ -99,7 +99,8 @@ SIXLOWPAN=$(LWIPDIR)/netif/lowpan6.c \
|
|||||||
# ARCHFILES: Architecture specific files.
|
# ARCHFILES: Architecture specific files.
|
||||||
ARCHFILES=$(wildcard $(LWIPARCH)/*.c $(LWIPARCH)tapif.c $(LWIPARCH)/netif/list.c $(LWIPARCH)/netif/tcpdump.c)
|
ARCHFILES=$(wildcard $(LWIPARCH)/*.c $(LWIPARCH)tapif.c $(LWIPARCH)/netif/list.c $(LWIPARCH)/netif/tcpdump.c)
|
||||||
# LWIPFILES: All the above.
|
# LWIPFILES: All the above.
|
||||||
LWIPFILES=$(COREFILES) $(APIFILES) $(NETIFFILES) $(ARCHFILES)
|
LWIPFILES=$(COREFILES) $(NETIFFILES) $(ARCHFILES)
|
||||||
|
#$(APIFILES)
|
||||||
|
|
||||||
ifeq ($(LIBZT_IPV4),1)
|
ifeq ($(LIBZT_IPV4),1)
|
||||||
LWIPFILES+=$(CORE4FILES)
|
LWIPFILES+=$(CORE4FILES)
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ endif
|
|||||||
CXXFLAGS=$(CFLAGS) -Wno-format -fno-rtti -std=c++11 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\""
|
CXXFLAGS=$(CFLAGS) -Wno-format -fno-rtti -std=c++11 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\""
|
||||||
|
|
||||||
# Build against address sanitization library for advanced debugging (clang)
|
# Build against address sanitization library for advanced debugging (clang)
|
||||||
ifeq ($(ZT_SANITIZE),1)
|
ifeq ($(LIBZT_SANITIZE),1)
|
||||||
CXXFLAGS+=-x c++ -O -g -fsanitize=address -DASAN_OPTIONS=symbolize=1 -DASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer)
|
SANFLAGS+=-x c++ -O -g -fsanitize=address -DASAN_OPTIONS=symbolize=1 -DASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES+= -Iext \
|
INCLUDES+= -Iext \
|
||||||
@@ -207,7 +207,6 @@ picotcp:
|
|||||||
cd $(STACK_DIR); make lib ARCH=shared IPV4=1 IPV6=1
|
cd $(STACK_DIR); make lib ARCH=shared IPV4=1 IPV6=1
|
||||||
|
|
||||||
lwip:
|
lwip:
|
||||||
echo $(STACK_FLAGSs)
|
|
||||||
make -f make-liblwip.mk liblwip.a $(STACK_FLAGS)
|
make -f make-liblwip.mk liblwip.a $(STACK_FLAGS)
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@@ -269,10 +268,10 @@ ztproxy:
|
|||||||
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) examples/ztproxy/ztproxy.cpp -o $(BUILD)/ztproxy $< $(UNIT_TEST_LIBS) -ldl
|
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) examples/ztproxy/ztproxy.cpp -o $(BUILD)/ztproxy $< $(UNIT_TEST_LIBS) -ldl
|
||||||
@./check.sh $(BUILD)/ztproxy
|
@./check.sh $(BUILD)/ztproxy
|
||||||
selftest:
|
selftest:
|
||||||
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__SELFTEST__ -o $(BUILD)/selftest $(UNIT_TEST_LIBS)
|
@$(CXX) $(CXXFLAGS) $(SANFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__SELFTEST__ -o $(BUILD)/selftest $(UNIT_TEST_LIBS)
|
||||||
@./check.sh $(BUILD)/selftest
|
@./check.sh $(BUILD)/selftest
|
||||||
nativetest:
|
nativetest:
|
||||||
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__NATIVETEST__ -o $(BUILD)/nativetest
|
@$(CXX) -v $(CXXFLAGS) $(SANFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__NATIVETEST__ -o $(BUILD)/nativetest
|
||||||
@./check.sh $(BUILD)/nativetest
|
@./check.sh $(BUILD)/nativetest
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ endif
|
|||||||
CXXFLAGS=$(CFLAGS) -Wno-format -fno-rtti -std=c++11 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\""
|
CXXFLAGS=$(CFLAGS) -Wno-format -fno-rtti -std=c++11 -DZT_SOFTWARE_UPDATE_DEFAULT="\"disable\""
|
||||||
|
|
||||||
# Build against address sanitization library for advanced debugging (clang)
|
# Build against address sanitization library for advanced debugging (clang)
|
||||||
ifeq ($(ZT_SANITIZE),1)
|
ifeq ($(LIBZT_SANITIZE),1)
|
||||||
CXXFLAGS+=-x c++ -O -g -fsanitize=address -DASAN_OPTIONS=symbolize=1 -DASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer)
|
SANFLAGS+=-x c++ -O -g -fsanitize=address -DASAN_OPTIONS=symbolize=1 -DASAN_SYMBOLIZER_PATH=$(shell which llvm-symbolizer)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES+= -Iext \
|
INCLUDES+= -Iext \
|
||||||
@@ -281,10 +281,10 @@ ztproxy:
|
|||||||
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) examples/ztproxy/ztproxy.cpp -o $(BUILD)/ztproxy $< $(UNIT_TEST_LIBS) -ldl
|
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) examples/ztproxy/ztproxy.cpp -o $(BUILD)/ztproxy $< $(UNIT_TEST_LIBS) -ldl
|
||||||
@./check.sh $(BUILD)/ztproxy
|
@./check.sh $(BUILD)/ztproxy
|
||||||
selftest:
|
selftest:
|
||||||
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__SELFTEST__ -o $(BUILD)/selftest $(UNIT_TEST_LIBS)
|
@$(CXX) $(CXXFLAGS) $(SANFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__SELFTEST__ -o $(BUILD)/selftest $(UNIT_TEST_LIBS)
|
||||||
@./check.sh $(BUILD)/selftest
|
@./check.sh $(BUILD)/selftest
|
||||||
nativetest:
|
nativetest:
|
||||||
@$(CXX) $(CXXFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__NATIVETEST__ -o $(BUILD)/nativetest
|
@$(CXX) $(CXXFLAGS) $(SANFLAGS) $(UNIT_TEST_INCLUDES) $(INCLUDES) test/selftest.cpp -D__NATIVETEST__ -o $(BUILD)/nativetest
|
||||||
@./check.sh $(BUILD)/nativetest
|
@./check.sh $(BUILD)/nativetest
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|||||||
Reference in New Issue
Block a user