mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-15 15:24:59 -04:00
Make runtime CPU detection and near-optimal parsing enabled in the code by default
This commit is contained in:
parent
6e5ef3ea7f
commit
051d55919b
8
Makefile
8
Makefile
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user