mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-10 15:45:15 -04:00
sci-electronics/circt: fix install abort and MLIR test failure
Install only the tools that were actually built so a missing slang or Z3 frontend no longer aborts the merge, and drop the upstream check-mlir stage whose mlir-runner JIT tests need shared runtime libs that our static build does not expose. Closes: https://bugs.gentoo.org/977442 Closes: https://bugs.gentoo.org/977441 Signed-off-by: Huang Rui <vowstar@gmail.com>
This commit is contained in:
@@ -85,8 +85,11 @@ src_configure() {
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Only exercise CIRCT's own suites. check-mlir runs upstream MLIR
|
||||
# mlir-runner JIT tests that dlopen the MLIR runtime shared libraries,
|
||||
# which our static CMAKE_SKIP_RPATH build does not expose, and which are
|
||||
# out of scope for packaging CIRCT. See https://bugs.gentoo.org/977441
|
||||
pushd "${BUILD_DIR}" || die
|
||||
eninja check-mlir
|
||||
eninja check-circt
|
||||
eninja check-circt-integration
|
||||
popd || die
|
||||
@@ -97,28 +100,29 @@ src_install() {
|
||||
mv "${S_LLVM}/mlir/LICENSE.TXT" "${S_LLVM}/mlir/mlir-LICENSE.TXT" || die
|
||||
mv "${S_CIRCT}/LICENSE" "${S_CIRCT}/circt-LICENSE" || die
|
||||
einstalldocs
|
||||
|
||||
# Several tools are only built when their optional frontend is present:
|
||||
# circt-verilog and circt-verilog-lsp-server need the slang
|
||||
# SystemVerilog parser, circt-bmc and circt-lec need Z3. When those are
|
||||
# unavailable the upstream build simply omits the binaries, so install
|
||||
# whatever got built instead of aborting. See
|
||||
# https://bugs.gentoo.org/977442
|
||||
local tool
|
||||
local tools=(
|
||||
arcilator circt-as circt-bmc circt-cocotb-driver.py circt-dis
|
||||
circt-lec circt-lsp-server circt-opt circt-reduce circt-rtl-sim.py
|
||||
circt-synth circt-test circt-translate circt-verilog
|
||||
circt-verilog-lsp-server domaintool firld firtool handshake-runner
|
||||
hlstool kanagawatool om-linker py-split-input-file.py
|
||||
)
|
||||
exeinto /usr/bin
|
||||
doexe "${BUILD_DIR}"/bin/arcilator
|
||||
doexe "${BUILD_DIR}"/bin/circt-as
|
||||
doexe "${BUILD_DIR}"/bin/circt-bmc
|
||||
doexe "${BUILD_DIR}"/bin/circt-cocotb-driver.py
|
||||
doexe "${BUILD_DIR}"/bin/circt-dis
|
||||
doexe "${BUILD_DIR}"/bin/circt-lec
|
||||
doexe "${BUILD_DIR}"/bin/circt-lsp-server
|
||||
doexe "${BUILD_DIR}"/bin/circt-opt
|
||||
doexe "${BUILD_DIR}"/bin/circt-reduce
|
||||
doexe "${BUILD_DIR}"/bin/circt-rtl-sim.py
|
||||
doexe "${BUILD_DIR}"/bin/circt-synth
|
||||
doexe "${BUILD_DIR}"/bin/circt-test
|
||||
doexe "${BUILD_DIR}"/bin/circt-translate
|
||||
doexe "${BUILD_DIR}"/bin/circt-verilog
|
||||
doexe "${BUILD_DIR}"/bin/circt-verilog-lsp-server
|
||||
doexe "${BUILD_DIR}"/bin/domaintool
|
||||
doexe "${BUILD_DIR}"/bin/firld
|
||||
doexe "${BUILD_DIR}"/bin/firtool
|
||||
doexe "${BUILD_DIR}"/bin/handshake-runner
|
||||
doexe "${BUILD_DIR}"/bin/hlstool
|
||||
doexe "${BUILD_DIR}"/bin/kanagawatool
|
||||
doexe "${BUILD_DIR}"/bin/om-linker
|
||||
doexe "${BUILD_DIR}"/bin/py-split-input-file.py
|
||||
for tool in "${tools[@]}"; do
|
||||
if [[ -e "${BUILD_DIR}/bin/${tool}" ]]; then
|
||||
doexe "${BUILD_DIR}/bin/${tool}"
|
||||
else
|
||||
ewarn "Skipping ${tool}, not built (optional frontend unavailable)"
|
||||
fi
|
||||
done
|
||||
|
||||
[[ -e "${ED}/usr/bin/firtool" ]] || die "firtool was not built"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user