From 0db4ef9df152da1d0f3601bbccc68ac1c94d4a3b Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Thu, 28 May 2015 16:55:10 +0100 Subject: gallivm: Use the LLVM's C disassembly interface. It doesn't do everything we want. In particular it doesn't allow to detect jumps or return opcodes. Currently we detect the x86's RET opcode. Even though it's worse for LLVM 3.3, it's an improvement for LLVM 3.7, which was totally busted. Reviewed-by: Roland Scheidegger --- scons/llvm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scons/llvm.py') diff --git a/scons/llvm.py b/scons/llvm.py index 17278df88be..c59b8cb9317 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -120,6 +120,7 @@ def generate(env): ]) elif llvm_version >= distutils.version.LooseVersion('3.5'): env.Prepend(LIBS = [ + 'LLVMMCDisassembler', 'LLVMBitWriter', 'LLVMMCJIT', 'LLVMRuntimeDyld', 'LLVMX86Disassembler', 'LLVMX86AsmParser', 'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter', 'LLVMX86Desc', @@ -132,6 +133,7 @@ def generate(env): ]) else: env.Prepend(LIBS = [ + 'LLVMMCDisassembler', 'LLVMBitWriter', 'LLVMX86Disassembler', 'LLVMX86AsmParser', 'LLVMX86CodeGen', 'LLVMX86Desc', 'LLVMSelectionDAG', 'LLVMAsmPrinter', 'LLVMMCParser', 'LLVMX86AsmPrinter', @@ -189,7 +191,7 @@ def generate(env): if '-fno-rtti' in cxxflags: env.Append(CXXFLAGS = ['-fno-rtti']) - components = ['engine', 'mcjit', 'bitwriter', 'x86asmprinter'] + components = ['engine', 'mcjit', 'bitwriter', 'x86asmprinter', 'mcdisassembler'] env.ParseConfig('llvm-config --libs ' + ' '.join(components)) env.ParseConfig('llvm-config --ldflags') -- cgit v1.2.3