2017-09-13 05:17:19 +01:00
# Copyright (c) 2014 Andrew Kelley
# This file is MIT licensed.
# See http://opensource.org/licenses/MIT
# LLVM_FOUND
# LLVM_INCLUDE_DIRS
# LLVM_LIBRARIES
2019-07-09 18:31:13 +01:00
# LLVM_LIBDIRS
2017-09-13 05:17:19 +01:00
2020-04-17 23:41:21 +01:00
find_path ( LLVM_INCLUDE_DIRS NAMES llvm/IR/IRBuilder.h
P A T H S
2020-12-16 08:37:32 +00:00
/ u s r / l i b / l l v m / 1 2 / i n c l u d e
/ u s r / l i b / l l v m - 1 2 / i n c l u d e
/ u s r / l i b / l l v m - 1 2 . 0 / i n c l u d e
/ u s r / l o c a l / l l v m 1 2 / i n c l u d e
/ u s r / l o c a l / l l v m 1 2 0 / i n c l u d e
2020-04-17 23:41:21 +01:00
/ m i n g w 6 4 / i n c l u d e
)
if ( ZIG_PREFER_CLANG_CPP_DYLIB )
find_library ( LLVM_LIBRARIES
N A M E S
2020-12-16 08:37:32 +00:00
L L V M - 1 2 . 0
L L V M - 1 2
L L V M - 1 2 0
2020-04-17 23:41:21 +01:00
L L V M
P A T H S
$ { L L V M _ L I B D I R S }
2020-12-16 08:37:32 +00:00
/ u s r / l i b / l l v m / 1 2 / l i b
/ u s r / l i b / l l v m / 1 2 / l i b 6 4
/ u s r / l i b / l l v m - 1 2 / l i b
/ u s r / l o c a l / l l v m 1 2 / l i b
/ u s r / l o c a l / l l v m 1 2 0 / l i b
2020-04-17 23:41:21 +01:00
)
2020-10-16 07:28:24 +01:00
find_program ( LLVM_CONFIG_EXE
2020-12-16 08:37:32 +00:00
N A M E S l l v m - c o n f i g - 1 2 l l v m - c o n f i g - 1 2 . 0 l l v m - c o n f i g 1 2 0 l l v m - c o n f i g 1 2 l l v m - c o n f i g
2020-10-16 07:28:24 +01:00
P A T H S
" / m i n g w 6 4 / b i n "
" / c / m s y s 6 4 / m i n g w 6 4 / b i n "
" c : / m s y s 6 4 / m i n g w 6 4 / b i n "
2020-12-16 08:37:32 +00:00
" C : / L i b r a r i e s / l l v m - 1 2 . 0 . 0 / b i n " )
2020-10-16 07:28:24 +01:00
if ( "${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND" )
message ( FATAL_ERROR "unable to find llvm-config" )
endif ( )
if ( "${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND" )
message ( FATAL_ERROR "unable to find llvm-config" )
endif ( )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - v e r s i o n
O U T P U T _ V A R I A B L E L L V M _ C O N F I G _ V E R S I O N
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
2020-12-16 08:37:32 +00:00
if ( "${LLVM_CONFIG_VERSION}" VERSION_LESS 12 )
message ( FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}" )
2020-10-16 07:28:24 +01:00
endif ( )
2020-12-16 08:37:32 +00:00
if ( "${LLVM_CONFIG_VERSION}" VERSION_EQUAL 13 )
message ( FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}" )
2020-10-16 07:28:24 +01:00
endif ( )
2020-12-16 08:37:32 +00:00
if ( "${LLVM_CONFIG_VERSION}" VERSION_GREATER 13 )
message ( FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}" )
2020-10-16 07:28:24 +01:00
endif ( )
2021-03-13 21:30:56 +00:00
elseif ( ZIG_USE_LLVM_CONFIG )
2020-03-28 03:43:21 +00:00
find_program ( LLVM_CONFIG_EXE
2020-12-16 08:37:32 +00:00
N A M E S l l v m - c o n f i g - 1 2 l l v m - c o n f i g - 1 2 . 0 l l v m - c o n f i g 1 2 0 l l v m - c o n f i g 1 2 l l v m - c o n f i g
2020-03-28 03:43:21 +00:00
P A T H S
" / m i n g w 6 4 / b i n "
" / c / m s y s 6 4 / m i n g w 6 4 / b i n "
" c : / m s y s 6 4 / m i n g w 6 4 / b i n "
2020-12-16 08:37:32 +00:00
" C : / L i b r a r i e s / l l v m - 1 2 . 0 . 0 / b i n " )
2020-03-28 03:43:21 +00:00
if ( "${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND" )
message ( FATAL_ERROR "unable to find llvm-config" )
endif ( )
if ( "${LLVM_CONFIG_EXE}" STREQUAL "LLVM_CONFIG_EXE-NOTFOUND" )
message ( FATAL_ERROR "unable to find llvm-config" )
endif ( )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - v e r s i o n
O U T P U T _ V A R I A B L E L L V M _ C O N F I G _ V E R S I O N
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
2020-12-16 08:37:32 +00:00
if ( "${LLVM_CONFIG_VERSION}" VERSION_LESS 12 )
message ( FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}" )
2020-03-28 03:43:21 +00:00
endif ( )
2020-12-16 08:37:32 +00:00
if ( "${LLVM_CONFIG_VERSION}" VERSION_EQUAL 13 )
message ( FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}" )
2020-03-28 03:43:21 +00:00
endif ( )
2020-12-16 08:37:32 +00:00
if ( "${LLVM_CONFIG_VERSION}" VERSION_GREATER 13 )
message ( FATAL_ERROR "expected LLVM 12.x but found ${LLVM_CONFIG_VERSION} using ${LLVM_CONFIG_EXE}" )
2020-03-28 03:43:21 +00:00
endif ( )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - t a r g e t s - b u i l t
O U T P U T _ V A R I A B L E L L V M _ T A R G E T S _ B U I L T _ S P A C E S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REPLACE " " ";" LLVM_TARGETS_BUILT "${LLVM_TARGETS_BUILT_SPACES}" )
function ( NEED_TARGET TARGET_NAME )
list ( FIND LLVM_TARGETS_BUILT "${TARGET_NAME}" _index )
if ( ${ _index } EQUAL -1 )
2020-09-26 16:10:33 +01:00
message ( FATAL_ERROR "LLVM (according to ${LLVM_CONFIG_EXE}) is missing target ${TARGET_NAME}. Zig requires LLVM to be built with all default targets enabled." )
2020-03-28 03:43:21 +00:00
endif ( )
endfunction ( NEED_TARGET )
NEED_TARGET ( "AArch64" )
NEED_TARGET ( "AMDGPU" )
NEED_TARGET ( "ARM" )
2020-10-07 08:46:05 +01:00
NEED_TARGET ( "AVR" )
2020-03-28 03:43:21 +00:00
NEED_TARGET ( "BPF" )
NEED_TARGET ( "Hexagon" )
NEED_TARGET ( "Lanai" )
NEED_TARGET ( "Mips" )
NEED_TARGET ( "MSP430" )
NEED_TARGET ( "NVPTX" )
NEED_TARGET ( "PowerPC" )
NEED_TARGET ( "RISCV" )
NEED_TARGET ( "Sparc" )
NEED_TARGET ( "SystemZ" )
NEED_TARGET ( "WebAssembly" )
NEED_TARGET ( "X86" )
NEED_TARGET ( "XCore" )
if ( ZIG_STATIC_LLVM )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - l i b f i l e s - - l i n k - s t a t i c
O U T P U T _ V A R I A B L E L L V M _ L I B R A R I E S _ S P A C E S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REPLACE " " ";" LLVM_LIBRARIES "${LLVM_LIBRARIES_SPACES}" )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - s y s t e m - l i b s - - l i n k - s t a t i c
O U T P U T _ V A R I A B L E L L V M _ S Y S T E M _ L I B S _ S P A C E S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REPLACE " " ";" LLVM_SYSTEM_LIBS "${LLVM_SYSTEM_LIBS_SPACES}" )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - l i b d i r - - l i n k - s t a t i c
O U T P U T _ V A R I A B L E L L V M _ L I B D I R S _ S P A C E S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REPLACE " " ";" LLVM_LIBDIRS "${LLVM_LIBDIRS_SPACES}" )
endif ( )
if ( NOT LLVM_LIBRARIES )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - l i b s
O U T P U T _ V A R I A B L E L L V M _ L I B R A R I E S _ S P A C E S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REPLACE " " ";" LLVM_LIBRARIES "${LLVM_LIBRARIES_SPACES}" )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - s y s t e m - l i b s
O U T P U T _ V A R I A B L E L L V M _ S Y S T E M _ L I B S _ S P A C E S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REPLACE " " ";" LLVM_SYSTEM_LIBS "${LLVM_SYSTEM_LIBS_SPACES}" )
execute_process (
C O M M A N D $ { L L V M _ C O N F I G _ E X E } - - l i b d i r
O U T P U T _ V A R I A B L E L L V M _ L I B D I R S _ S P A C E S
O U T P U T _ S T R I P _ T R A I L I N G _ W H I T E S P A C E )
string ( REPLACE " " ";" LLVM_LIBDIRS "${LLVM_LIBDIRS_SPACES}" )
endif ( )
set ( LLVM_LIBRARIES ${ LLVM_LIBRARIES } ${ LLVM_SYSTEM_LIBS } )
if ( NOT LLVM_LIBRARIES )
2020-12-16 08:37:32 +00:00
find_library ( LLVM_LIBRARIES NAMES LLVM LLVM-12 LLVM-12.0 )
2020-03-28 03:43:21 +00:00
endif ( )
link_directories ( "${CMAKE_PREFIX_PATH}/lib" )
link_directories ( "${LLVM_LIBDIRS}" )
else ( )
2020-03-28 02:24:15 +00:00
# Here we assume that we're cross compiling with Zig, of course. No reason
2020-10-07 08:46:05 +01:00
# to support more complicated setups.
2019-02-07 17:18:01 +00:00
2020-04-17 23:41:21 +01:00
macro ( FIND_AND_ADD_LLVM_LIB _libname_ )
string ( TOUPPER ${ _libname_ } _prettylibname_ )
find_library ( LLVM_ ${ _prettylibname_ } _LIB NAMES ${ _libname_ }
P A T H S
$ { L L V M _ L I B D I R S }
2020-12-16 08:37:32 +00:00
/ u s r / l i b / l l v m / 1 2 / l i b
/ u s r / l i b / l l v m - 1 2 / l i b
/ u s r / l i b / l l v m - 1 2 . 0 / l i b
/ u s r / l o c a l / l l v m 1 2 0 / l i b
/ u s r / l o c a l / l l v m 1 2 / l i b
2020-04-17 23:41:21 +01:00
/ m i n g w 6 4 / l i b
/ c / m s y s 6 4 / m i n g w 6 4 / l i b
c : \ \ m s y s 6 4 \ \ m i n g w 6 4 \ \ l i b )
set ( LLVM_LIBRARIES ${ LLVM_LIBRARIES } ${ LLVM_${_prettylibname_ } _LIB} )
endmacro ( FIND_AND_ADD_LLVM_LIB )
2017-09-23 23:46:03 +01:00
2020-04-17 23:41:21 +01:00
# This list can be re-generated with `llvm-config --libfiles` and then
# reformatting using your favorite text editor. Note we do not execute
# `llvm-config` here because we are cross compiling.
FIND_AND_ADD_LLVM_LIB ( LLVMWindowsManifest )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMXRay )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMLibDriver )
FIND_AND_ADD_LLVM_LIB ( LLVMDlltoolDriver )
FIND_AND_ADD_LLVM_LIB ( LLVMCoverage )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMLineEditor )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMXCoreDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMXCoreCodeGen )
FIND_AND_ADD_LLVM_LIB ( LLVMXCoreDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMXCoreInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMX86Disassembler )
2020-10-05 20:15:57 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMX86AsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMX86CodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMX86Desc )
FIND_AND_ADD_LLVM_LIB ( LLVMX86Info )
FIND_AND_ADD_LLVM_LIB ( LLVMWebAssemblyDisassembler )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMWebAssemblyAsmParser )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMWebAssemblyCodeGen )
FIND_AND_ADD_LLVM_LIB ( LLVMWebAssemblyDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMWebAssemblyInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMSystemZDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMSystemZAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMSystemZCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMSystemZDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMSystemZInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMSparcDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMSparcAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMSparcCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMSparcDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMSparcInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMRISCVDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMRISCVAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMRISCVCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMRISCVDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMRISCVInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMPowerPCDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMPowerPCAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMPowerPCCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMPowerPCDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMPowerPCInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMNVPTXCodeGen )
FIND_AND_ADD_LLVM_LIB ( LLVMNVPTXDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMNVPTXInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMMSP430Disassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMMSP430AsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMMSP430CodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMMSP430Desc )
FIND_AND_ADD_LLVM_LIB ( LLVMMSP430Info )
FIND_AND_ADD_LLVM_LIB ( LLVMMipsDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMMipsAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMMipsCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMMipsDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMMipsInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMLanaiDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMLanaiCodeGen )
FIND_AND_ADD_LLVM_LIB ( LLVMLanaiAsmParser )
FIND_AND_ADD_LLVM_LIB ( LLVMLanaiDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMLanaiInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMHexagonDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMHexagonCodeGen )
FIND_AND_ADD_LLVM_LIB ( LLVMHexagonAsmParser )
FIND_AND_ADD_LLVM_LIB ( LLVMHexagonDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMHexagonInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMBPFDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMBPFAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMBPFCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMBPFDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMBPFInfo )
2020-10-05 20:15:57 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMAVRDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMAVRAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMAVRCodeGen )
2020-10-05 20:15:57 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMAVRDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMAVRInfo )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMARMDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMARMAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMARMCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMARMDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMARMUtils )
FIND_AND_ADD_LLVM_LIB ( LLVMARMInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMAMDGPUDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMAMDGPUAsmParser )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMAMDGPUCodeGen )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMAMDGPUDesc )
FIND_AND_ADD_LLVM_LIB ( LLVMAMDGPUUtils )
FIND_AND_ADD_LLVM_LIB ( LLVMAMDGPUInfo )
FIND_AND_ADD_LLVM_LIB ( LLVMAArch64Disassembler )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMAArch64AsmParser )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMAArch64CodeGen )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMAArch64Desc )
FIND_AND_ADD_LLVM_LIB ( LLVMAArch64Utils )
FIND_AND_ADD_LLVM_LIB ( LLVMAArch64Info )
FIND_AND_ADD_LLVM_LIB ( LLVMOrcJIT )
FIND_AND_ADD_LLVM_LIB ( LLVMMCJIT )
FIND_AND_ADD_LLVM_LIB ( LLVMJITLink )
FIND_AND_ADD_LLVM_LIB ( LLVMOrcTargetProcess )
FIND_AND_ADD_LLVM_LIB ( LLVMOrcShared )
FIND_AND_ADD_LLVM_LIB ( LLVMInterpreter )
FIND_AND_ADD_LLVM_LIB ( LLVMExecutionEngine )
FIND_AND_ADD_LLVM_LIB ( LLVMRuntimeDyld )
FIND_AND_ADD_LLVM_LIB ( LLVMSymbolize )
FIND_AND_ADD_LLVM_LIB ( LLVMDebugInfoPDB )
FIND_AND_ADD_LLVM_LIB ( LLVMDebugInfoGSYM )
FIND_AND_ADD_LLVM_LIB ( LLVMOption )
FIND_AND_ADD_LLVM_LIB ( LLVMObjectYAML )
FIND_AND_ADD_LLVM_LIB ( LLVMMCA )
FIND_AND_ADD_LLVM_LIB ( LLVMMCDisassembler )
FIND_AND_ADD_LLVM_LIB ( LLVMLTO )
FIND_AND_ADD_LLVM_LIB ( LLVMPasses )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMCFGuard )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMCoroutines )
FIND_AND_ADD_LLVM_LIB ( LLVMObjCARCOpts )
FIND_AND_ADD_LLVM_LIB ( LLVMHelloNew )
FIND_AND_ADD_LLVM_LIB ( LLVMipo )
FIND_AND_ADD_LLVM_LIB ( LLVMVectorize )
FIND_AND_ADD_LLVM_LIB ( LLVMLinker )
FIND_AND_ADD_LLVM_LIB ( LLVMInstrumentation )
FIND_AND_ADD_LLVM_LIB ( LLVMFrontendOpenMP )
FIND_AND_ADD_LLVM_LIB ( LLVMFrontendOpenACC )
FIND_AND_ADD_LLVM_LIB ( LLVMExtensions )
FIND_AND_ADD_LLVM_LIB ( LLVMDWARFLinker )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMGlobalISel )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMMIRParser )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMAsmPrinter )
FIND_AND_ADD_LLVM_LIB ( LLVMDebugInfoDWARF )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMSelectionDAG )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMCodeGen )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMIRReader )
FIND_AND_ADD_LLVM_LIB ( LLVMAsmParser )
FIND_AND_ADD_LLVM_LIB ( LLVMInterfaceStub )
FIND_AND_ADD_LLVM_LIB ( LLVMFileCheck )
FIND_AND_ADD_LLVM_LIB ( LLVMFuzzMutate )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMTarget )
FIND_AND_ADD_LLVM_LIB ( LLVMScalarOpts )
FIND_AND_ADD_LLVM_LIB ( LLVMInstCombine )
FIND_AND_ADD_LLVM_LIB ( LLVMAggressiveInstCombine )
FIND_AND_ADD_LLVM_LIB ( LLVMTransformUtils )
FIND_AND_ADD_LLVM_LIB ( LLVMBitWriter )
FIND_AND_ADD_LLVM_LIB ( LLVMAnalysis )
FIND_AND_ADD_LLVM_LIB ( LLVMProfileData )
FIND_AND_ADD_LLVM_LIB ( LLVMObject )
FIND_AND_ADD_LLVM_LIB ( LLVMTextAPI )
FIND_AND_ADD_LLVM_LIB ( LLVMMCParser )
FIND_AND_ADD_LLVM_LIB ( LLVMMC )
FIND_AND_ADD_LLVM_LIB ( LLVMDebugInfoCodeView )
FIND_AND_ADD_LLVM_LIB ( LLVMDebugInfoMSF )
2021-03-01 20:42:35 +00:00
FIND_AND_ADD_LLVM_LIB ( LLVMBitReader )
FIND_AND_ADD_LLVM_LIB ( LLVMCore )
FIND_AND_ADD_LLVM_LIB ( LLVMRemarks )
FIND_AND_ADD_LLVM_LIB ( LLVMBitstreamReader )
2020-04-17 23:41:21 +01:00
FIND_AND_ADD_LLVM_LIB ( LLVMBinaryFormat )
FIND_AND_ADD_LLVM_LIB ( LLVMSupport )
FIND_AND_ADD_LLVM_LIB ( LLVMDemangle )
2017-09-28 15:48:13 +01:00
endif ( )
2017-09-13 05:17:19 +01:00
include ( FindPackageHandleStandardArgs )
2020-03-25 22:43:28 +00:00
find_package_handle_standard_args ( llvm DEFAULT_MSG LLVM_LIBRARIES LLVM_INCLUDE_DIRS )
2017-09-13 05:17:19 +01:00
2019-07-09 18:31:13 +01:00
mark_as_advanced ( LLVM_INCLUDE_DIRS LLVM_LIBRARIES LLVM_LIBDIRS )