meson/scons/android: drop now-unused HAVE_LLVM

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Acked-by: Michel Dänzer <mdaenzer@redhat.com>
This commit is contained in:
Eric Engestrom 2019-08-28 00:58:18 +01:00
parent 2406b35151
commit 1b8764638a
3 changed files with 7 additions and 15 deletions

View File

@ -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 += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0307 -DMESA_LLVM_VERSION_STRING=\"3.7\")) \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DMESA_LLVM_VERSION_STRING=\"3.7\")) \
$(if $(filter 7,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0308 -DMESA_LLVM_VERSION_STRING=\"3.8\")) \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DMESA_LLVM_VERSION_STRING=\"3.8\")) \
$(if $(filter 8,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DMESA_LLVM_VERSION_STRING=\"3.9\")) \
$(if $(filter P,$(MESA_ANDROID_MAJOR_VERSION)), \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DHAVE_LLVM=0x0309 -DMESA_LLVM_VERSION_STRING=\"3.9\")) \
$(eval LOCAL_CFLAGS += -DLLVM_AVAILABLE -DMESA_LLVM_VERSION_STRING=\"3.9\")) \
$(eval LOCAL_SHARED_LIBRARIES += libLLVM)
endef

View File

@ -1273,12 +1273,8 @@ if _llvm != 'false'
with_llvm = dep_llvm.found()
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()),
]
pre_args += '-DLLVM_AVAILABLE'
pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version())
# LLVM can be built without rtti, turning off rtti changes the ABI of C++
# programs, so we need to build all C++ code in mesa without rtti as well to

View File

@ -283,11 +283,7 @@ def generate(env):
print('scons: Found LLVM version %s' % llvm_version)
env['LLVM_VERSION'] = llvm_version
# Define HAVE_LLVM macro with the major/minor version number (e.g., 0x0206 for 2.6)
llvm_version_major = int(llvm_version.version[0])
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)])
# Define LLVM_AVAILABLE macro to guard code blocks, and MESA_LLVM_VERSION_STRING
env.Prepend(CPPDEFINES = [('LLVM_AVAILABLE', 1)])
env.Prepend(CPPDEFINES = [('MESA_LLVM_VERSION_STRING=\\"%s\\"' % llvm_version)])