mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 21:13:44 +02:00
Prefer clang for Linux builds, but use gcc if no clang available.
This commit is contained in:
parent
27a5237462
commit
b792ab8ff1
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
CC=gcc
|
# Pick clang or gcc, with preference for clang
|
||||||
CXX=g++
|
CC=$(shell which clang gcc cc 2>/dev/null | head -n 1)
|
||||||
|
CXX=$(shell which clang++ g++ c++ 2>/dev/null | head -n 1)
|
||||||
|
|
||||||
INCLUDES=
|
INCLUDES=
|
||||||
DEFS=
|
DEFS=
|
||||||
|
@ -10,7 +11,7 @@ ifeq ($(ZT_AUTO_UPDATE),1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Uncomment for a release optimized build
|
# Uncomment for a release optimized build
|
||||||
CFLAGS=-Wall -O3 -fno-unroll-loops -fvisibility=hidden -fstack-protector -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
CFLAGS=-Wall -O3 -fvisibility=hidden -fstack-protector -pthread $(INCLUDES) -DNDEBUG $(DEFS)
|
||||||
STRIP=strip --strip-all
|
STRIP=strip --strip-all
|
||||||
|
|
||||||
# Uncomment for a debug build
|
# Uncomment for a debug build
|
||||||
|
|
Loading…
Add table
Reference in a new issue