Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions vunit/sim_if/ghdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,18 @@ def determine_backend(cls, prefix):
Determine the GHDL backend
"""
mapping = {
"mcode code generator": "mcode",
"llvm code generator": "llvm",
"GCC back-end code generator": "gcc",
r"mcode (JIT )?code generator": "mcode",
r"llvm (\d+\.\d+\.\d+ )?code generator": "llvm",
r"GCC (back-end|\d+\.\d+\.\d+) code generator": "gcc",
}
output = cls._get_version_output(prefix)
for name, backend in mapping.items():
if name in output:
LOGGER.debug("Detected GHDL %s", name)
match = re.search(name, output)
if match:
LOGGER.debug("Detected GHDL %s", match.group(0))
return backend

LOGGER.error("Could not detect known LLVM backend by parsing 'ghdl --version'")
LOGGER.error("Could not detect known backend by parsing 'ghdl --version'")
print(f"Expected to find one of {mapping.keys()!r}")
print("== Output of 'ghdl --version'" + ("=" * 60))
print(output)
Expand Down