Skip to content

Commit

Permalink
Added --clean flag to fusesoc run command
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Rumpeltin authored and olofk committed Feb 20, 2025
1 parent 338f757 commit cc13f2a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fusesoc/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ def run(fs, args):
exit(1)

# Unconditionally clean out the work root on fresh builds
# if we use the old tool API
if do_configure and not core.get_flow(flags):
# if we use the old tool API or clean flag is set
if do_configure and (not core.get_flow(flags) or args.clean):
try:
prepare_work_root(fs.get_work_root(core, flags))
except RuntimeError as e:
Expand Down Expand Up @@ -568,6 +568,11 @@ def get_parser():

# run subparser
parser_run = subparsers.add_parser("run", help="Start a tool flow")
parser_run.add_argument(
"--clean",
action="store_true",
help="Clean build directory on start",
)
parser_run.add_argument(
"--no-export",
action="store_true",
Expand Down

0 comments on commit cc13f2a

Please sign in to comment.