Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LLVM detection #5231

Merged
merged 16 commits into from
Nov 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,19 +149,19 @@ else ifeq ($(ENABLE_LLVM), 1)
LLVM_VERSION := $(shell llvm-config --version)
compilers += llvm
# … or try to autodetect LLVM from `llvm-config-<version>`.
else ifneq (, $(shell which llvm-config-15 2>/dev/null))
LLVM_VERSION := $(shell llvm-config-15 --version)
else ifneq (, $(shell which llvm-config-18 2>/dev/null))
LLVM_VERSION := $(shell llvm-config-18 --version)
compilers += llvm
# need force LLVM_SYS_150_PREFIX, or llvm_sys will not build in the case
export LLVM_SYS_150_PREFIX = $(shell llvm-config-15 --prefix)
# need force LLVM_SYS_180_PREFIX, or llvm_sys will not build in the case
export LLVM_SYS_180_PREFIX = $(shell llvm-config-18 --prefix)
else ifneq (, $(shell which llvm-config 2>/dev/null))
LLVM_VERSION := $(shell llvm-config --version)
ifneq (, $(findstring 15,$(LLVM_VERSION)))
ifneq (, $(findstring 18,$(LLVM_VERSION)))
compilers += llvm
export LLVM_SYS_150_PREFIX = $(shell llvm-config --prefix)
export LLVM_SYS_180_PREFIX = $(shell llvm-config --prefix)
else ifneq (, $(findstring 14,$(LLVM_VERSION)))
compilers += llvm
export LLVM_SYS_150_PREFIX = $(shell llvm-config --prefix)
export LLVM_SYS_180_PREFIX = $(shell llvm-config --prefix)
endif
endif

Expand Down
Loading