# LIBS should match the output of `llvm-config --libs engine mcjit bitwriter x86asmprinter irreader` for LLVM<=7.0
# and `llvm-config --libs engine coroutines` for LLVM>=8.0
- # LLVMAggressiveInstCombine library part of engine component can be safely omitted as it's not used.
- if llvm_version >= distutils.version.LooseVersion('9.0'):
+ # LLVMAggressiveInstCombine library part of engine component since LLVM 6 is only needed by Mesa3D for LLVM>=8.
+ # While not directly needed by Mesa3D, this library is needed by LLVMipo which is part of coroutines component.
+ if llvm_version >= distutils.version.LooseVersion('10.0'):
+ env.Prepend(LIBS = [
+ 'LLVMX86Disassembler', 'LLVMX86AsmParser',
+ 'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
+ 'LLVMDebugInfoCodeView', 'LLVMCodeGen',
+ 'LLVMScalarOpts', 'LLVMInstCombine',
+ 'LLVMTransformUtils',
+ 'LLVMBitWriter', 'LLVMX86Desc',
+ 'LLVMMCDisassembler', 'LLVMX86Info',
+ 'LLVMX86Utils',
+ 'LLVMMCJIT', 'LLVMExecutionEngine', 'LLVMTarget',
+ 'LLVMAnalysis', 'LLVMProfileData',
+ 'LLVMRuntimeDyld', 'LLVMObject', 'LLVMMCParser',
+ 'LLVMBitReader', 'LLVMMC', 'LLVMCore',
+ 'LLVMSupport',
+ 'LLVMIRReader', 'LLVMAsmParser',
+ 'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
+ 'LLVMBinaryFormat',
+ 'LLVMRemarks', 'LLVMBitstreamReader', 'LLVMDebugInfoDWARF',
+ 'LLVMAggressiveInstCombine','LLVMLinker', 'LLVMVectorize',
+ 'LLVMInstrumentation', 'LLVMipo', 'LLVMCoroutines',
+ 'LLVMCFGuard', 'LLVMTextAPI',
+ ])
+ elif llvm_version >= distutils.version.LooseVersion('9.0'):
env.Prepend(LIBS = [
'LLVMX86Disassembler', 'LLVMX86AsmParser',
'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
'LLVMBinaryFormat',
'LLVMRemarks', 'LLVMBitstreamReader', 'LLVMDebugInfoDWARF',
# Add these libraries to enable ompute shaders support.
- 'LLVMLinker', 'LLVMVectorize', 'LLVMInstrumentation',
- 'LLVMipo', 'LLVMCoroutines',
+ 'LLVMAggressiveInstCombine','LLVMLinker', 'LLVMVectorize',
+ 'LLVMInstrumentation', 'LLVMipo', 'LLVMCoroutines',
])
elif llvm_version >= distutils.version.LooseVersion('8.0'):
env.Prepend(LIBS = [
'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
'LLVMBinaryFormat',
# Add these libraries to enable ompute shaders support.
- 'LLVMLinker', 'LLVMVectorize', 'LLVMInstrumentation',
- 'LLVMipo', 'LLVMCoroutines',
+ 'LLVMAggressiveInstCombine', 'LLVMLinker', 'LLVMVectorize',
+ 'LLVMInstrumentation', 'LLVMipo', 'LLVMCoroutines',
])
elif llvm_version >= distutils.version.LooseVersion('5.0'):
env.Prepend(LIBS = [