aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPaul Wankadia <junyer@google.com>2018-12-13 09:23:40 -0800
committerPaul Wankadia <junyer@google.com>2018-12-13 17:30:35 +0000
commit2da2cd14bc6d98d44d54c0aafd146f0d42147141 (patch)
tree40b0cc54fb4712c9a509096b0a717337961fef58 /Makefile
parenta73fbee2106a1d580d1f8e7cc30456dd8fa0825b (diff)
downloadregex-re2-2da2cd14bc6d98d44d54c0aafd146f0d42147141.tar.gz
Use NUMA topology to shard the DFA state cache mutex.
Change-Id: I3df2b59a5c98a66de1198794f52463eda8b65608 Reviewed-on: https://code-review.googlesource.com/c/36330 Reviewed-by: Paul Wankadia <junyer@google.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index f001f06..110ca73 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,11 @@
# CCICU=$(shell pkg-config icu-uc --cflags) -DRE2_USE_ICU
# LDICU=$(shell pkg-config icu-uc --libs)
+# To use NUMA topology to shard the DFA state cache mutex,
+# uncomment the next two lines:
+# CCNUMA=-DRE2_USE_NUMA
+# LDNUMA=-lnuma
+
# To build against PCRE for testing or benchmarking,
# uncomment the next two lines:
# CCPCRE=-I/usr/local/include -DUSEPCRE
@@ -17,8 +22,8 @@ CXX?=g++
CXXFLAGS?=-O3 -g
LDFLAGS?=
# required
-RE2_CXXFLAGS?=-std=c++11 -pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. $(CCICU) $(CCPCRE)
-RE2_LDFLAGS?=-pthread $(LDICU) $(LDPCRE)
+RE2_CXXFLAGS?=-std=c++11 -pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -I. $(CCICU) $(CCNUMA) $(CCPCRE)
+RE2_LDFLAGS?=-pthread $(LDICU) $(LDNUMA) $(LDPCRE)
AR?=ar
ARFLAGS?=rsc
NM?=nm
@@ -287,7 +292,7 @@ testinstall: static-testinstall shared-testinstall
@echo
static-testinstall: CXXFLAGS:=-std=c++11 -pthread -I$(DESTDIR)$(includedir) $(CXXFLAGS)
-static-testinstall: LDFLAGS:=-pthread -L$(DESTDIR)$(libdir) -l:libre2.a $(LDICU) $(LDFLAGS)
+static-testinstall: LDFLAGS:=-pthread -L$(DESTDIR)$(libdir) -l:libre2.a $(LDICU) $(LDNUMA) $(LDFLAGS)
static-testinstall:
@mkdir -p obj
@cp testinstall.cc obj
@@ -301,7 +306,7 @@ else
endif
shared-testinstall: CXXFLAGS:=-std=c++11 -pthread -I$(DESTDIR)$(includedir) $(CXXFLAGS)
-shared-testinstall: LDFLAGS:=-pthread -L$(DESTDIR)$(libdir) -lre2 $(LDICU) $(LDFLAGS)
+shared-testinstall: LDFLAGS:=-pthread -L$(DESTDIR)$(libdir) -lre2 $(LDICU) $(LDNUMA) $(LDFLAGS)
shared-testinstall:
@mkdir -p obj
@cp testinstall.cc obj