diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-08-09 03:43:32 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-08-09 03:43:32 -0700 |
commit | d869097400048af4b943e0679bab21b759facb80 (patch) | |
tree | 933247f287a427202dc98904419e7dd27e683574 /Makefile | |
parent | cf2a959fa1fa48ca068dfecb6bee660b0a2ff395 (diff) |
Make the absence of perf-cppflags give a good default build.
Defaults are now:
- thread-safe with GCC/Clang
- Debugging not enabled (enable with -UNDEBUG)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -7,17 +7,13 @@ # # Summary of compiler flags you may want to use: # -# * -DNDEBUG: makes binary smaller and faster by removing sanity checks. -# * -O3: optimize for maximum speed +# * -UNDEBUG: enables assertions() (makes binary larger and slower) +# * -O0: disable optimizations +# * -g: enable debug symbols # * -fomit-frame-pointer: makes code smaller and faster by freeing up a reg. # # Threading: -# * -DUPB_USE_PTHREADS: configures upb to use pthreads r/w lock. # * -DUPB_THREAD_UNSAFE: remove all thread-safety. -# * -pthread: required on GCC to enable pthreads (but what does it do?) -# -# Other: -# * -DUPB_UNALIGNED_READS_OK: makes code smaller, but not standard compliant .PHONY: all lib clean tests test benchmarks benchmark descriptorgen .PHONY: clean_leave_profile @@ -49,7 +45,7 @@ CXX=g++ CFLAGS=-std=gnu99 CXXFLAGS= INCLUDE=-Itests -I. -CPPFLAGS=$(INCLUDE) -Wall -Wextra -Wno-sign-compare $(USER_CFLAGS) +CPPFLAGS=$(INCLUDE) -DNDEBUG -Wall -Wextra -Wno-sign-compare $(USER_CFLAGS) LDLIBS=-lpthread upb/libupb.a LUA=lua # 5.1 and 5.2 should both be supported |