From 1b8764638a1a589612df7b1f34bcc04cb7d3d053 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 28 Aug 2019 00:58:18 +0100 Subject: [PATCH] meson/scons/android: drop now-unused HAVE_LLVM MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Engestrom Acked-by: Michel Dänzer --- Android.mk | 8 ++++---- meson.build | 8 ++------ scons/llvm.py | 6 +----- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Android.mk b/Android.mk index b9d83e87f86..753e9999fe2 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 += -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 diff --git a/meson.build b/meson.build index e3c96039afb..db21d4dbce4 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/scons/llvm.py b/scons/llvm.py index 4bb03872f96..22412d2aee5 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -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)]) -- 2.30.2