mirror of https://github.com/llvm/circt.git
[ESI Runtime] Distribute headers along with wheel (#7400)
- Include headers in Python wheel - Bump the Linux wheel build image to avoid _GLIBCXX_USE_CXX11_ABI linking issues - Add cmake file which exports built library
This commit is contained in:
parent
01d98e8fa0
commit
660c6d41e7
|
@ -70,7 +70,7 @@ jobs:
|
|||
if: runner.os != 'Windows'
|
||||
env:
|
||||
CIBW_BUILD: ${{ matrix.config.cibw_build }}
|
||||
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/circt/images/pycde-build
|
||||
CIBW_MANYLINUX_X86_64_IMAGE: ghcr.io/circt/images/esiruntime-wheel
|
||||
SETUPTOOLS_SCM_DEBUG: True
|
||||
run: python -m cibuildwheel --output-dir wheelhouse ./lib/Dialect/ESI/runtime
|
||||
|
||||
|
|
|
@ -177,12 +177,12 @@ install(RUNTIME_DEPENDENCY_SET ESICppRuntime_RUNTIME_DEPS
|
|||
)
|
||||
install(FILES ${ESICppRuntimeHeaders}
|
||||
DESTINATION include/esi
|
||||
COMPONENT ESIRuntime-dev
|
||||
COMPONENT ESIRuntime
|
||||
)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cpp/cmake/esiaccel.cmake
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cpp/cmake/esiaccelConfig.cmake
|
||||
DESTINATION cmake
|
||||
COMPONENT ESIRuntime-dev
|
||||
COMPONENT ESIRuntime
|
||||
)
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
@ -460,5 +460,5 @@ endif()
|
|||
|
||||
install(FILES ${ESICppRuntimeBackendHeaders}
|
||||
DESTINATION include/esi/backends
|
||||
COMPONENT ESIRuntime-dev
|
||||
COMPONENT ESIRuntime
|
||||
)
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
function(add_esiaccel_flags TARGET)
|
||||
message("-- Adding ESI runtime flags to target ${TARGET}")
|
||||
target_include_directories(${TARGET}
|
||||
PUBLIC
|
||||
"${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../include"
|
||||
)
|
||||
file(GLOB ESI_LIBS ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/../lib/*)
|
||||
target_link_libraries(${TARGET}
|
||||
PUBLIC
|
||||
${ESI_LIBS}
|
||||
)
|
||||
endfunction()
|
|
@ -0,0 +1,15 @@
|
|||
add_library(esiaccel::ESICppRuntime SHARED IMPORTED)
|
||||
set_target_properties(esiaccel::ESICppRuntime PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_LIST_DIR}/../include"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties(esiaccel::ESICppRuntime PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../ESICppRuntime.dll"
|
||||
IMPORTED_IMPLIB "${CMAKE_CURRENT_LIST_DIR}/../ESICppRuntime.lib"
|
||||
)
|
||||
else()
|
||||
set_target_properties(esiaccel::ESICppRuntime PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_LIST_DIR}/../lib/ESICppRuntime.so"
|
||||
)
|
||||
endif()
|
|
@ -24,3 +24,7 @@ def run_esi_cosim():
|
|||
cosim_import = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(cosim_import)
|
||||
return cosim_import.__main__(sys.argv)
|
||||
|
||||
|
||||
def get_cmake_dir():
|
||||
return _thisdir / "cmake"
|
||||
|
|
Loading…
Reference in New Issue