Skip to content

Commit

Permalink
Add llvm-link and clang to CMake install (#14768)
Browse files Browse the repository at this point in the history
They are used to generate ukernel bitcode targets. Include the binaries
in the host tool install to support cross-compilation

The binaries will be added as CMake `TARGET` via `iree_import_binary`
for cross-compile flows.
  • Loading branch information
hcindyl authored Aug 23, 2023
1 parent 42e54ab commit ae9b2c0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ if(IREE_HOST_BIN_DIR AND NOT IREE_BUILD_COMPILER)
iree_import_binary(NAME iree-compile)
iree_import_binary(NAME iree-opt)
iree_import_binary(NAME iree-run-mlir)
iree_import_binary(NAME clang)
iree_import_binary(NAME llvm-link)
endif()

# TODO(#6353): Tools has thread dependencies in gtest, benchmark, yaml, etc.
Expand Down Expand Up @@ -229,6 +231,22 @@ if(IREE_BUILD_COMPILER)
)
endif()

if(IREE_LLVM_LINK_TARGET)
install(
TARGETS llvm-link
COMPONENT Compiler
RUNTIME DESTINATION bin
)
endif()

if(IREE_CLANG_TARGET)
install(
TARGETS clang
COMPONENT Compiler
RUNTIME DESTINATION bin
)
endif()

# Tablegen binaries are special snowflakes among special snowflakes.
# They must be statically linked against internal LLVM libraries, and they
# therefore must not depend on anything outside of the upstream tablegen
Expand Down

0 comments on commit ae9b2c0

Please sign in to comment.