mirror of
https://git.sr.ht/~kivikakk/niar
synced 2024-12-22 12:52:25 +00:00
cxxrtl: don't drop backtrace on ^C.
This commit is contained in:
parent
282e4447a3
commit
2cbed9def8
|
@ -3,6 +3,7 @@ import json
|
|||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import sys
|
||||
from enum import Enum, nonmember
|
||||
from functools import partial
|
||||
from pathlib import Path
|
||||
|
@ -12,9 +13,10 @@ from amaranth.back import rtlil
|
|||
|
||||
from .build import construct_top
|
||||
from .cmdrunner import CommandRunner
|
||||
from .logging import logtime
|
||||
from .logging import logtime, logger
|
||||
from .project import Project
|
||||
|
||||
|
||||
__all__ = ["add_arguments"]
|
||||
|
||||
CXXFLAGS = [
|
||||
|
@ -271,7 +273,11 @@ def main(np: Project, args):
|
|||
if args.vcd:
|
||||
cmd += ["--vcd", args.vcd]
|
||||
with logtime(logging.DEBUG, "run"):
|
||||
cr.run_cmd(cmd, step="run")
|
||||
try:
|
||||
cr.run_cmd(cmd, step="run")
|
||||
except KeyboardInterrupt:
|
||||
print(file=sys.stderr)
|
||||
logger.log(logging.INFO, "aborting on KeyboardInterrupt")
|
||||
|
||||
|
||||
def _make_yosys_relative(path):
|
||||
|
|
Loading…
Reference in a new issue