diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-18 20:52:50 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-12-18 22:38:06 +0100 |
| commit | e870df7a36207ae81764ef2a4c0ab1443cdce27b (patch) | |
| tree | 91195d6d4df3dcb17906542feb334601c8eec4ed /Makefile | |
| parent | 65840c61dc7a43c962ef9649abdb05efe7479ba3 (diff) | |
| download | sparse-dev-e870df7a36207ae81764ef2a4c0ab1443cdce27b.tar.gz | |
build: check if sparse-llvm needs libc++
The output of 'llvm-config --system-libs' is not really complete
as libc++ may be needed but not reported as such by this command.
So, use the output of 'llvm-config --cxxflags' to check this.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -163,6 +163,7 @@ LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags) 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) |
