diff options
author | Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> | 2020-03-11 22:35:58 -0700 |
---|---|---|
committer | Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> | 2020-03-17 19:43:39 -0700 |
commit | 7ca473a27bd589457d427eee9187d49a88fc9b01 (patch) | |
tree | 81cb98c24c453cd45f111b1354e0cf39b7087b32 /llvm/lib/CodeGen/MachineFrameInfo.cpp | |
parent | 7b166d5182356bda7fe09c8473674525292b45a2 (diff) | |
download | llvm-7ca473a27bd589457d427eee9187d49a88fc9b01.zip llvm-7ca473a27bd589457d427eee9187d49a88fc9b01.tar.gz llvm-7ca473a27bd589457d427eee9187d49a88fc9b01.tar.bz2 |
[MLIR] Add support for out of tree external projects using MLIR
LLVM has a documented mechanism for passing configuration information
to an out of tree project using cmake. See
https://llvm.org/docs/CMake.html#embedding-llvm-in-your-project. This
patch adds similar support for MLIR.
Using this requires something like:
cmake_minimum_required(VERSION 3.4.3)
project(SimpleProject)
find_package(MLIR REQUIRED CONFIG)
include_directories(${LLVM_INCLUDE_DIRS})
include_directories(${MLIR_INCLUDE_DIRS})
link_directories(${LLVM_BUILD_LIBRARY_DIR})
add_definitions(${LLVM_DEFINITIONS})
set(CMAKE_MODULE_PATH
${LLVM_CMAKE_DIR}
${MLIR_CMAKE_DIR}
)
include(AddLLVM)
include(TableGen)
include(AddMLIR)
add_executable(test-opt test-opt.cpp)
llvm_update_compile_flags(test-opt)
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
message(dialects=${dialect_libs})
set(LIBS
${dialect_libs}
${conversion_libs}
MLIRLoopOpsTransforms
MLIRLoopAnalysis
MLIRAnalysis
MLIRDialect
MLIREDSC
MLIROptLib
MLIRParser
MLIRPass
MLIRQuantizerFxpMathConfig
MLIRQuantizerSupport
MLIRQuantizerTransforms
MLIRSPIRV
MLIRSPIRVTestPasses
MLIRSPIRVTransforms
MLIRTransforms
MLIRTransformUtils
MLIRTestDialect
MLIRTestIR
MLIRTestPass
MLIRTestTransforms
MLIRSupport
MLIRIR
MLIROptLib
LLVMSupport
LLVMCore
LLVMAsmParser
)
target_link_libraries(test-opt ${LIBS})
Differential Revision: https://reviews.llvm.org/D76047
Diffstat (limited to 'llvm/lib/CodeGen/MachineFrameInfo.cpp')
0 files changed, 0 insertions, 0 deletions