| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,16 @@ | ||
| file(GLOB globbed *.c *.cpp) | ||
| add_mlir_library(MLIRIR | ||
| ${globbed} | ||
|
|
||
| ADDITIONAL_HEADER_DIRS | ||
| ${MLIR_MAIN_INCLUDE_DIR}/mlir/IR | ||
|
|
||
| DEPENDS | ||
| MLIRCallOpInterfacesIncGen | ||
| MLIROpAsmInterfacesIncGen | ||
| ) | ||
| target_link_libraries(MLIRIR | ||
| PUBLIC | ||
| MLIRSupport | ||
| LLVMSupport | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| add_mlir_library(MLIRParser | ||
| Lexer.cpp | ||
| Parser.cpp | ||
| Token.cpp | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| file(GLOB globbed *.c *.cpp) | ||
| add_mlir_library(MLIRPass | ||
| ${globbed} | ||
|
|
||
| ADDITIONAL_HEADER_DIRS | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| add_mlir_library(MLIRTranslation | ||
| Translation.cpp | ||
|
|
||
| ADDITIONAL_HEADER_DIRS | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ target_link_libraries(mlir-sdbm-api-test | |
| PRIVATE | ||
| MLIRIR | ||
| MLIRSDBM | ||
| MLIRSupport | ||
| LLVMCore | ||
| LLVMSupport | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ set(LLVM_OPTIONAL_SOURCES | |
|
|
||
| set(LIB_LIBS | ||
| MLIRAnalysis | ||
| MLIRIR | ||
| MLIRLLVMIR | ||
| MLIROptLib | ||
| MLIRParser | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Building libmlir-cpp.so fails if LLVM_ENABLE_PIC=Off | ||
| if (NOT LLVM_ENABLE_PIC) | ||
| return() | ||
| endif() | ||
|
|
||
| # Building libmlir-cpp.so may not work on MSVC | ||
| if (MSVC) | ||
| return() | ||
| endif() | ||
|
|
||
| get_property(mlir_libs GLOBAL PROPERTY MLIR_ALL_LIBS) | ||
| list(REMOVE_DUPLICATES mlir_libs) | ||
|
|
||
| foreach (lib ${mlir_libs}) | ||
| if(XCODE) | ||
| # Xcode doesn't support object libraries, so we have to trick it into | ||
| # linking the static libraries instead. | ||
| list(APPEND _DEPS "-force_load" ${lib}) | ||
| else() | ||
| list(APPEND _OBJECTS $<TARGET_OBJECTS:obj.${lib}>) | ||
| endif() | ||
| list(APPEND _DEPS $<TARGET_PROPERTY:${lib},LINK_LIBRARIES>) | ||
| endforeach () | ||
|
|
||
| if(MLIR_LINK_MLIR_DYLIB) | ||
| set(INSTALL_WITH_TOOLCHAIN INSTALL_WITH_TOOLCHAIN) | ||
| endif() | ||
|
|
||
| # libMLIR.so depends on LLVM components. To avoid multiple | ||
| # copies of those LLVM components, libMLIR.so depends on libLLVM.so. | ||
| # This probably won't work if some LLVM components are not included | ||
| # in libLLVM.so. | ||
| if(LLVM_BUILD_LLVM_DYLIB) | ||
| add_llvm_library(MLIR | ||
| SHARED | ||
| ${INSTALL_WITH_TOOLCHAIN} | ||
|
|
||
| mlir-shlib.cpp | ||
| ) | ||
| target_link_libraries(MLIR PRIVATE LLVM ${LLVM_PTHREAD_LIB}) | ||
| whole_archive_link(MLIR ${mlir_libs}) | ||
| endif() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| // Intentionally empty source file to make CMake happy |