Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIR] Fix tests with LLVM_LINK_LLVM_DYLIB #1222

Merged
merged 2 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ add_clang_library(TargetLowering
DEPENDS
clangBasic

LINK_COMPONENTS
TargetParser

LINK_LIBS PUBLIC

clangBasic
LLVMTargetParser
MLIRIR
MLIRPass
MLIRDLTIDialect
Expand Down
27 changes: 13 additions & 14 deletions clang/tools/cir-opt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,24 @@ get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
include_directories(${LLVM_MAIN_SRC_DIR}/../mlir/include)
include_directories(${CMAKE_BINARY_DIR}/tools/mlir/include)

set(LIBS
${dialect_libs}
${conversion_libs}
add_clang_tool(cir-opt
cir-opt.cpp
)

clang_target_link_libraries(cir-opt
PRIVATE
clangCIR
clangCIRLoweringThroughMLIR
clangCIRLoweringDirectToLLVM
MLIRAnalysis
MLIRCIR
MLIRCIRTransforms
)

target_link_libraries(cir-opt
PRIVATE
${dialect_libs}
${conversion_libs}
MLIRAnalysis
MLIRDialect
MLIRIR
MLIRMemRefDialect
Expand All @@ -23,13 +32,3 @@ set(LIBS
MLIRTransforms
MLIRTransformUtils
)

add_clang_tool(cir-opt
cir-opt.cpp

DEPENDS
${LIBS}
)

target_link_libraries(cir-opt PRIVATE ${LIBS})
llvm_update_compile_flags(cir-opt)
29 changes: 14 additions & 15 deletions clang/tools/cir-translate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@ get_property(translation_libs GLOBAL PROPERTY MLIR_TRANSLATION_LIBS)
include_directories(${LLVM_MAIN_SRC_DIR}/../mlir/include)
include_directories(${CMAKE_BINARY_DIR}/tools/mlir/include)

set(LIBS
${dialect_libs}
${conversion_libs}
${translation_libs}
add_clang_tool(cir-translate
cir-translate.cpp
)

clang_target_link_libraries(cir-translate
PRIVATE
clangCIR
clangCIRLoweringDirectToLLVM
MLIRAnalysis
MLIRCIR
MLIRCIRTransforms
)

target_link_libraries(cir-translate
PRIVATE
${dialect_libs}
${conversion_libs}
${translation_libs}
MLIRAnalysis
MLIRDialect
MLIRIR
MLIROptLib
Expand All @@ -24,13 +33,3 @@ set(LIBS
MLIRTranslateLib
MLIRSupport
)

add_clang_tool(cir-translate
cir-translate.cpp

DEPENDS
${LIBS}
)

target_link_libraries(cir-translate PRIVATE ${LIBS})
llvm_update_compile_flags(cir-translate)
Loading