aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Ou <rqou@robertou.com>2018-05-18 22:42:24 -0700
committerRobert Ou <rqou@robertou.com>2018-05-18 22:42:24 -0700
commit93f79299a5138c966512f9ed2d140f16b1735b70 (patch)
tree445834970d760fd1180435ac395612cfc293d921
parentbfce3a74791e68a194e5c5908429334dfea3738b (diff)
downloadyosys-93f79299a5138c966512f9ed2d140f16b1735b70.tar.gz
yosys-93f79299a5138c966512f9ed2d140f16b1735b70.tar.bz2
yosys-93f79299a5138c966512f9ed2d140f16b1735b70.zip
Add options to disable abc's usage of pthreads and readline
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index cc42f82d6..b664cafc4 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,8 @@ ENABLE_NDEBUG := 0
LINK_CURSES := 0
LINK_TERMCAP := 0
LINK_ABC := 0
+# Needed for environments that don't have proper thread support (i.e. emscripten)
+DISABLE_ABC_THREADS := 0
# clang sanitizers
SANITIZER =
@@ -241,7 +243,13 @@ else
ifeq ($(ENABLE_EDITLINE),1)
CXXFLAGS += -DYOSYS_ENABLE_EDITLINE
LDLIBS += -ledit -ltinfo -lbsd
+else
+ABCMKARGS += "ABC_USE_NO_READLINE=1"
+endif
endif
+
+ifeq ($(DISABLE_ABC_THREADS),1)
+ABCMKARGS += "ABC_USE_NO_PTHREADS=1"
endif
ifeq ($(ENABLE_PLUGINS),1)
@@ -295,7 +303,9 @@ ifeq ($(ENABLE_ABC),1)
CXXFLAGS += -DYOSYS_ENABLE_ABC
ifeq ($(LINK_ABC),1)
CXXFLAGS += -DYOSYS_LINK_ABC
+ifeq ($(DISABLE_ABC_THREADS),0)
LDLIBS += -lpthread
+endif
else
ifeq ($(ABCEXTERNAL),)
TARGETS += yosys-abc$(EXE)