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:
parent
282e4447a3
commit
2cbed9def8
|
@ -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"):
|
||||||
|
try:
|
||||||
cr.run_cmd(cmd, step="run")
|
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):
|
||||||
|
|
Loading…
Reference in a new issue