From d5844dfd2aaa47de24e695ea3ecfd3ea05c9043a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 28 Apr 2021 16:07:46 +0100 Subject: [PATCH] Update `llvm-config` checking on Linux --- Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 37a7f8159..1eefb02ea 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,15 @@ ifeq ($(OS), Darwin) LDFLAGS:=$(LDFLAGS) -lLLVM-C endif ifeq ($(OS), Linux) - LLVM_CONFIG=llvm-config-11 + ifneq ($(shell command -v llvm-config-11),) + LLVM_CONFIG=llvm-config-11 + else + ifneq ($(shell llvm-config --version | grep 11),) + LLVM_CONFIG=llvm-config + else + $(error "Requirement: llvm-config must be version 11") + endif + endif CFLAGS:=$(CFLAGS) $(shell $(LLVM_CONFIG) --cxxflags --ldflags) LDFLAGS:=$(LDFLAGS) $(shell $(LLVM_CONFIG) --libs core native --system-libs)