1
0
Fork 0
mirror of https://git.sr.ht/~kivikakk/niar synced 2024-12-22 23:02:24 +00:00

cxxrtl: don't drop backtrace on ^C.

This commit is contained in:
Asherah Connor 2024-09-05 18:32:49 +03:00
parent 282e4447a3
commit 2cbed9def8

View file

@ -3,6 +3,7 @@ import json
import logging import logging
import os import os
import shutil import shutil
import sys
from enum import Enum, nonmember from enum import Enum, nonmember
from functools import partial from functools import partial
from pathlib import Path from pathlib import Path
@ -12,9 +13,10 @@ from amaranth.back import rtlil
from .build import construct_top from .build import construct_top
from .cmdrunner import CommandRunner from .cmdrunner import CommandRunner
from .logging import logtime from .logging import logtime, logger
from .project import Project from .project import Project
__all__ = ["add_arguments"] __all__ = ["add_arguments"]
CXXFLAGS = [ CXXFLAGS = [
@ -271,7 +273,11 @@ def main(np: Project, args):
if args.vcd: if args.vcd:
cmd += ["--vcd", args.vcd] cmd += ["--vcd", args.vcd]
with logtime(logging.DEBUG, "run"): 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): def _make_yosys_relative(path):