mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-23 05:53:12 -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() {
|
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
|
pushd "${BUILD_DIR}" || die
|
||||||
eninja check-mlir
|
|
||||||
eninja check-circt
|
eninja check-circt
|
||||||
eninja check-circt-integration
|
eninja check-circt-integration
|
||||||
popd || die
|
popd || die
|
||||||
@@ -97,28 +100,29 @@ src_install() {
|
|||||||
mv "${S_LLVM}/mlir/LICENSE.TXT" "${S_LLVM}/mlir/mlir-LICENSE.TXT" || die
|
mv "${S_LLVM}/mlir/LICENSE.TXT" "${S_LLVM}/mlir/mlir-LICENSE.TXT" || die
|
||||||
mv "${S_CIRCT}/LICENSE" "${S_CIRCT}/circt-LICENSE" || die
|
mv "${S_CIRCT}/LICENSE" "${S_CIRCT}/circt-LICENSE" || die
|
||||||
einstalldocs
|
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
|
exeinto /usr/bin
|
||||||
doexe "${BUILD_DIR}"/bin/arcilator
|
for tool in "${tools[@]}"; do
|
||||||
doexe "${BUILD_DIR}"/bin/circt-as
|
if [[ -e "${BUILD_DIR}/bin/${tool}" ]]; then
|
||||||
doexe "${BUILD_DIR}"/bin/circt-bmc
|
doexe "${BUILD_DIR}/bin/${tool}"
|
||||||
doexe "${BUILD_DIR}"/bin/circt-cocotb-driver.py
|
else
|
||||||
doexe "${BUILD_DIR}"/bin/circt-dis
|
ewarn "Skipping ${tool}, not built (optional frontend unavailable)"
|
||||||
doexe "${BUILD_DIR}"/bin/circt-lec
|
fi
|
||||||
doexe "${BUILD_DIR}"/bin/circt-lsp-server
|
done
|
||||||
doexe "${BUILD_DIR}"/bin/circt-opt
|
|
||||||
doexe "${BUILD_DIR}"/bin/circt-reduce
|
[[ -e "${ED}/usr/bin/firtool" ]] || die "firtool was not built"
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user