Skip to content

Commit

Permalink
Disable install of aiebu and aie-rt (#8655)
Browse files Browse the repository at this point in the history
* Disable install of aiebu and aie-rt

Improper install targets polutes the XRT packages with xaiengine
header and static libraries.  This PR disables the install target for
both aiebe and aie-rt.

Add CMake function in src/CMake/utilities.cmake to disable
the install target of added subdirectory.  The function works
around a missing feature in CMake.

```
```

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>

* Revert disable of aiebu release

XRT is expected to release artifacts created by aiebu so reverting change.

The aiebu submodule will be updated once it has gone through cleanup
to remove release of artifacts that are not needed, plus review of
what exactly is needed and why.

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>

* Update aiebu submodule

Pull in Xilinx/aiebu#34 to disable release
of aie-rt headers and more.

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>

* Update aiebu submodule

Pull in Xilinx/aiebu#35

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>

* Update aie-rt submodule to be in sync with aiebu/lib/aie-rt

This PR updates the aie-rt submodule at src/runtime_src/aie-rt to be
in synch with what aiebu submodule expects.  The aiebu submodule is
updated in earlier commits of this PR.

This is a mess.  Why two copies of aie-rt?  But nevermind, on windows
aiebu is using src/runtime_src/aie-rt and this version of aie-rt needs
to match what aiebu is expecting.

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>

* Remove the use of [binary_dir] from add_subdirectory of aie-rt

The binary_dir destination is not needed and not commonly used, it
also interferes with the override to remove install artifacts, which
was added in earlier commits in this PR.

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>

---------

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
  • Loading branch information
stsoe authored Dec 13, 2024
1 parent 2eeedb2 commit 2ec7849
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 5 deletions.
17 changes: 17 additions & 0 deletions src/CMake/utilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,20 @@ function(xrt_include filename)
include(${ARGV})
endif()
endfunction()

# xrt_add_subdirectory_diable_install_target subdir
#
# This function disables the install target for a subdirectory prior
# to calling add_subdirectory. This is a work-around for a missing
# cmake feature. While CMAKE_SKIP_INSTALL_RULES is key and prevents
# the CMake from from creating subdir/cmake_install.cmake, it
# unfortunately doesn't prevent CMake from still wanting to include
# subdir/cmake_install.cmake. This function just creates an empty
# subdir/cmake_install.cmake file.
function(xrt_add_subdirectory_disable_install_target subdir)
set(CMAKE_SKIP_INSTALL_RULES TRUE)
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${subdir})
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/${subdir}/cmake_install.cmake)
xrt_add_subdirectory(${ARGV})
set(CMAKE_SKIP_INSTALL_RULES FALSE)
endfunction()
4 changes: 2 additions & 2 deletions src/runtime_src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ else()
endif()

if (XDP_CLIENT_BUILD_CMAKE STREQUAL "yes")
set(AIERT_DIR ${CMAKE_CURRENT_BINARY_DIR}/aie-rt)
set(AIERT_DIR ${CMAKE_CURRENT_BINARY_DIR}/aie-rt/driver/src)
set(XAIENGINE_BUILD_SHARED OFF)
xrt_add_subdirectory(aie-rt/driver/src aie-rt)
xrt_add_subdirectory_disable_install_target(aie-rt/driver/src)
# This enables aiebu submodule use aie-rt from higher level
set(AIEBU_AIE_RT_BIN_DIR ${AIERT_DIR})
set(AIEBU_AIE_RT_HEADER_DIR ${AIERT_DIR}/include)
Expand Down
2 changes: 1 addition & 1 deletion src/runtime_src/core/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ add_subdirectory(runner)
if(CMAKE_VERSION VERSION_LESS "3.18.0")
message(WARNING "CMake version is less than 3.18.0, build of submodule aiebu disabled")
elseif (${XRT_NATIVE_BUILD} STREQUAL "yes")
add_subdirectory(aiebu)
xrt_add_subdirectory(aiebu)
else()
message(WARNING "Edge device, build of submodule aiebu disabled")
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/runtime_src/core/common/aiebu

0 comments on commit 2ec7849

Please sign in to comment.