aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-20 08:06:05 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-12-20 08:06:35 +0100
commitb19ebd8c84c58c3b19c13a20f4efe180e41ac540 (patch)
tree7f8d25e783a345fda6ee283aa308f534fac5eb9d /Makefile
parent9933b78872f59fd092be0b473d9ca7e7f757e1c3 (diff)
parent6bbd00570d30de615e695f00f40c6592b76fd8ed (diff)
downloadsparse-dev-b19ebd8c84c58c3b19c13a20f4efe180e41ac540.tar.gz
Merge branch 'cleanup'
* small build cleanup related to LLVM * build: only need includedir from llvm-config * build: check if sparse-llvm needs libc++ * small cleanup * remove unneeded declarations in "compat.h" * remove unused arg in add_branch() * allocate BBs only after initial checks in linearize_short_conditional()
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 01342343..e3e9bc64 100644
--- a/Makefile
+++ b/Makefile
@@ -160,9 +160,10 @@ ifeq ($(shell expr "$(LLVM_VERSION)" : '[3-9]\.'),2)
LLVM_PROGS := sparse-llvm
$(LLVM_PROGS): LD := g++
LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags)
-LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cflags | sed -e "s/-DNDEBUG//g" | sed -e "s/-pedantic//g")
+LLVM_CFLAGS := -I$(shell $(LLVM_CONFIG) --includedir)
LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs)
LLVM_LIBS += $(shell $(LLVM_CONFIG) --system-libs 2>/dev/null)
+LLVM_LIBS += $(shell $(LLVM_CONFIG) --cxxflags | grep -F -q -e '-stdlib=libc++' && echo -lc++)
PROGRAMS += $(LLVM_PROGS)
INST_PROGRAMS += sparse-llvm sparsec
sparse-llvm-cflags := $(LLVM_CFLAGS)