mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
android: Extract version from llvm-project instead of hardcoding it
Stop hardcoding LLVM version as 12, instead read it from external/llvm-project. In81e20472a0the location of the LLVM_VERSION_MAJOR definition was moved. This patch accounts for that by extracting the version from the new location if it exists. If the new file is not present, it falls back to the old location. Backport-to: 24.2 Tested-by: Antonio Ospite <antonio.ospite@collabora.com> Tested-by: Alessandro Astone <alessandro.astone@canonical.com> Reviewed-by: Mauro Rossi <issor.oruam@gmail.com> Signed-off-by: Valentine Burley <valentine.burley@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30598> (cherry picked from commit71a45e4e0f)
This commit is contained in:
parent
b7315f736a
commit
73713a6756
2 changed files with 9 additions and 3 deletions
|
|
@ -1194,7 +1194,7 @@
|
|||
"description": "android: Extract version from llvm-project instead of hardcoding it",
|
||||
"nominated": true,
|
||||
"nomination_type": 4,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@ LOCAL_PATH := $(call my-dir)
|
|||
MESA3D_TOP := $(dir $(LOCAL_PATH))
|
||||
|
||||
LIBDRM_VERSION = $(shell cat external/libdrm/meson.build | grep -o "\<version\>\s*:\s*'\w*\.\w*\.\w*'" | grep -o "\w*\.\w*\.\w*" | head -1)
|
||||
LLVM_VERSION_MAJOR = $(shell \
|
||||
if [ -f external/llvm-project/cmake/Modules/LLVMVersion.cmake ]; then \
|
||||
grep 'set.LLVM_VERSION_MAJOR ' external/llvm-project/cmake/Modules/LLVMVersion.cmake | grep -o '[0-9]\+'; \
|
||||
else \
|
||||
grep 'set.LLVM_VERSION_MAJOR ' external/llvm-project/llvm/CMakeLists.txt | grep -o '[0-9]\+'; \
|
||||
fi)
|
||||
|
||||
MESA_VK_LIB_SUFFIX_amd := radeon
|
||||
MESA_VK_LIB_SUFFIX_intel := intel
|
||||
|
|
@ -86,8 +92,8 @@ MESON_GEN_PKGCONFIGS += DirectX-Headers
|
|||
endif
|
||||
|
||||
ifneq ($(MESON_GEN_LLVM_STUB),)
|
||||
MESON_LLVM_VERSION := 12.0.0
|
||||
LOCAL_SHARED_LIBRARIES += libLLVM12
|
||||
MESON_LLVM_VERSION := $(LLVM_VERSION_MAJOR).0.0
|
||||
LOCAL_SHARED_LIBRARIES += libLLVM$(LLVM_VERSION_MAJOR)
|
||||
endif
|
||||
|
||||
ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 30; echo $$?), 0)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue