Make runtime CPU detection and near-optimal parsing enabled in the code by default

This commit is contained in:
Eric Biggers 2016-01-28 00:17:28 -06:00
parent 6e5ef3ea7f
commit 051d55919b
3 changed files with 9 additions and 5 deletions

View File

@ -90,16 +90,16 @@ override CFLAGS += -I.
# Hide non-standard functions from standard headers (e.g. heapsort() on *BSD). # Hide non-standard functions from standard headers (e.g. heapsort() on *BSD).
override CFLAGS += -D_ANSI_SOURCE override CFLAGS += -D_ANSI_SOURCE
ifeq ($(SUPPORT_NEAR_OPTIMAL_PARSING),yes) ifneq ($(SUPPORT_NEAR_OPTIMAL_PARSING),yes)
override CFLAGS += -DSUPPORT_NEAR_OPTIMAL_PARSING=1 override CFLAGS += -DSUPPORT_NEAR_OPTIMAL_PARSING=0
endif endif
ifeq ($(UNSAFE_DECOMPRESSION),yes) ifeq ($(UNSAFE_DECOMPRESSION),yes)
override CFLAGS += -DUNSAFE_DECOMPRESSION=1 override CFLAGS += -DUNSAFE_DECOMPRESSION=1
endif endif
ifeq ($(RUNTIME_CPU_DETECTION),yes) ifneq ($(RUNTIME_CPU_DETECTION),yes)
override CFLAGS += -DRUNTIME_CPU_DETECTION=1 override CFLAGS += -DRUNTIME_CPU_DETECTION=0
endif endif
SRC := src/aligned_malloc.c SRC := src/aligned_malloc.c

View File

@ -27,7 +27,7 @@
* zlib at level 9. However, it is slow. * zlib at level 9. However, it is slow.
*/ */
#ifndef SUPPORT_NEAR_OPTIMAL_PARSING #ifndef SUPPORT_NEAR_OPTIMAL_PARSING
# define SUPPORT_NEAR_OPTIMAL_PARSING 0 # define SUPPORT_NEAR_OPTIMAL_PARSING 1
#endif #endif
/* /*

View File

@ -6,6 +6,10 @@
#include "util.h" #include "util.h"
#ifndef RUNTIME_CPU_DETECTION
# define RUNTIME_CPU_DETECTION 1
#endif
#if RUNTIME_CPU_DETECTION && defined(__GNUC__) && defined(__x86_64__) #if RUNTIME_CPU_DETECTION && defined(__GNUC__) && defined(__x86_64__)
# define X86_CPU_FEATURES_ENABLED 1 # define X86_CPU_FEATURES_ENABLED 1
#endif #endif