diff options
-rw-r--r-- | Android.mk | 8 | ||||
-rw-r--r-- | meson.build | 1 | ||||
-rw-r--r-- | scons/llvm.py | 1 |
3 files changed, 6 insertions, 4 deletions
diff --git a/Android.mk b/Android.mk index e86c9bd510a..b9d83e87f86 100644 --- a/Android.mk +++ b/Android.mk @@ -98,13 +98,13 @@ define mesa-build-with-llvm $(if $(filter $(MESA_ANDROID_MAJOR_VERSION), 4 5), \ $(warning Unsupported LLVM version in Android $(MESA_ANDROID_MAJOR_VERSION)),) \ $(if $(filter 6,$(MESA_ANDROID_MAJOR_VERSION)), \ - $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_STRING=\"3.7\")) \ + $(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_STRING=\"3.7\")) \ $(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \ - $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_STRING=\"3.8\")) \ + $(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_STRING=\"3.8\")) \ $(if $(filter 8,$(MESA_ANDROID_MAJOR_VERSION)), \ - $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \ + $(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \ $(if $(filter P,$(MESA_ANDROID_MAJOR_VERSION)), \ - $(eval LOCAL_CFLAGS += -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \ + $(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \ $(eval LOCAL_SHARED_LIBRARIES += libLLVM) endef diff --git a/meson.build b/meson.build index 501957e35e1..e3c96039afb 100644 --- a/meson.build +++ b/meson.build @@ -1275,6 +1275,7 @@ endif if with_llvm _llvm_version = dep_llvm.version().split('.') pre_args += [ + '-DLLVM_AVAILABLE', '-DHAVE_LLVM=0x0@0@0@1@'.format(_llvm_version[0], _llvm_version[1]), '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version()), ] diff --git a/scons/llvm.py b/scons/llvm.py index 19773eaa999..4bb03872f96 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -288,6 +288,7 @@ def generate(env): llvm_version_minor = int(llvm_version.version[1]) llvm_version_hex = '0x%02x%02x' % (llvm_version_major, llvm_version_minor) env.Prepend(CPPDEFINES = [('HAVE_LLVM', llvm_version_hex)]) + env.Prepend(CPPDEFINES = [('LLVM_AVAILABLE', 1)]) env.Prepend(CPPDEFINES = [('MESA_LLVM_VERSION_STRING=\\"%s\\"' % llvm_version)]) def exists(env): |